|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Represents a completion choice. A CompletionProvider returns lists
of objects implementing this interface. A Completion contains the
following information:
null. It may also be
lazily generated to cut down on memory usage.
AbstractCompletion| Method Summary | |
int |
compareTo(java.lang.Object o)
Compares this completion to another one lexicographically, ignoring case. |
java.lang.String |
getAlreadyEntered(javax.swing.text.JTextComponent comp)
Returns the portion of this completion that has already been entered into the text component. |
javax.swing.Icon |
getIcon()
Returns the icon to use for this completion. |
java.lang.String |
getInputText()
Returns the text that the user has to (start) typing for this completion to be offered. |
CompletionProvider |
getProvider()
Returns the provider that returned this completion. |
int |
getRelevance()
Returns the "relevance" of this completion. |
java.lang.String |
getReplacementText()
Returns the text to insert as the result of this auto-completion. |
java.lang.String |
getSummary()
Returns the description of this auto-complete choice. |
java.lang.String |
getToolTipText()
Returns the tool tip text to display for mouse hovers over this completion. |
| Method Detail |
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - Another completion instance.
public java.lang.String getAlreadyEntered(javax.swing.text.JTextComponent comp)
This is a convenience method for:
getProvider().getAlreadyEnteredText(comp).
comp - The text component.
public javax.swing.Icon getIcon()
null for none.public java.lang.String getInputText()
getReplacementText(), but not always (a completion could be
a way to implement shorthand, for example, "sysout" mapping
to "System.out.println(").
getReplacementText()public CompletionProvider getProvider()
public int getRelevance()
By default, all completions have a relevance of 0. The
higher the value returned by this method, the higher up in the list
this completion will be; the lower the value returned, the lower it will
be. Completions with equal relevance values will be
sorted alphabetically.
public java.lang.String getReplacementText()
getInputText()public java.lang.String getSummary()
null if there is no description for this
completion.public java.lang.String getToolTipText()
Note that for this functionality to be enabled, a
JTextComponent must be registered with the
ToolTipManager, and the text component must know to search
for this value. In the case of an
RSyntaxTextArea, this
can be done with a org.fife.ui.rtextarea.ToolTipSupplier that
calls into
CompletionProvider.getCompletionsAt(JTextComponent, java.awt.Point).
null if
none.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||