|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xnap.commons.gui.completion.AbstractCompletionMode
public abstract class AbstractCompletionMode
Abstract convenience class which provides some wrapping function to ease
the implementation of a CompletionMode.
| Constructor Summary | |
|---|---|
AbstractCompletionMode()
|
|
| Method Summary | |
|---|---|
abstract void |
disable()
Disables the completion mode letting it remove its listeners from the text component. |
protected abstract void |
enable()
Has to be implemented by subclasses which don't have to worry about setting the completion object and simply use the accessors provided here. |
void |
enable(Completion completion)
Enables the completion mode letting it add its listeners to the text component. |
protected Completion |
getCompletion()
Returns the completion object that uses this completion mode. |
protected CompletionModel |
getModel()
Convenience accessor, returns the completion model |
protected String |
getText()
Convenience accessor, returns the text which should be completed. |
protected JTextComponent |
getTextComponent()
Convenience accessor, returns the text component. |
protected void |
setText(String text)
Convenience setter, forwards to Completion.setText(String). |
protected void |
setText(String text,
int selectionStart,
int selectionEnd)
Convenience setter, forwards to Completion.setText(String, int, int). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCompletionMode()
| Method Detail |
|---|
public void enable(Completion completion)
CompletionMode
enable in interface CompletionModecompletion - provides all components and information the completion
mode must know aboutprotected abstract void enable()
public abstract void disable()
CompletionMode
disable in interface CompletionModeprotected CompletionModel getModel()
protected JTextComponent getTextComponent()
protected Completion getCompletion()
protected String getText()
Completion.isWholeTextCompletion() is true, otherwise the
previous word up to the current care position
protected void setText(String text,
int selectionStart,
int selectionEnd)
Completion.setText(String, int, int).
protected void setText(String text)
Completion.setText(String).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||