|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface CompletionQuery.ResultItem
An interface used as an item of List returned by CompletionQuery.Result.getData() Such items are then able to their part in Completion process themselves
Method Summary | |
---|---|
String |
getItemText()
Says what text would this Element use if substituteText is called. |
Component |
getPaintComponent(JList list,
boolean isSelected,
boolean cellHasFocus)
Prepare proper component for painting value of this . |
boolean |
substituteCommonText(JTextComponent c,
int offset,
int len,
int subLen)
Update the text in response to pressing TAB key (or any key mapped to this function) on this element |
boolean |
substituteText(JTextComponent c,
int offset,
int len,
boolean shift)
Update the text in response to pressing ENTER on this element. |
Method Detail |
---|
boolean substituteCommonText(JTextComponent c, int offset, int len, int subLen)
c
- the text component to operate on, enables implementation to
do things like movement of caret.offset
- the offset where the item should be placedlen
- the length of recognized text which should be replacedsubLen
- the length of common part - the length of text that should
be inserted after removal of recognized text
boolean substituteText(JTextComponent c, int offset, int len, boolean shift)
c
- the text component to operate on, enables implementation to
do things like movement of caret.offset
- the offset where the item should be placedlen
- the length of recognized text which should be replacedshift
- the flag that instructs completion to behave somehow
differently - enables more kinds of invocation of substituteText
String getItemText()
Component getPaintComponent(JList list, boolean isSelected, boolean cellHasFocus)
this
.
JList
- the list this item will be drawn into, usefull e.g. for
obtaining preferred colors.isSelected
- tells if this item is just selected, for using
proper color scheme.cellHasFocus
- tells it this item is just focused.
|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |