public abstract class SlowChoicesBase extends Object implements AutoCompletion.SlowChoices
Modifier and Type | Field and Description |
---|---|
protected SetAttribute.ListItem[] |
items |
protected boolean |
preferMinimalChoices |
Constructor and Description |
---|
SlowChoicesBase(boolean preferMinimalChoices) |
Modifier and Type | Method and Description |
---|---|
boolean |
choiceListDependsOnPrefix()
Returns
true if the number of items contained
in the AutoCompletion.ChoiceList updated by AutoCompletion.Choices.getChoices(java.lang.String, com.xmlmind.guiutil.AutoCompletion.ChoiceList)
depends on the ``prefix'' typed by the user in the text field. |
protected abstract SetAttribute.ListItem[] |
doLoadItems(ProgressMonitor m) |
void |
getChoices(String prefix,
AutoCompletion.ChoiceList choiceList)
Computes the list of all possible choices given the ``prefix''
typed by the user.
|
void |
getChoices(String prefix,
AutoCompletion.ChoiceList choiceList,
ProgressMonitor progressMonitor)
Similar to
AutoCompletion.Choices , but the computation of the
AutoCompletion.ChoiceList is slow and as such, may
invoke a ProgressMonitor . |
protected SetAttribute.ListItem[] |
loadItems(ProgressMonitor monitor) |
protected final boolean preferMinimalChoices
protected SetAttribute.ListItem[] items
public void getChoices(String prefix, AutoCompletion.ChoiceList choiceList)
AutoCompletion.Choices
getChoices
in interface AutoCompletion.Choices
prefix
- what has been typed in the text field by the userchoiceList
- the corresponding list of choicespublic void getChoices(String prefix, AutoCompletion.ChoiceList choiceList, ProgressMonitor progressMonitor)
AutoCompletion.SlowChoices
AutoCompletion.Choices
, but the computation of the
AutoCompletion.ChoiceList
is slow and as such, may
invoke a ProgressMonitor
.getChoices
in interface AutoCompletion.SlowChoices
prefix
- what has been typed in the text field by the userchoiceList
- the corresponding list of choicesprogressMonitor
- monitor which may be invoked by this
implementation.
May be null
.public boolean choiceListDependsOnPrefix()
AutoCompletion.Choices
true
if the number of items contained
in the AutoCompletion.ChoiceList
updated by AutoCompletion.Choices.getChoices(java.lang.String, com.xmlmind.guiutil.AutoCompletion.ChoiceList)
depends on the ``prefix'' typed by the user in the text field.
Returns false
if AutoCompletion.ChoiceList
always contains
the same number of items. In such case, it's only the value of
AutoCompletion.ChoiceList.first
which depends on the ``prefix''
typed by the user.choiceListDependsOnPrefix
in interface AutoCompletion.Choices
protected SetAttribute.ListItem[] loadItems(ProgressMonitor monitor)
protected abstract SetAttribute.ListItem[] doLoadItems(ProgressMonitor m)