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 intgetPreferredHeight()get the preferred height of the componentintgetPreferredWidth()get the preferred width of the componentintgetRowCount()return the size of the data list / array.AutoCompleterItemgetSelectedValue()get the selected valuejava.awt.PointgetSelectionPoint()Get the point selected in the table.javax.swing.JTablegetTable()java.awt.ComponentgetViewContent()Obtain the content to put in the autocompleter popup.booleanprocessKeys(java.awt.event.KeyEvent e)Process the autocompletion keysvoidsetSelection(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:AbstractAutoCompleterViewObtain the content to put in the autocompleter popup. The view should also do any other preparation necessary for display.- Specified by:
getViewContentin 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:AbstractAutoCompleterViewProcess the autocompletion keys- Specified by:
processKeysin 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:AbstractAutoCompleterViewreturn the size of the data list / array.- Specified by:
getRowCountin classAbstractAutoCompleterView- Returns:
-
getPreferredHeight
public int getPreferredHeight()
Description copied from class:AbstractAutoCompleterViewget the preferred height of the component- Specified by:
getPreferredHeightin classAbstractAutoCompleterView- Returns:
-
getPreferredWidth
public int getPreferredWidth()
Description copied from class:AbstractAutoCompleterViewget the preferred width of the component- Specified by:
getPreferredWidthin classAbstractAutoCompleterView- Returns:
-
getSelectedValue
public AutoCompleterItem getSelectedValue()
Description copied from class:AbstractAutoCompleterViewget the selected value- Specified by:
getSelectedValuein classAbstractAutoCompleterView- Returns:
-
-