Package com.biglybt.ui.common.table.impl
Class TableViewImpl<DATASOURCETYPE>
java.lang.Object
com.biglybt.ui.common.table.impl.TableViewImpl<DATASOURCETYPE>
- All Implemented Interfaces:
AEDiagnosticsEvidenceGenerator
,TableStructureModificationListener<DATASOURCETYPE>
,TableView<DATASOURCETYPE>
- Direct Known Subclasses:
TableViewPainted
public abstract class TableViewImpl<DATASOURCETYPE>
extends Object
implements TableView<DATASOURCETYPE>, TableStructureModificationListener<DATASOURCETYPE>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
private static interface
private class
private class
private class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TableColumnCore[]
Basic (pre-defined) Column Definitionsprivate boolean
private static final String
private final Class
<?> private TableColumnCore[]
We need to remember the order of the columns at the time we added them in case the user drags the columns around.protected static final ConfigurationManager
private static boolean
private IdentityHashMap
<DATASOURCETYPE, String> Queue added datasources and add them on refreshprivate IdentityHashMap
<DATASOURCETYPE, String> Queue removed datasources and add them on refreshprivate AtomicInteger
static final boolean
private static final boolean
static final boolean
Helpful output when trying to debug add/removal of rowsprivate static AsyncDispatcher
protected TableViewImpl.filter
<DATASOURCETYPE> private boolean
private LinkedList
<TableViewImpl.HistoryEntry> private LinkedList
<TableViewImpl.HistoryEntry> private AEMonitor
private CopyOnWriteList
<TableCountChangeListener> private CopyOnWriteList
<TableLifeCycleListener> private CopyOnWriteList
<TableRefreshListener> private ArrayList
<TableRowRefreshListener> private CopyOnWriteList
<TableSelectionListener> private IdentityHashMap
<DATASOURCETYPE, String> private long
TimeStamp of when last sorted all the rows wasprivate static final LogIDs
private IdentityHashMap
<DATASOURCETYPE, TableRowCore> Link DataSource to their row in the table.private boolean
private Object
private final Object
private FrequencyLimitedDispatcher
private TableViewImpl<DATASOURCETYPE>.rowSorterRunnable
private LinkedHashSet
<TableRowCore> Up to date list of selected rows, so we can access rows without being on SWT Thread.private final List
<TableColumnCore> Sorting functionsprivate List
<TableRowCore> Filtered rows in the tableprivate TableColumnCore[]
All Column Definitions.protected String
TableID (fromTableManager
) of the table this class is handling.private String
Prefix for retrieving text from the properties file (MessageText) Typically TableID + "View"private final AtomicInteger
-
Constructor Summary
ConstructorsConstructorDescriptionTableViewImpl
(Class<?> pluginDataSourceType, String _sTableID, String _sTextPrefixID, Object rows_sync, TableColumnCore[] _basicItems) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
_processDataSourceQueue
(boolean refocus) protected void
_sortColumn
(boolean bForceDataRefresh, boolean bFillGapsOnly, boolean bFollowSelected) void
void
addDataSource
(DATASOURCETYPE dataSource) Adds a dataSource to the table as a new row.private void
addDataSource
(DATASOURCETYPE dataSource, boolean skipFilterCheck) void
addDataSources
(DATASOURCETYPE[] dataSources) Add a list of dataSources to the table.private void
addDataSources
(DATASOURCETYPE[] dataSources, boolean skipFilterCheck) void
private void
void
void
addRefreshListener
(TableRowRefreshListener listener) void
addRefreshListener
(TableRefreshListener l, boolean trigger) void
addSelectionListener
(TableSelectionListener listener, boolean bFireSelection) void
addSortColumn
(TableColumnCore column) Add a column to the sorting.private void
addSortedDataSource
(Object[] dataSources) void
addTableDataSourceChangedListener
(TableDataSourceChangedListener l, boolean trigger) The data set that this table represents has been changed.boolean
boolean
void
cellInvalidate
(TableColumnCore tableColumn, DATASOURCETYPE data_source) void
cellInvalidate
(TableColumnCore tableColumn, DATASOURCETYPE data_source, boolean bMustRefresh) void
columnInvalidate
(TableColumnCore tableColumn) void
columnInvalidate
(TableColumnCore tableColumn, boolean bMustRefresh) void
columnInvalidate
(String sColumnName) Invalidate all the cells in a columnvoid
columnInvalidate
(String sColumnName, boolean mustRefresh) abstract TableRowCore
createNewRow
(Object object) boolean
dataSourceExists
(DATASOURCETYPE dataSource) protected void
void
delete()
protected void
fillRowGaps
(boolean bForceDataRefresh) (package private) boolean
void
generate
(IndentWriter writer) getColumnCells
(String sColumnName) Retrieve a list ofgetDataSources
(boolean include_filtered) Class
<?> protected abstract boolean
getFirstSelectedDataSource
(boolean bCoreObject) Returns the first selected data sources.boolean
abstract void
getOffUIThread
(AERunnable runnable) getRow
(int iPos) getRow
(DATASOURCETYPE dataSource) Get the row associated with a datasourceint[]
private void
getRowAndSubRowCount
(TableRowCore[] rows, int[] result, boolean isHidden) int
getRowQuick
(int iPos) getRows()
Get all the rows for this table, in the order they are displayedgetRowsAndSubRows
(boolean includeHidden) private void
getRowsAndSubRows
(List<TableRowCore> result, TableRowCore[] rows, boolean includeHidden) Returns an array of all selected Data Sources.Object[]
getSelectedDataSources
(boolean bCoreDataSource) Returns an array of all selected Data Sources.Returns an array of all selected Data Sources.Returns an array of all selected TableRowSWT.Returns an list of all selected TableRowSWT objects.int
int
getTableColumn
(String sColumnName) getTableColumn
(String sColumnName, boolean localized) protected boolean
boolean
hasSortColumn
(TableColumn column) int
indexOf
(TableRowCore row) private void
void
invokeExpansionChangeListeners
(TableRowCore row, boolean expanded) void
boolean
isColumnVisible
(TableColumn column) boolean
protected boolean
isLastRow
(TableRowCore row) boolean
boolean
isSelected
(TableRow row) abstract boolean
protected abstract boolean
boolean
boolean
void
moveBack()
void
protected boolean
private int
numberAllVisibleRows
(TableRowCore[] rows, int pos) void
Process the queue of datasources to be added and removedvoid
processDataSourceQueue
(boolean refocus) Process the queue of datasources to be added and removedvoid
protected void
private void
reallyAddDataSources
(Object[] dataSources) private void
reallyRemoveDataSources
(Object[] dataSources) protected abstract void
boolean
refilter()
private void
void
refreshTable
(boolean bForceSort) void
Remove all the data sources (table rows) from the table.void
void
removeDataSource
(DATASOURCETYPE dataSource) void
removeDataSources
(DATASOURCETYPE[] dataSources) Remove the specified dataSource from the table.void
void
removeRefreshListener
(TableRowRefreshListener listener) void
void
int
runForAllRows
(TableGroupRowRunner runner) For every row source, run the code provided by the specified parameter.private int
runForAllRows
(TableGroupRowRunner runner, boolean doSubRows) int
For every row source, run the code provided by the specified parameter.int
For each row source that the user has selected, run the code provided by the specified parameter.void
Does not fire off selection eventsvoid
setColumnsOrdered
(TableColumnCore[] columnsOrdered) void
setHeaderVisible
(boolean visible) void
setMenuEnabled
(boolean menuEnabled) void
setParentDataSource
(Object newDataSource) void
setRowSelected
(TableRowCore row, boolean selected, boolean trigger) void
setSelectedRows
(TableRowCore[] rows) void
setSelectedRows
(TableRowCore[] newSelectionArray, boolean trigger) private void
setSelectedRows
(TableRowCore[] newSelectionArray, boolean trigger, boolean updateHistory) boolean
setSortColumns
(TableColumnCore[] newSortColumns, boolean allowOrderChange) private boolean
setSortColumns
(TableColumnCore[] newSortColumns, boolean allowOrderChange, Map<TableColumnCore, Boolean> originalAscMap, boolean doHistory) int
size
(boolean bIncludeQueue) void
sortRows
(boolean bForceDataRefresh, boolean async) Sort rows using the columns specified inTableView.getSortColumns()
void
Invalidate and refresh whole tablevoid
void
tableStructureChanged
(boolean columnAddedOrRemoved, Class forPluginDataSourceType) void
triggerDefaultSelectedListeners
(TableRowCore[] selectedRows, int keyMask, int origin) protected void
protected void
protected void
protected void
triggerLifeCycleListener
(int eventType) void
triggerListenerRowAdded
(TableRowCore[] rows) protected void
protected void
triggerMouseEnterExitRow
(TableRowCore row, boolean enter) void
triggerSelectionChangeListeners
(TableRowCore[] selected_rows, TableRowCore[] deselected_rows) protected void
protected void
abstract void
protected abstract void
abstract int
abstract void
uiRemoveRows
(TableRowCore[] rows, Integer[] rowIndexes) abstract void
uiSelectionChanged
(TableRowCore[] newlySelectedRows, TableRowCore[] deselectedRows) boolean
abstract void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.ui.common.table.TableStructureModificationListener
columnOrderChanged, columnSizeChanged, sortOrderChanged
Methods inherited from interface com.biglybt.ui.common.table.TableView
canHaveSubItems, clipboardSelected, getLineHeight, getMaxItemShown, getRow, getRowDefaultHeight, getTableCellWithCursor, getTableRowWithCursor, getTableViewCreator, getVisibleRows, hasChangesPending, isDisposed, isRowVisible, scrollVertically, setEnabled, setEnableTabViews, setMaxItemShown, setRowDefaultHeight, setRowDefaultHeightEM, setRowDefaultHeightPX, showRow
-
Field Details
-
LOGID
-
DEBUG_SORTER
private static final boolean DEBUG_SORTER- See Also:
-
DEBUGADDREMOVE
public static final boolean DEBUGADDREMOVEHelpful output when trying to debug add/removal of rows -
DEBUG_SELECTION
public static final boolean DEBUG_SELECTION- See Also:
-
CFG_SORTDIRECTION
- See Also:
-
configMan
-
confusableFiltering
private static boolean confusableFiltering -
rowSorterRunnable
-
rowSorter
-
tableID
TableID (fromTableManager
) of the table this class is handling. Config settings are stored with the prefix of "Table.TableID" -
textPrefixID
Prefix for retrieving text from the properties file (MessageText) Typically TableID + "View" -
classPluginDataSourceType
-
bReallyAddingDataSources
private boolean bReallyAddingDataSources -
sortColumns
Sorting functions -
lLastSortedOn
private long lLastSortedOnTimeStamp of when last sorted all the rows was -
listeners_mon
-
listenersRowRefesh
-
listenersDataSourceChanged
-
listenersSelection
-
listenersLifeCycle
-
listenersRefresh
-
listenersCountChange
-
listenersExpansionChange
-
parentDataSource
-
rows_sync
-
sortedRows
Filtered rows in the table -
mapDataSourceToRow
Link DataSource to their row in the table. key = DataSource value = TableRowSWT -
listUnfilteredDataSources
-
dataSourcesToAdd
Queue added datasources and add them on refresh -
dataSourcesToRemove
Queue removed datasources and add them on refresh -
datsaSourceQueueProcessingCount
-
filter
-
processDataSourceQueueCallback
-
basicItems
Basic (pre-defined) Column Definitions -
tableColumns
All Column Definitions. The array is not necessarily in column order -
columnsOrdered
We need to remember the order of the columns at the time we added them in case the user drags the columns around. -
selectedRows
Up to date list of selected rows, so we can access rows without being on SWT Thread. Guaranteed to have no nulls -
listSelectedCoreDataSources
-
headerVisible
private boolean headerVisible -
historyBefore
-
historyAfter
-
dispatcher
-
visibleRowChangeDisabled
-
-
Constructor Details
-
TableViewImpl
public TableViewImpl(Class<?> pluginDataSourceType, String _sTableID, String _sTextPrefixID, Object rows_sync, TableColumnCore[] _basicItems)
-
-
Method Details
-
initializeColumnDefs
private void initializeColumnDefs() -
addSelectionListener
- Specified by:
addSelectionListener
in interfaceTableView<DATASOURCETYPE>
- Parameters:
listener
-
-
addTableDataSourceChangedListener
Description copied from interface:TableView
The data set that this table represents has been changed. This is not for listening on changes to data sources changing within the table- Specified by:
addTableDataSourceChangedListener
in interfaceTableView<DATASOURCETYPE>
- Parameters:
l
-trigger
-
-
removeTableDataSourceChangedListener
- Specified by:
removeTableDataSourceChangedListener
in interfaceTableView<DATASOURCETYPE>
- Parameters:
l
-
-
setParentDataSource
- Specified by:
setParentDataSource
in interfaceTableView<DATASOURCETYPE>
- Parameters:
newDataSource
-
-
getParentDataSource
- Specified by:
getParentDataSource
in interfaceTableView<DATASOURCETYPE>
-
triggerDefaultSelectedListeners
- Parameters:
selectedRows
-
-
triggerLifeCycleListener
protected void triggerLifeCycleListener(int eventType) - Parameters:
eventType
-
-
triggerSelectionChangeListeners
public void triggerSelectionChangeListeners(TableRowCore[] selected_rows, TableRowCore[] deselected_rows) -
triggerSelectionListeners
-
triggerDeselectionListeners
-
triggerMouseEnterExitRow
-
triggerFocusChangedListeners
-
triggerFocusRequested
protected void triggerFocusRequested() -
triggerTableRefreshListeners
protected void triggerTableRefreshListeners() -
addLifeCycleListener
- Specified by:
addLifeCycleListener
in interfaceTableView<DATASOURCETYPE>
-
addRefreshListener
- Specified by:
addRefreshListener
in interfaceTableView<DATASOURCETYPE>
-
addCountChangeListener
- Specified by:
addCountChangeListener
in interfaceTableView<DATASOURCETYPE>
- Parameters:
listener
-
-
removeCountChangeListener
- Specified by:
removeCountChangeListener
in interfaceTableView<DATASOURCETYPE>
-
triggerListenerRowAdded
-
triggerListenerRowRemoved
-
addExpansionChangeListener
- Specified by:
addExpansionChangeListener
in interfaceTableView<DATASOURCETYPE>
-
removeExpansionChangeListener
- Specified by:
removeExpansionChangeListener
in interfaceTableView<DATASOURCETYPE>
-
invokeExpansionChangeListeners
-
addRefreshListener
-
removeRefreshListener
-
invokeRefreshListeners
-
runForAllRows
Description copied from interface:TableView
For every row source, run the code provided by the specified parameter.- Specified by:
runForAllRows
in interfaceTableView<DATASOURCETYPE>
- Parameters:
runner
- Code to run for each row/datasource
-
runForAllRows
-
runForAllRows
Description copied from interface:TableView
For every row source, run the code provided by the specified parameter.- Specified by:
runForAllRows
in interfaceTableView<DATASOURCETYPE>
- Parameters:
runner
- Code to run for each row/datasource
-
runForSelectedRows
For each row source that the user has selected, run the code provided by the specified parameter.- Specified by:
runForSelectedRows
in interfaceTableView<DATASOURCETYPE>
- Parameters:
runner
- Code to run for each selected row/datasource
-
isUnfilteredDataSourceAdded
- Specified by:
isUnfilteredDataSourceAdded
in interfaceTableView<DATASOURCETYPE>
-
refilter
public boolean refilter() -
isFiltered
-
getFilterSubRows
protected abstract boolean getFilterSubRows() -
redrawTable
protected abstract void redrawTable() -
debug
-
_processDataSourceQueue
private void _processDataSourceQueue(boolean refocus) -
addDataSource
Description copied from interface:TableView
Adds a dataSource to the table as a new row. If the data source is already added, a new row will not be added. This function runs asynchronously, so the rows creation is not guaranteed directly after calling this function. You can't add datasources until the table is initialized- Specified by:
addDataSource
in interfaceTableView<DATASOURCETYPE>
- Parameters:
dataSource
- data source to add to the table
-
addDataSource
-
addDataSources
Description copied from interface:TableView
Add a list of dataSources to the table. The array passed in may be modified, so make sure you don't need it afterwards. You can't add datasources until the table is initialized- Specified by:
addDataSources
in interfaceTableView<DATASOURCETYPE>
- Parameters:
dataSources
-
-
addDataSources
-
filterCheck
-
hasPendingDSChanges
protected boolean hasPendingDSChanges() -
dataSourceExists
- Specified by:
dataSourceExists
in interfaceTableView<DATASOURCETYPE>
- Parameters:
dataSource
-- Returns:
-
processDataSourceQueue
public void processDataSourceQueue()Description copied from interface:TableView
Process the queue of datasources to be added and removed- Specified by:
processDataSourceQueue
in interfaceTableView<DATASOURCETYPE>
-
processDataSourceQueue
public void processDataSourceQueue(boolean refocus) Description copied from interface:TableView
Process the queue of datasources to be added and removed- Specified by:
processDataSourceQueue
in interfaceTableView<DATASOURCETYPE>
- Parameters:
refocus
- If selected were in focus, ensure they remain in focus
-
getOffUIThread
-
processDataSourceQueueSync
public void processDataSourceQueueSync()- Specified by:
processDataSourceQueueSync
in interfaceTableView<DATASOURCETYPE>
-
size
public int size(boolean bIncludeQueue) - Specified by:
size
in interfaceTableView<DATASOURCETYPE>
- Parameters:
bIncludeQueue
-- Returns:
-
getRows
Description copied from interface:TableView
Get all the rows for this table, in the order they are displayed- Specified by:
getRows
in interfaceTableView<DATASOURCETYPE>
- Returns:
- a list of TableRowSWT objects in the order the user sees them
-
getRowsAndSubRows
- Specified by:
getRowsAndSubRows
in interfaceTableView<DATASOURCETYPE>
-
getRowsAndSubRows
private void getRowsAndSubRows(List<TableRowCore> result, TableRowCore[] rows, boolean includeHidden) -
numberAllVisibleRows
protected boolean numberAllVisibleRows() -
numberAllVisibleRows
-
getRowAndSubRowCount
public int[] getRowAndSubRowCount()- Specified by:
getRowAndSubRowCount
in interfaceTableView<DATASOURCETYPE>
-
getRowAndSubRowCount
-
getRow
Description copied from interface:TableView
Get the row associated with a datasource- Specified by:
getRow
in interfaceTableView<DATASOURCETYPE>
- Parameters:
dataSource
- a reference to a core Datasource object (not a plugin datasource object)- Returns:
- The row, or null
-
getRow
- Specified by:
getRow
in interfaceTableView<DATASOURCETYPE>
- Parameters:
iPos
-- Returns:
-
getRowQuick
-
indexOf
- Specified by:
indexOf
in interfaceTableView<DATASOURCETYPE>
- Parameters:
row
-- Returns:
-
getRowCount
public int getRowCount()- Specified by:
getRowCount
in interfaceTableView<DATASOURCETYPE>
-
getDataSources
- Specified by:
getDataSources
in interfaceTableView<DATASOURCETYPE>
- Returns:
- a new, unsorted Hashset of all datasources
-
getDataSources
- Specified by:
getDataSources
in interfaceTableView<DATASOURCETYPE>
- Returns:
- a new, unsorted Hashset of datasources
-
removeDataSource
- Specified by:
removeDataSource
in interfaceTableView<DATASOURCETYPE>
- Parameters:
dataSource
-
-
removeDataSources
Remove the specified dataSource from the table.- Specified by:
removeDataSources
in interfaceTableView<DATASOURCETYPE>
- Parameters:
dataSources
- data sources to be removed
-
refreshenProcessDataSourcesTimer
private void refreshenProcessDataSourcesTimer() -
reallyAddDataSources
-
createNewRow
-
delete
public void delete()- Specified by:
delete
in interfaceTableView<DATASOURCETYPE>
-
getRowsSync
-
generate
- Specified by:
generate
in interfaceAEDiagnosticsEvidenceGenerator
-
removeAllTableRows
public void removeAllTableRows()Description copied from interface:TableView
Remove all the data sources (table rows) from the table.- Specified by:
removeAllTableRows
in interfaceTableView<DATASOURCETYPE>
-
reallyRemoveDataSources
-
tableMutated
public void tableMutated() -
fillRowGaps
protected void fillRowGaps(boolean bForceDataRefresh) -
sortRows
public void sortRows(boolean bForceDataRefresh, boolean async) Description copied from interface:TableView
Sort rows using the columns specified inTableView.getSortColumns()
- Specified by:
sortRows
in interfaceTableView<DATASOURCETYPE>
-
_sortColumn
protected void _sortColumn(boolean bForceDataRefresh, boolean bFillGapsOnly, boolean bFollowSelected) -
visibleRowsChanged
public abstract void visibleRowsChanged() -
visibleRowChangeDisabled
public boolean visibleRowChangeDisabled() -
uiRemoveRows
-
uiGuessMaxVisibleRows
public abstract int uiGuessMaxVisibleRows() -
resetLastSortedOn
public void resetLastSortedOn()- Specified by:
resetLastSortedOn
in interfaceTableView<DATASOURCETYPE>
-
getColumnCells
Description copied from interface:TableView
Retrieve a list ofTableCell
s, in the last sorted order. The order will not be of the supplied cell's sort unless the table has been sorted by that column previously.ie. You can sort on the 5th column, and retrieve the cells for the 3rd column, but they will be in order of the 5th columns sort.
- Specified by:
getColumnCells
in interfaceTableView<DATASOURCETYPE>
- Returns:
- array of cells
-
addSortedDataSource
-
cellInvalidate
- Specified by:
cellInvalidate
in interfaceTableStructureModificationListener<DATASOURCETYPE>
-
cellInvalidate
public void cellInvalidate(TableColumnCore tableColumn, DATASOURCETYPE data_source, boolean bMustRefresh) -
columnInvalidate
Description copied from interface:TableView
Invalidate all the cells in a column- Specified by:
columnInvalidate
in interfaceTableView<DATASOURCETYPE>
- Parameters:
sColumnName
- Name of column to invalidate
-
columnInvalidate
- Specified by:
columnInvalidate
in interfaceTableView<DATASOURCETYPE>
-
columnInvalidate
-
columnInvalidate
- Specified by:
columnInvalidate
in interfaceTableStructureModificationListener<DATASOURCETYPE>
- Specified by:
columnInvalidate
in interfaceTableView<DATASOURCETYPE>
- Parameters:
tableColumn
-
-
getTextPrefixID
- Specified by:
getTextPrefixID
in interfaceTableView<DATASOURCETYPE>
- Returns:
- Prefix for i18n strings. Typically
TableView.getTableID()
+ "View"
-
getTableID
- Specified by:
getTableID
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getDataSourceType
- Specified by:
getDataSourceType
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
tableStructureChanged
- Specified by:
tableStructureChanged
in interfaceTableStructureModificationListener<DATASOURCETYPE>
-
getTableColumn
- Specified by:
getTableColumn
in interfaceTableView<DATASOURCETYPE>
- Parameters:
sColumnName
-- Returns:
-
getTableColumn
- Specified by:
getTableColumn
in interfaceTableView<DATASOURCETYPE>
-
getVisibleColumns
- Specified by:
getVisibleColumns
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getAllColumns
- Specified by:
getAllColumns
in interfaceTableView<DATASOURCETYPE>
-
setColumnsOrdered
-
isColumnVisible
- Specified by:
isColumnVisible
in interfaceTableView<DATASOURCETYPE>
-
refreshTable
public void refreshTable(boolean bForceSort) - Specified by:
refreshTable
in interfaceTableView<DATASOURCETYPE>
- Parameters:
bForceSort
-
-
getSelectedDataSourcesList
-
getSelectedPluginDataSourcesList
Returns an array of all selected Data Sources. Null data sources are ommitted.- Returns:
- an array containing the selected data sources
-
getSelectedDataSources
Returns an array of all selected Data Sources. Null data sources are ommitted.- Specified by:
getSelectedDataSources
in interfaceTableView<DATASOURCETYPE>
- Returns:
- an array containing the selected data sources
-
getSelectedDataSources
Description copied from interface:TableView
Returns an array of all selected Data Sources. Null data sources are ommitted.- Specified by:
getSelectedDataSources
in interfaceTableView<DATASOURCETYPE>
- Parameters:
bCoreDataSource
-- Returns:
- an array containing the selected data sources
-
getSelectedRows
Description copied from interface:TableView
Returns an array of all selected TableRowSWT. Null data sources are ommitted.- Specified by:
getSelectedRows
in interfaceTableView<DATASOURCETYPE>
- Returns:
- an array containing the selected data sources
- See Also:
-
getSelectedRowsSize
public int getSelectedRowsSize()- Specified by:
getSelectedRowsSize
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getSelectedRowsList
Returns an list of all selected TableRowSWT objects. Null data sources are ommitted.- Returns:
- an list containing the selected TableRowSWT objects
-
isSelected
- Specified by:
isSelected
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getFocusedRow
- Specified by:
getFocusedRow
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getFirstSelectedDataSource
- Specified by:
getFirstSelectedDataSource
in interfaceTableView<DATASOURCETYPE>
-
getFirstSelectedDataSource
Returns the first selected data sources.- Returns:
- the first selected data source, or null if no data source is selected
-
tableInvalidate
public void tableInvalidate()Invalidate and refresh whole table -
getHeaderVisible
public boolean getHeaderVisible()- Specified by:
getHeaderVisible
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
setHeaderVisible
public void setHeaderVisible(boolean visible) - Specified by:
setHeaderVisible
in interfaceTableView<DATASOURCETYPE>
- Parameters:
visible
-
-
hasSortColumn
- Specified by:
hasSortColumn
in interfaceTableView<DATASOURCETYPE>
-
getSortColumnCount
public int getSortColumnCount()- Specified by:
getSortColumnCount
in interfaceTableView<DATASOURCETYPE>
-
getSortColumns
- Specified by:
getSortColumns
in interfaceTableView<DATASOURCETYPE>
-
addSortColumn
Description copied from interface:TableView
Add a column to the sorting. If the column already is in the sort list, flip its order- Specified by:
addSortColumn
in interfaceTableView<DATASOURCETYPE>
-
setSortColumns
- Specified by:
setSortColumns
in interfaceTableView<DATASOURCETYPE>
-
setSortColumns
private boolean setSortColumns(TableColumnCore[] newSortColumns, boolean allowOrderChange, Map<TableColumnCore, Boolean> originalAscMap, boolean doHistory) -
setRowSelected
-
setSelectedRows
-
setSelectedRows
private void setSelectedRows(TableRowCore[] newSelectionArray, boolean trigger, boolean updateHistory) -
reaffirmSelection
protected void reaffirmSelection() -
isSingleSelection
public abstract boolean isSingleSelection() -
uiSelectionChanged
public abstract void uiSelectionChanged(TableRowCore[] newlySelectedRows, TableRowCore[] deselectedRows) -
setSelectedRows
- Specified by:
setSelectedRows
in interfaceTableView<DATASOURCETYPE>
-
selectAll
public void selectAll()Description copied from interface:TableView
Does not fire off selection events- Specified by:
selectAll
in interfaceTableView<DATASOURCETYPE>
-
getFilterText
-
isMenuEnabled
public boolean isMenuEnabled() -
setMenuEnabled
public void setMenuEnabled(boolean menuEnabled) -
isLastRow
-
triggerTabViewsDataSourceChanged
public abstract void triggerTabViewsDataSourceChanged() -
uiChangeColumnIndicator
protected abstract void uiChangeColumnIndicator() -
isTableSelected
public boolean isTableSelected()- Specified by:
isTableSelected
in interfaceTableView<DATASOURCETYPE>
-
isTableFocused
protected abstract boolean isTableFocused() -
canMoveBack
public boolean canMoveBack()- Specified by:
canMoveBack
in interfaceTableView<DATASOURCETYPE>
-
moveBack
public void moveBack()- Specified by:
moveBack
in interfaceTableView<DATASOURCETYPE>
-
canMoveForward
public boolean canMoveForward()- Specified by:
canMoveForward
in interfaceTableView<DATASOURCETYPE>
-
moveForward
public void moveForward()- Specified by:
moveForward
in interfaceTableView<DATASOURCETYPE>
-
addHistory
-