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 classprivate static interfaceprivate classprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TableColumnCore[]Basic (pre-defined) Column Definitionsprivate booleanprivate static final Stringprivate 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 ConfigurationManagerprivate static booleanprivate IdentityHashMap<DATASOURCETYPE, String> Queue added datasources and add them on refreshprivate IdentityHashMap<DATASOURCETYPE, String> Queue removed datasources and add them on refreshprivate AtomicIntegerstatic final booleanprivate static final booleanstatic final booleanHelpful output when trying to debug add/removal of rowsprivate static AsyncDispatcherprotected TableViewImpl.filter<DATASOURCETYPE> private booleanprivate LinkedList<TableViewImpl.HistoryEntry> private LinkedList<TableViewImpl.HistoryEntry> private AEMonitorprivate CopyOnWriteList<TableCountChangeListener> private CopyOnWriteList<TableLifeCycleListener> private CopyOnWriteList<TableRefreshListener> private ArrayList<TableRowRefreshListener> private CopyOnWriteList<TableSelectionListener> private IdentityHashMap<DATASOURCETYPE, String> private longTimeStamp of when last sorted all the rows wasprivate static final LogIDsprivate IdentityHashMap<DATASOURCETYPE, TableRowCore> Link DataSource to their row in the table.private booleanprivate Objectprivate final Objectprivate FrequencyLimitedDispatcherprivate TableViewImpl<DATASOURCETYPE>.rowSorterRunnableprivate 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 StringTableID (fromTableManager) of the table this class is handling.private StringPrefix 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) voidvoidaddDataSource(DATASOURCETYPE dataSource) Adds a dataSource to the table as a new row.private voidaddDataSource(DATASOURCETYPE dataSource, boolean skipFilterCheck) voidaddDataSources(DATASOURCETYPE[] dataSources) Add a list of dataSources to the table.private voidaddDataSources(DATASOURCETYPE[] dataSources, boolean skipFilterCheck) voidprivate voidvoidvoidaddRefreshListener(TableRowRefreshListener listener) voidaddRefreshListener(TableRefreshListener l, boolean trigger) voidaddSelectionListener(TableSelectionListener listener, boolean bFireSelection) voidaddSortColumn(TableColumnCore column) Add a column to the sorting.private voidaddSortedDataSource(Object[] dataSources) voidaddTableDataSourceChangedListener(TableDataSourceChangedListener l, boolean trigger) The data set that this table represents has been changed.booleanbooleanvoidcellInvalidate(TableColumnCore tableColumn, DATASOURCETYPE data_source) voidcellInvalidate(TableColumnCore tableColumn, DATASOURCETYPE data_source, boolean bMustRefresh) voidcolumnInvalidate(TableColumnCore tableColumn) voidcolumnInvalidate(TableColumnCore tableColumn, boolean bMustRefresh) voidcolumnInvalidate(String sColumnName) Invalidate all the cells in a columnvoidcolumnInvalidate(String sColumnName, boolean mustRefresh) abstract TableRowCorecreateNewRow(Object object) booleandataSourceExists(DATASOURCETYPE dataSource) protected voidvoiddelete()protected voidfillRowGaps(boolean bForceDataRefresh) (package private) booleanvoidgenerate(IndentWriter writer) getColumnCells(String sColumnName) Retrieve a list ofgetDataSources(boolean include_filtered) Class<?> protected abstract booleangetFirstSelectedDataSource(boolean bCoreObject) Returns the first selected data sources.booleanabstract voidgetOffUIThread(AERunnable runnable) getRow(int iPos) getRow(DATASOURCETYPE dataSource) Get the row associated with a datasourceint[]private voidgetRowAndSubRowCount(TableRowCore[] rows, int[] result, boolean isHidden) intgetRowQuick(int iPos) getRows()Get all the rows for this table, in the order they are displayedgetRowsAndSubRows(boolean includeHidden) private voidgetRowsAndSubRows(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.intintgetTableColumn(String sColumnName) getTableColumn(String sColumnName, boolean localized) protected booleanbooleanhasSortColumn(TableColumn column) intindexOf(TableRowCore row) private voidvoidinvokeExpansionChangeListeners(TableRowCore row, boolean expanded) voidbooleanisColumnVisible(TableColumn column) booleanprotected booleanisLastRow(TableRowCore row) booleanbooleanisSelected(TableRow row) abstract booleanprotected abstract booleanbooleanbooleanvoidmoveBack()voidprotected booleanprivate intnumberAllVisibleRows(TableRowCore[] rows, int pos) voidProcess the queue of datasources to be added and removedvoidprocessDataSourceQueue(boolean refocus) Process the queue of datasources to be added and removedvoidprotected voidprivate voidreallyAddDataSources(Object[] dataSources) private voidreallyRemoveDataSources(Object[] dataSources) protected abstract voidbooleanrefilter()private voidvoidrefreshTable(boolean bForceSort) voidRemove all the data sources (table rows) from the table.voidvoidremoveDataSource(DATASOURCETYPE dataSource) voidremoveDataSources(DATASOURCETYPE[] dataSources) Remove the specified dataSource from the table.voidvoidremoveRefreshListener(TableRowRefreshListener listener) voidvoidintrunForAllRows(TableGroupRowRunner runner) For every row source, run the code provided by the specified parameter.private intrunForAllRows(TableGroupRowRunner runner, boolean doSubRows) intFor every row source, run the code provided by the specified parameter.intFor each row source that the user has selected, run the code provided by the specified parameter.private voidsafeSort()voidDoes not fire off selection eventsvoidsetColumnsOrdered(TableColumnCore[] columnsOrdered) voidsetHeaderVisible(boolean visible) voidsetMenuEnabled(boolean menuEnabled) voidsetParentDataSource(Object newDataSource) voidsetRowSelected(TableRowCore row, boolean selected, boolean trigger) voidsetSelectedRows(TableRowCore[] rows) voidsetSelectedRows(TableRowCore[] newSelectionArray, boolean trigger) private voidsetSelectedRows(TableRowCore[] newSelectionArray, boolean trigger, boolean updateHistory) booleansetSortColumns(TableColumnCore[] newSortColumns, boolean allowOrderChange) private booleansetSortColumns(TableColumnCore[] newSortColumns, boolean allowOrderChange, Map<TableColumnCore, Boolean> originalAscMap, boolean doHistory) intsize(boolean bIncludeQueue) voidsortRows(boolean bForceDataRefresh, boolean async) Sort rows using the columns specified inTableView.getSortColumns()voidInvalidate and refresh whole tablevoidvoidtableStructureChanged(boolean columnAddedOrRemoved, Class forPluginDataSourceType) voidtriggerDefaultSelectedListeners(TableRowCore[] selectedRows, int keyMask, int origin) protected voidprotected voidprotected voidprotected voidtriggerLifeCycleListener(int eventType) voidtriggerListenerRowAdded(TableRowCore[] rows) protected voidprotected voidtriggerMouseEnterExitRow(TableRowCore row, boolean enter) voidtriggerSelectionChangeListeners(TableRowCore[] selected_rows, TableRowCore[] deselected_rows) protected voidprotected voidabstract voidprotected abstract voidabstract intabstract voiduiRemoveRows(TableRowCore[] rows, Integer[] rowIndexes) abstract voiduiSelectionChanged(TableRowCore[] newlySelectedRows, TableRowCore[] deselectedRows) booleanabstract voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TableStructureModificationListener
columnOrderChanged, columnSizeChanged, sortOrderChangedMethods inherited from interface 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:
addSelectionListenerin interfaceTableView<DATASOURCETYPE>- Parameters:
listener-
-
addTableDataSourceChangedListener
Description copied from interface:TableViewThe 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:
addTableDataSourceChangedListenerin interfaceTableView<DATASOURCETYPE>- Parameters:
l-trigger-
-
removeTableDataSourceChangedListener
- Specified by:
removeTableDataSourceChangedListenerin interfaceTableView<DATASOURCETYPE>- Parameters:
l-
-
setParentDataSource
- Specified by:
setParentDataSourcein interfaceTableView<DATASOURCETYPE>- Parameters:
newDataSource-
-
getParentDataSource
- Specified by:
getParentDataSourcein 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:
addLifeCycleListenerin interfaceTableView<DATASOURCETYPE>
-
addRefreshListener
- Specified by:
addRefreshListenerin interfaceTableView<DATASOURCETYPE>
-
addCountChangeListener
- Specified by:
addCountChangeListenerin interfaceTableView<DATASOURCETYPE>- Parameters:
listener-
-
removeCountChangeListener
- Specified by:
removeCountChangeListenerin interfaceTableView<DATASOURCETYPE>
-
triggerListenerRowAdded
-
triggerListenerRowRemoved
-
addExpansionChangeListener
- Specified by:
addExpansionChangeListenerin interfaceTableView<DATASOURCETYPE>
-
removeExpansionChangeListener
- Specified by:
removeExpansionChangeListenerin interfaceTableView<DATASOURCETYPE>
-
invokeExpansionChangeListeners
-
addRefreshListener
-
removeRefreshListener
-
invokeRefreshListeners
-
runForAllRows
Description copied from interface:TableViewFor every row source, run the code provided by the specified parameter.- Specified by:
runForAllRowsin interfaceTableView<DATASOURCETYPE>- Parameters:
runner- Code to run for each row/datasource
-
runForAllRows
-
runForAllRows
Description copied from interface:TableViewFor every row source, run the code provided by the specified parameter.- Specified by:
runForAllRowsin 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:
runForSelectedRowsin interfaceTableView<DATASOURCETYPE>- Parameters:
runner- Code to run for each selected row/datasource
-
isUnfilteredDataSourceAdded
- Specified by:
isUnfilteredDataSourceAddedin 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:TableViewAdds 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:
addDataSourcein interfaceTableView<DATASOURCETYPE>- Parameters:
dataSource- data source to add to the table
-
addDataSource
-
addDataSources
Description copied from interface:TableViewAdd 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:
addDataSourcesin interfaceTableView<DATASOURCETYPE>- Parameters:
dataSources-
-
addDataSources
-
filterCheck
-
hasPendingDSChanges
protected boolean hasPendingDSChanges() -
dataSourceExists
- Specified by:
dataSourceExistsin interfaceTableView<DATASOURCETYPE>- Parameters:
dataSource-- Returns:
-
processDataSourceQueue
public void processDataSourceQueue()Description copied from interface:TableViewProcess the queue of datasources to be added and removed- Specified by:
processDataSourceQueuein interfaceTableView<DATASOURCETYPE>
-
processDataSourceQueue
public void processDataSourceQueue(boolean refocus) Description copied from interface:TableViewProcess the queue of datasources to be added and removed- Specified by:
processDataSourceQueuein interfaceTableView<DATASOURCETYPE>- Parameters:
refocus- If selected were in focus, ensure they remain in focus
-
getOffUIThread
-
processDataSourceQueueSync
public void processDataSourceQueueSync()- Specified by:
processDataSourceQueueSyncin interfaceTableView<DATASOURCETYPE>
-
size
public int size(boolean bIncludeQueue) - Specified by:
sizein interfaceTableView<DATASOURCETYPE>- Parameters:
bIncludeQueue-- Returns:
-
getRows
Description copied from interface:TableViewGet all the rows for this table, in the order they are displayed- Specified by:
getRowsin interfaceTableView<DATASOURCETYPE>- Returns:
- a list of TableRowSWT objects in the order the user sees them
-
getRowsAndSubRows
- Specified by:
getRowsAndSubRowsin interfaceTableView<DATASOURCETYPE>
-
getRowsAndSubRows
private void getRowsAndSubRows(List<TableRowCore> result, TableRowCore[] rows, boolean includeHidden) -
numberAllVisibleRows
protected boolean numberAllVisibleRows() -
numberAllVisibleRows
-
getRowAndSubRowCount
public int[] getRowAndSubRowCount()- Specified by:
getRowAndSubRowCountin interfaceTableView<DATASOURCETYPE>
-
getRowAndSubRowCount
-
getRow
Description copied from interface:TableViewGet the row associated with a datasource- Specified by:
getRowin interfaceTableView<DATASOURCETYPE>- Parameters:
dataSource- a reference to a core Datasource object (not a plugin datasource object)- Returns:
- The row, or null
-
getRow
- Specified by:
getRowin interfaceTableView<DATASOURCETYPE>- Parameters:
iPos-- Returns:
-
getRowQuick
-
indexOf
- Specified by:
indexOfin interfaceTableView<DATASOURCETYPE>- Parameters:
row-- Returns:
-
getRowCount
public int getRowCount()- Specified by:
getRowCountin interfaceTableView<DATASOURCETYPE>
-
getDataSources
- Specified by:
getDataSourcesin interfaceTableView<DATASOURCETYPE>- Returns:
- a new, unsorted Hashset of all datasources
-
getDataSources
- Specified by:
getDataSourcesin interfaceTableView<DATASOURCETYPE>- Returns:
- a new, unsorted Hashset of datasources
-
removeDataSource
- Specified by:
removeDataSourcein interfaceTableView<DATASOURCETYPE>- Parameters:
dataSource-
-
removeDataSources
Remove the specified dataSource from the table.- Specified by:
removeDataSourcesin interfaceTableView<DATASOURCETYPE>- Parameters:
dataSources- data sources to be removed
-
refreshenProcessDataSourcesTimer
private void refreshenProcessDataSourcesTimer() -
reallyAddDataSources
-
createNewRow
-
delete
public void delete()- Specified by:
deletein interfaceTableView<DATASOURCETYPE>
-
getRowsSync
-
generate
- Specified by:
generatein interfaceAEDiagnosticsEvidenceGenerator
-
removeAllTableRows
public void removeAllTableRows()Description copied from interface:TableViewRemove all the data sources (table rows) from the table.- Specified by:
removeAllTableRowsin 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:TableViewSort rows using the columns specified inTableView.getSortColumns()- Specified by:
sortRowsin 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:
resetLastSortedOnin interfaceTableView<DATASOURCETYPE>
-
getColumnCells
Description copied from interface:TableViewRetrieve 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:
getColumnCellsin interfaceTableView<DATASOURCETYPE>- Returns:
- array of cells
-
addSortedDataSource
-
safeSort
private void safeSort() -
cellInvalidate
- Specified by:
cellInvalidatein interfaceTableStructureModificationListener<DATASOURCETYPE>
-
cellInvalidate
public void cellInvalidate(TableColumnCore tableColumn, DATASOURCETYPE data_source, boolean bMustRefresh) -
columnInvalidate
Description copied from interface:TableViewInvalidate all the cells in a column- Specified by:
columnInvalidatein interfaceTableView<DATASOURCETYPE>- Parameters:
sColumnName- Name of column to invalidate
-
columnInvalidate
- Specified by:
columnInvalidatein interfaceTableView<DATASOURCETYPE>
-
columnInvalidate
-
columnInvalidate
- Specified by:
columnInvalidatein interfaceTableStructureModificationListener<DATASOURCETYPE>- Specified by:
columnInvalidatein interfaceTableView<DATASOURCETYPE>- Parameters:
tableColumn-
-
getTextPrefixID
- Specified by:
getTextPrefixIDin interfaceTableView<DATASOURCETYPE>- Returns:
- Prefix for i18n strings. Typically
TableView.getTableID()+ "View"
-
getTableID
- Specified by:
getTableIDin interfaceTableView<DATASOURCETYPE>- Returns:
-
getDataSourceType
- Specified by:
getDataSourceTypein interfaceTableView<DATASOURCETYPE>- Returns:
-
tableStructureChanged
- Specified by:
tableStructureChangedin interfaceTableStructureModificationListener<DATASOURCETYPE>
-
getTableColumn
- Specified by:
getTableColumnin interfaceTableView<DATASOURCETYPE>- Parameters:
sColumnName-- Returns:
-
getTableColumn
- Specified by:
getTableColumnin interfaceTableView<DATASOURCETYPE>
-
getVisibleColumns
- Specified by:
getVisibleColumnsin interfaceTableView<DATASOURCETYPE>- Returns:
-
getAllColumns
- Specified by:
getAllColumnsin interfaceTableView<DATASOURCETYPE>
-
setColumnsOrdered
-
isColumnVisible
- Specified by:
isColumnVisiblein interfaceTableView<DATASOURCETYPE>
-
refreshTable
public void refreshTable(boolean bForceSort) - Specified by:
refreshTablein interfaceTableView<DATASOURCETYPE>- Parameters:
bForceSort-
-
getSelectedDataSourcesList
-
getSelectedPluginDataSourcesList
-
getSelectedDataSources
Returns an array of all selected Data Sources. Null data sources are ommitted.- Specified by:
getSelectedDataSourcesin interfaceTableView<DATASOURCETYPE>- Returns:
- an array containing the selected data sources
-
getSelectedDataSources
Description copied from interface:TableViewReturns an array of all selected Data Sources. Null data sources are ommitted.- Specified by:
getSelectedDataSourcesin interfaceTableView<DATASOURCETYPE>- Parameters:
bCoreDataSource-- Returns:
- an array containing the selected data sources
-
getSelectedRows
Description copied from interface:TableViewReturns an array of all selected TableRowSWT. Null data sources are ommitted.- Specified by:
getSelectedRowsin interfaceTableView<DATASOURCETYPE>- Returns:
- an array containing the selected data sources
- See Also:
-
getSelectedRowsSize
public int getSelectedRowsSize()- Specified by:
getSelectedRowsSizein 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:
isSelectedin interfaceTableView<DATASOURCETYPE>- Returns:
-
getFocusedRow
- Specified by:
getFocusedRowin interfaceTableView<DATASOURCETYPE>- Returns:
-
getFirstSelectedDataSource
- Specified by:
getFirstSelectedDataSourcein 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:
getHeaderVisiblein interfaceTableView<DATASOURCETYPE>- Returns:
-
setHeaderVisible
public void setHeaderVisible(boolean visible) - Specified by:
setHeaderVisiblein interfaceTableView<DATASOURCETYPE>- Parameters:
visible-
-
hasSortColumn
- Specified by:
hasSortColumnin interfaceTableView<DATASOURCETYPE>
-
getSortColumnCount
public int getSortColumnCount()- Specified by:
getSortColumnCountin interfaceTableView<DATASOURCETYPE>
-
getSortColumns
- Specified by:
getSortColumnsin interfaceTableView<DATASOURCETYPE>
-
addSortColumn
Description copied from interface:TableViewAdd a column to the sorting. If the column already is in the sort list, flip its order- Specified by:
addSortColumnin interfaceTableView<DATASOURCETYPE>
-
setSortColumns
- Specified by:
setSortColumnsin 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:
setSelectedRowsin interfaceTableView<DATASOURCETYPE>
-
selectAll
public void selectAll()Description copied from interface:TableViewDoes not fire off selection events- Specified by:
selectAllin 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:
isTableSelectedin interfaceTableView<DATASOURCETYPE>
-
isTableFocused
protected abstract boolean isTableFocused() -
canMoveBack
public boolean canMoveBack()- Specified by:
canMoveBackin interfaceTableView<DATASOURCETYPE>
-
moveBack
public void moveBack()- Specified by:
moveBackin interfaceTableView<DATASOURCETYPE>
-
canMoveForward
public boolean canMoveForward()- Specified by:
canMoveForwardin interfaceTableView<DATASOURCETYPE>
-
moveForward
public void moveForward()- Specified by:
moveForwardin interfaceTableView<DATASOURCETYPE>
-
addHistory
-