Class AutoCompleterTableView
- java.lang.Object
-
- org.omegat.gui.editor.autocompleter.AbstractAutoCompleterView
-
- org.omegat.gui.editor.autocompleter.AutoCompleterTableView
-
- Direct Known Subclasses:
CharTableAutoCompleterView
public abstract class AutoCompleterTableView extends AbstractAutoCompleterView
Table-based auto-completer view
-
-
Constructor Summary
Constructors Constructor Description AutoCompleterTableView(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPreferredHeight()
get the preferred height of the componentint
getPreferredWidth()
get the preferred width of the componentint
getRowCount()
return the size of the data list / array.AutoCompleterItem
getSelectedValue()
get the selected valuejava.awt.Point
getSelectionPoint()
Get the point selected in the table.javax.swing.JTable
getTable()
java.awt.Component
getViewContent()
Obtain the content to put in the autocompleter popup.boolean
processKeys(java.awt.event.KeyEvent e)
Process the autocompletion keysvoid
setSelection(java.awt.Point p)
Set the selection.-
Methods inherited from class org.omegat.gui.editor.autocompleter.AbstractAutoCompleterView
getName, getTargetLanguage, getTokenizer, setParent, shouldCloseOnSelection, shouldPopUp, updateViewData
-
-
-
-
Method Detail
-
setSelection
public void setSelection(java.awt.Point p)
Set the selection.- Parameters:
p
- the new point
-
getTable
public javax.swing.JTable getTable()
-
getViewContent
public java.awt.Component getViewContent()
Description copied from class:AbstractAutoCompleterView
Obtain the content to put in the autocompleter popup. The view should also do any other preparation necessary for display.- Specified by:
getViewContent
in classAbstractAutoCompleterView
- Returns:
- the component to show in the autocompleter popup
-
getSelectionPoint
public java.awt.Point getSelectionPoint()
Get the point selected in the table.- Returns:
-
processKeys
public boolean processKeys(java.awt.event.KeyEvent e)
Description copied from class:AbstractAutoCompleterView
Process the autocompletion keys- Specified by:
processKeys
in classAbstractAutoCompleterView
- Parameters:
e
- the key event to process- Returns:
- true if a key has been processed, false if otherwise.
-
getRowCount
public int getRowCount()
Description copied from class:AbstractAutoCompleterView
return the size of the data list / array.- Specified by:
getRowCount
in classAbstractAutoCompleterView
- Returns:
-
getPreferredHeight
public int getPreferredHeight()
Description copied from class:AbstractAutoCompleterView
get the preferred height of the component- Specified by:
getPreferredHeight
in classAbstractAutoCompleterView
- Returns:
-
getPreferredWidth
public int getPreferredWidth()
Description copied from class:AbstractAutoCompleterView
get the preferred width of the component- Specified by:
getPreferredWidth
in classAbstractAutoCompleterView
- Returns:
-
getSelectedValue
public AutoCompleterItem getSelectedValue()
Description copied from class:AbstractAutoCompleterView
get the selected value- Specified by:
getSelectedValue
in classAbstractAutoCompleterView
- Returns:
-
-