public class AutoCompletion
extends java.lang.Object
Constructor and Description |
---|
AutoCompletion(MainControl mainControl) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
completeString(java.lang.String word)
Tries to complete the given word.
|
java.lang.String |
completeStringAt(java.lang.String string,
int position,
ArgumentComponentManager argumentComponentManager,
java.awt.Component parentComponent)
Tries to complete the given String at the given location or opens the call assistant, if the position is
located within the call.
|
int |
getLastCompletetionPos()
Returns the position of the last character of the inserted string
|
java.util.LinkedList<java.lang.String> |
getSuggestions(java.lang.String wordBeginning)
Returns a list of all possible strings that begin with the given string
|
public AutoCompletion(MainControl mainControl)
public java.lang.String completeStringAt(java.lang.String string, int position, ArgumentComponentManager argumentComponentManager, java.awt.Component parentComponent)
string
- the string to completeposition
- the position at where to complete the string. Completion will be inserted into
the given positionargumentComponentManager
- the component manager for the case that the arguments of the call are completedparentComponent
- the component relative to which the component manager (if needed) should be
placed.public int getLastCompletetionPos()
public java.lang.String completeString(java.lang.String word)
word
- the word to completepublic java.util.LinkedList<java.lang.String> getSuggestions(java.lang.String wordBeginning)