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.String
itemToString(AutoCompleterItem item)
Each view should determine how to print a view item.boolean
shouldPopUp()
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:AbstractAutoCompleterView
Return true to indicate that the view has relevant contextual suggestions that merit displaying the AutoCompleter popup unprompted.- Overrides:
shouldPopUp
in 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:AutoCompleterListView
Compute the items visible in the auto-completer list- Specified by:
computeListData
in 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:AutoCompleterListView
Each view should determine how to print a view item.- Specified by:
itemToString
in classAutoCompleterListView
- Parameters:
item
- The item to print- Returns:
- A string representation of the view item
-
-