Package docking.widgets.table
Class GTableAutoLookup
java.lang.Object
docking.widgets.AutoLookup
docking.widgets.table.GTableAutoLookup
AutoLookup implementation for GTables-
Field Summary
Fields inherited from class docking.widgets.AutoLookup
KEY_TYPING_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the currently selected rowintReturns the total number of rowsgetValueString(int row, int col) Returns a string representation of the item at the given row and column.booleanisSorted(int column) Returns true if the given column is sorted.booleanReturns true if the currently sorted column is sorted ascending.voidmatchFound(int row) This method will be called when a match for the call toAutoLookup.keyTyped(KeyEvent)is foundMethods inherited from class docking.widgets.AutoLookup
canBinarySearchColumn, keyTyped, setColumn, setTimeout, setTimeoutPredicate
-
Constructor Details
-
GTableAutoLookup
-
-
Method Details
-
getCurrentRow
public int getCurrentRow()Description copied from class:AutoLookupReturns the currently selected row- Specified by:
getCurrentRowin classAutoLookup- Returns:
- the row
-
getRowCount
public int getRowCount()Description copied from class:AutoLookupReturns the total number of rows- Specified by:
getRowCountin classAutoLookup- Returns:
- the row count
-
getValueString
Description copied from class:AutoLookupReturns a string representation of the item at the given row and column. The text should match what the user sees.- Specified by:
getValueStringin classAutoLookup- Parameters:
row- the rowcol- the column- Returns:
- the text
-
isSorted
public boolean isSorted(int column) Description copied from class:AutoLookupReturns true if the given column is sorted. This class will use a binary search if the given column is sorted. Otherwise, a brute-force search will be used.- Specified by:
isSortedin classAutoLookup- Parameters:
column- the column- Returns:
- true if sorted
-
isSortedAscending
public boolean isSortedAscending()Description copied from class:AutoLookupReturns true if the currently sorted column is sorted ascending. This is used in conjunction withAutoLookup.isSorted(int). If that method returns false, then this method will not be called.- Specified by:
isSortedAscendingin classAutoLookup- Returns:
- true if sorted ascending
-
matchFound
public void matchFound(int row) Description copied from class:AutoLookupThis method will be called when a match for the call toAutoLookup.keyTyped(KeyEvent)is found- Specified by:
matchFoundin classAutoLookup- Parameters:
row- the matching row
-