Package org.omegat.gui.glossary
Class GlossaryAutoCompleterView
- java.lang.Object
-
- org.omegat.gui.editor.autocompleter.AbstractAutoCompleterView
-
- org.omegat.gui.editor.autocompleter.AutoCompleterListView
-
- org.omegat.gui.glossary.GlossaryAutoCompleterView
-
public class GlossaryAutoCompleterView extends AutoCompleterListView
The glossary auto-completer view.
-
-
Constructor Summary
Constructors Constructor Description GlossaryAutoCompleterView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<AutoCompleterItem>computeListData(java.lang.String prevText, boolean contextualOnly)Compute the items visible in the auto-completer listjava.lang.StringitemToString(AutoCompleterItem item)Each view should determine how to print a view item.booleanshouldPopUp()Return true to indicate that the view has relevant contextual suggestions that merit displaying the AutoCompleter popup unprompted.-
Methods inherited from class org.omegat.gui.editor.autocompleter.AutoCompleterListView
getList, getPreferredHeight, getPreferredWidth, getRowCount, getSelectedValue, getViewContent, processKeys, updateViewData
-
Methods inherited from class org.omegat.gui.editor.autocompleter.AbstractAutoCompleterView
getName, getTargetLanguage, getTokenizer, setParent, shouldCloseOnSelection
-
-
-
-
Method Detail
-
shouldPopUp
public boolean shouldPopUp()
Description copied from class:AbstractAutoCompleterViewReturn true to indicate that the view has relevant contextual suggestions that merit displaying the AutoCompleter popup unprompted.- Overrides:
shouldPopUpin classAutoCompleterListView- Returns:
- Whether or not the AutoCompleter should appear
-
computeListData
public java.util.List<AutoCompleterItem> computeListData(java.lang.String prevText, boolean contextualOnly)
Description copied from class:AutoCompleterListViewCompute the items visible in the auto-completer list- Specified by:
computeListDatain classAutoCompleterListView- Parameters:
prevText- the text in the editing field up to the cursor location- Returns:
- a list of AutoCompleterItems.
-
itemToString
public java.lang.String itemToString(AutoCompleterItem item)
Description copied from class:AutoCompleterListViewEach view should determine how to print a view item.- Specified by:
itemToStringin classAutoCompleterListView- Parameters:
item- The item to print- Returns:
- A string representation of the view item
-
-