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 java.lang.Object implements TableView<DATASOURCETYPE>, TableStructureModificationListener<DATASOURCETYPE>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TableViewImpl.filter<DATASOURCETYPE>
-
Field Summary
Fields Modifier and Type Field Description private TableColumnCore[]
basicItems
Basic (pre-defined) Column Definitionsprivate boolean
bReallyAddingDataSources
private static java.lang.String
CFG_SORTDIRECTION
private java.lang.Class<?>
classPluginDataSourceType
private TableColumnCore[]
columnsOrdered
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 ConfigurationManager
configMan
private java.util.IdentityHashMap<DATASOURCETYPE,java.lang.String>
dataSourcesToAdd
Queue added datasources and add them on refreshprivate java.util.IdentityHashMap<DATASOURCETYPE,java.lang.String>
dataSourcesToRemove
Queue removed datasources and add them on refreshprivate java.util.concurrent.atomic.AtomicInteger
datsaSourceQueueProcessingCount
static boolean
DEBUG_SELECTION
private static boolean
DEBUG_SORTER
static boolean
DEBUGADDREMOVE
Helpful output when trying to debug add/removal of rowsprotected TableViewImpl.filter<DATASOURCETYPE>
filter
private boolean
headerVisible
private AEMonitor
listeners_mon
private CopyOnWriteList<TableCountChangeListener>
listenersCountChange
private CopyOnWriteList<TableDataSourceChangedListener>
listenersDataSourceChanged
private CopyOnWriteList<TableExpansionChangeListener>
listenersExpansionChange
private CopyOnWriteList<TableLifeCycleListener>
listenersLifeCycle
private CopyOnWriteList<TableRefreshListener>
listenersRefresh
private java.util.ArrayList<TableRowRefreshListener>
listenersRowRefesh
private CopyOnWriteList<TableSelectionListener>
listenersSelection
private java.util.List<java.lang.Object>
listSelectedCoreDataSources
private java.util.IdentityHashMap<DATASOURCETYPE,java.lang.String>
listUnfilteredDataSources
private long
lLastSortedOn
TimeStamp of when last sorted all the rows wasprivate static LogIDs
LOGID
private java.util.IdentityHashMap<DATASOURCETYPE,TableRowCore>
mapDataSourceToRow
Link DataSource to their row in the table.private boolean
menuEnabled
private java.lang.Object
parentDataSource
private DataSourceCallBackUtil.addDataSourceCallback
processDataSourceQueueCallback
protected java.lang.String
propertiesPrefix
Prefix for retrieving text from the properties file (MessageText) Typically TableID + "View"private boolean
provideIndexesOnRemove
private java.lang.Object
rows_sync
private java.util.List<TableRowCore>
selectedRows
Up to date list of selected rows, so we can access rows without being on SWT Thread.private java.util.List<TableColumnCore>
sortColumns
Sorting functionsprivate java.util.List<TableRowCore>
sortedRows
Filtered rows in the tableprivate TableColumnCore[]
tableColumns
All Column Definitions.protected java.lang.String
tableID
TableID (fromTableManager
) of the table this class is handling.
-
Constructor Summary
Constructors Constructor Description TableViewImpl(java.lang.Class<?> pluginDataSourceType, java.lang.String _sTableID, java.lang.String _sPropertiesPrefix, java.lang.Object rows_sync, TableColumnCore[] _basicItems)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private void
_processDataSourceQueue()
protected void
_sortColumn(boolean bForceDataRefresh, boolean bFillGapsOnly, boolean bFollowSelected)
void
addCountChangeListener(TableCountChangeListener listener)
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
addExpansionChangeListener(TableExpansionChangeListener listener)
void
addLifeCycleListener(TableLifeCycleListener l)
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(java.lang.Object[] dataSources)
void
addTableDataSourceChangedListener(TableDataSourceChangedListener l, boolean trigger)
The data set that this table represents has been changed.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(java.lang.String sColumnName)
Invalidate all the cells in a columnvoid
columnInvalidate(java.lang.String sColumnName, boolean mustRefresh)
abstract TableRowCore
createNewRow(java.lang.Object object)
boolean
dataSourceExists(DATASOURCETYPE dataSource)
protected void
debug(java.lang.String s)
void
delete()
protected void
fillRowGaps(boolean bForceDataRefresh)
void
generate(IndentWriter writer)
TableColumnCore[]
getAllColumns()
TableCellCore[]
getColumnCells(java.lang.String sColumnName)
Retrieve a list ofjava.util.HashSet<DATASOURCETYPE>
getDataSources()
java.util.HashSet<DATASOURCETYPE>
getDataSources(boolean include_filtered)
java.lang.Class<?>
getDataSourceType()
protected abstract boolean
getFilterSubRows()
java.lang.String
getFilterText()
java.lang.Object
getFirstSelectedDataSource()
java.lang.Object
getFirstSelectedDataSource(boolean bCoreObject)
Returns the first selected data sources.TableRowCore
getFocusedRow()
boolean
getHeaderVisible()
abstract void
getOffUIThread(AERunnable runnable)
java.lang.Object
getParentDataSource()
java.lang.String
getPropertiesPrefix()
TableRowCore
getRow(int iPos)
TableRowCore
getRow(DATASOURCETYPE dataSource)
Get the row associated with a datasourceint[]
getRowAndSubRowCount()
private void
getRowAndSubRowCount(TableRowCore[] rows, int[] result, boolean isHidden)
int
getRowCount()
TableRowCore
getRowQuick(int iPos)
TableRowCore[]
getRows()
Get all the rows for this table, in the order they are displayedTableRowCore[]
getRowsAndSubRows(boolean includeHidden)
private void
getRowsAndSubRows(java.util.List<TableRowCore> result, TableRowCore[] rows, boolean includeHidden)
java.lang.Object
getRowsSync()
java.util.List<java.lang.Object>
getSelectedDataSources()
Returns an array of all selected Data Sources.java.lang.Object[]
getSelectedDataSources(boolean bCoreDataSource)
Returns an array of all selected Data Sources.java.util.List<java.lang.Object>
getSelectedDataSourcesList()
java.util.List<java.lang.Object>
getSelectedPluginDataSourcesList()
Returns an array of all selected Data Sources.TableRowCore[]
getSelectedRows()
Returns an array of all selected TableRowSWT.java.util.List<TableRowCore>
getSelectedRowsList()
Returns an list of all selected TableRowSWT objects.int
getSelectedRowsSize()
int
getSortColumnCount()
TableColumnCore[]
getSortColumns()
TableColumn
getTableColumn(java.lang.String sColumnName)
java.lang.String
getTableID()
TableColumnCore[]
getVisibleColumns()
protected boolean
hasPendingDSChanges()
boolean
hasSortColumn(TableColumn column)
int
indexOf(TableRowCore row)
private void
initializeColumnDefs()
void
invokeExpansionChangeListeners(TableRowCore row, boolean expanded)
void
invokeRefreshListeners(TableRowCore row)
boolean
isColumnVisible(TableColumn column)
boolean
isFiltered(DATASOURCETYPE ds)
protected boolean
isLastRow(TableRowCore row)
boolean
isMenuEnabled()
boolean
isProvideIndexesOnRemove()
boolean
isSelected(TableRow row)
abstract boolean
isSingleSelection()
protected abstract boolean
isTableFocused()
boolean
isTableSelected()
boolean
isUnfilteredDataSourceAdded(java.lang.Object ds)
protected boolean
numberAllVisibleRows()
private int
numberAllVisibleRows(TableRowCore[] rows, int pos)
void
processDataSourceQueue()
Process the queue of datasources to be added and removedvoid
processDataSourceQueueSync()
protected void
reaffirmSelection()
private void
reallyAddDataSources(java.lang.Object[] dataSources)
private void
reallyRemoveDataSources(java.lang.Object[] dataSources)
protected abstract void
redrawTable()
void
refilter()
private void
refreshenProcessDataSourcesTimer()
void
refreshTable(boolean bForceSort)
void
removeAllTableRows()
Remove all the data sources (table rows) from the table.void
removeCountChangeListener(TableCountChangeListener listener)
void
removeDataSource(DATASOURCETYPE dataSource)
void
removeDataSources(DATASOURCETYPE[] dataSources)
Remove the specified dataSource from the table.void
removeExpansionChangeListener(TableExpansionChangeListener listener)
void
removeRefreshListener(TableRowRefreshListener listener)
void
removeTableDataSourceChangedListener(TableDataSourceChangedListener l)
void
resetLastSortedOn()
void
runForAllRows(TableGroupRowRunner runner)
For every row source, run the code provided by the specified parameter.private void
runForAllRows(TableGroupRowRunner runner, boolean doSubRows)
void
runForAllRows(TableGroupRowVisibilityRunner runner)
For every row source, run the code provided by the specified parameter.void
runForSelectedRows(TableGroupRowRunner runner)
For each row source that the user has selected, run the code provided by the specified parameter.void
selectAll()
Does not fire off selection eventsvoid
setColumnsOrdered(TableColumnCore[] columnsOrdered)
void
setHeaderVisible(boolean visible)
void
setMenuEnabled(boolean menuEnabled)
void
setParentDataSource(java.lang.Object newDataSource)
void
setProvideIndexesOnRemove(boolean provideIndexesOnRemove)
void
setRowSelected(TableRowCore row, boolean selected, boolean trigger)
void
setSelectedRows(TableRowCore[] rows)
void
setSelectedRows(TableRowCore[] newSelectionArray, boolean trigger)
boolean
setSortColumns(TableColumnCore[] newSortColumns, boolean allowOrderChange)
int
size(boolean bIncludeQueue)
void
sortRows(boolean bForceDataRefresh)
Sort rows using the columns specified inTableView.getSortColumns()
void
tableInvalidate()
Invalidate and refresh whole tablevoid
tableMutated()
void
tableStructureChanged(boolean columnAddedOrRemoved, java.lang.Class forPluginDataSourceType)
void
triggerDefaultSelectedListeners(TableRowCore[] selectedRows, int keyMask, int origin)
protected void
triggerDeselectionListeners(TableRowCore[] rows)
protected void
triggerFocusChangedListeners(TableRowCore row)
protected void
triggerLifeCycleListener(int eventType)
void
triggerListenerRowAdded(TableRowCore[] rows)
protected void
triggerListenerRowRemoved(TableRowCore row)
protected void
triggerMouseEnterExitRow(TableRowCore row, boolean enter)
void
triggerSelectionChangeListeners(TableRowCore[] selected_rows, TableRowCore[] deselected_rows)
protected void
triggerSelectionListeners(TableRowCore[] rows)
protected void
triggerTableRefreshListeners()
abstract void
triggerTabViewsDataSourceChanged()
protected abstract void
uiChangeColumnIndicator()
abstract int
uiGuessMaxVisibleRows()
abstract void
uiRemoveRows(TableRowCore[] rows, java.lang.Integer[] rowIndexes)
abstract void
uiSelectionChanged(TableRowCore[] newlySelectedRows, TableRowCore[] deselectedRows)
abstract void
visibleRowsChanged()
-
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, getMaxItemShown, getRow, getRowDefaultHeight, getTableCellWithCursor, getTableRowWithCursor, getTableViewCreator, getVisibleRows, hasChangesPending, isDisposed, isRowVisible, scrollVertically, setEnabled, setEnableTabViews, setMaxItemShown, setRowDefaultHeight, setRowDefaultHeightEM, setRowDefaultHeightPX
-
-
-
-
Field Detail
-
LOGID
private static final LogIDs LOGID
-
DEBUG_SORTER
private static final boolean DEBUG_SORTER
- See Also:
- Constant Field Values
-
DEBUGADDREMOVE
public static final boolean DEBUGADDREMOVE
Helpful output when trying to debug add/removal of rows
-
DEBUG_SELECTION
public static final boolean DEBUG_SELECTION
- See Also:
- Constant Field Values
-
CFG_SORTDIRECTION
private static final java.lang.String CFG_SORTDIRECTION
- See Also:
- Constant Field Values
-
configMan
protected static final ConfigurationManager configMan
-
tableID
protected java.lang.String tableID
TableID (fromTableManager
) of the table this class is handling. Config settings are stored with the prefix of "Table.TableID"
-
propertiesPrefix
protected java.lang.String propertiesPrefix
Prefix for retrieving text from the properties file (MessageText) Typically TableID + "View"
-
classPluginDataSourceType
private final java.lang.Class<?> classPluginDataSourceType
-
bReallyAddingDataSources
private boolean bReallyAddingDataSources
-
sortColumns
private final java.util.List<TableColumnCore> sortColumns
Sorting functions
-
lLastSortedOn
private long lLastSortedOn
TimeStamp of when last sorted all the rows was
-
listeners_mon
private AEMonitor listeners_mon
-
listenersRowRefesh
private java.util.ArrayList<TableRowRefreshListener> listenersRowRefesh
-
listenersDataSourceChanged
private CopyOnWriteList<TableDataSourceChangedListener> listenersDataSourceChanged
-
listenersSelection
private CopyOnWriteList<TableSelectionListener> listenersSelection
-
listenersLifeCycle
private CopyOnWriteList<TableLifeCycleListener> listenersLifeCycle
-
listenersRefresh
private CopyOnWriteList<TableRefreshListener> listenersRefresh
-
listenersCountChange
private CopyOnWriteList<TableCountChangeListener> listenersCountChange
-
listenersExpansionChange
private CopyOnWriteList<TableExpansionChangeListener> listenersExpansionChange
-
parentDataSource
private java.lang.Object parentDataSource
-
rows_sync
private final java.lang.Object rows_sync
-
sortedRows
private java.util.List<TableRowCore> sortedRows
Filtered rows in the table
-
mapDataSourceToRow
private java.util.IdentityHashMap<DATASOURCETYPE,TableRowCore> mapDataSourceToRow
Link DataSource to their row in the table. key = DataSource value = TableRowSWT
-
listUnfilteredDataSources
private java.util.IdentityHashMap<DATASOURCETYPE,java.lang.String> listUnfilteredDataSources
-
dataSourcesToAdd
private java.util.IdentityHashMap<DATASOURCETYPE,java.lang.String> dataSourcesToAdd
Queue added datasources and add them on refresh
-
dataSourcesToRemove
private java.util.IdentityHashMap<DATASOURCETYPE,java.lang.String> dataSourcesToRemove
Queue removed datasources and add them on refresh
-
datsaSourceQueueProcessingCount
private java.util.concurrent.atomic.AtomicInteger datsaSourceQueueProcessingCount
-
filter
protected TableViewImpl.filter<DATASOURCETYPE> filter
-
processDataSourceQueueCallback
private DataSourceCallBackUtil.addDataSourceCallback processDataSourceQueueCallback
-
basicItems
private TableColumnCore[] basicItems
Basic (pre-defined) Column Definitions
-
tableColumns
private TableColumnCore[] tableColumns
All Column Definitions. The array is not necessarily in column order
-
columnsOrdered
private TableColumnCore[] 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
private java.util.List<TableRowCore> selectedRows
Up to date list of selected rows, so we can access rows without being on SWT Thread. Guaranteed to have no nulls
-
listSelectedCoreDataSources
private java.util.List<java.lang.Object> listSelectedCoreDataSources
-
headerVisible
private boolean headerVisible
-
menuEnabled
private boolean menuEnabled
-
provideIndexesOnRemove
private boolean provideIndexesOnRemove
-
-
Constructor Detail
-
TableViewImpl
public TableViewImpl(java.lang.Class<?> pluginDataSourceType, java.lang.String _sTableID, java.lang.String _sPropertiesPrefix, java.lang.Object rows_sync, TableColumnCore[] _basicItems)
-
-
Method Detail
-
initializeColumnDefs
private void initializeColumnDefs()
-
addSelectionListener
public void addSelectionListener(TableSelectionListener listener, boolean bFireSelection)
- Specified by:
addSelectionListener
in interfaceTableView<DATASOURCETYPE>
-
addTableDataSourceChangedListener
public void addTableDataSourceChangedListener(TableDataSourceChangedListener l, boolean trigger)
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>
-
removeTableDataSourceChangedListener
public void removeTableDataSourceChangedListener(TableDataSourceChangedListener l)
- Specified by:
removeTableDataSourceChangedListener
in interfaceTableView<DATASOURCETYPE>
-
setParentDataSource
public void setParentDataSource(java.lang.Object newDataSource)
- Specified by:
setParentDataSource
in interfaceTableView<DATASOURCETYPE>
-
getParentDataSource
public java.lang.Object getParentDataSource()
- Specified by:
getParentDataSource
in interfaceTableView<DATASOURCETYPE>
-
triggerDefaultSelectedListeners
public void triggerDefaultSelectedListeners(TableRowCore[] selectedRows, int keyMask, int origin)
- Parameters:
selectedRows
-
-
triggerLifeCycleListener
protected void triggerLifeCycleListener(int eventType)
- Parameters:
eventType
-
-
triggerSelectionChangeListeners
public void triggerSelectionChangeListeners(TableRowCore[] selected_rows, TableRowCore[] deselected_rows)
-
triggerSelectionListeners
protected void triggerSelectionListeners(TableRowCore[] rows)
-
triggerDeselectionListeners
protected void triggerDeselectionListeners(TableRowCore[] rows)
-
triggerMouseEnterExitRow
protected void triggerMouseEnterExitRow(TableRowCore row, boolean enter)
-
triggerFocusChangedListeners
protected void triggerFocusChangedListeners(TableRowCore row)
-
triggerTableRefreshListeners
protected void triggerTableRefreshListeners()
-
addLifeCycleListener
public void addLifeCycleListener(TableLifeCycleListener l)
- Specified by:
addLifeCycleListener
in interfaceTableView<DATASOURCETYPE>
-
addRefreshListener
public void addRefreshListener(TableRefreshListener l, boolean trigger)
- Specified by:
addRefreshListener
in interfaceTableView<DATASOURCETYPE>
-
addCountChangeListener
public void addCountChangeListener(TableCountChangeListener listener)
- Specified by:
addCountChangeListener
in interfaceTableView<DATASOURCETYPE>
-
removeCountChangeListener
public void removeCountChangeListener(TableCountChangeListener listener)
- Specified by:
removeCountChangeListener
in interfaceTableView<DATASOURCETYPE>
-
triggerListenerRowAdded
public void triggerListenerRowAdded(TableRowCore[] rows)
-
triggerListenerRowRemoved
protected void triggerListenerRowRemoved(TableRowCore row)
-
addExpansionChangeListener
public void addExpansionChangeListener(TableExpansionChangeListener listener)
- Specified by:
addExpansionChangeListener
in interfaceTableView<DATASOURCETYPE>
-
removeExpansionChangeListener
public void removeExpansionChangeListener(TableExpansionChangeListener listener)
- Specified by:
removeExpansionChangeListener
in interfaceTableView<DATASOURCETYPE>
-
invokeExpansionChangeListeners
public void invokeExpansionChangeListeners(TableRowCore row, boolean expanded)
-
addRefreshListener
public void addRefreshListener(TableRowRefreshListener listener)
-
removeRefreshListener
public void removeRefreshListener(TableRowRefreshListener listener)
-
invokeRefreshListeners
public void invokeRefreshListeners(TableRowCore row)
-
runForAllRows
public void runForAllRows(TableGroupRowRunner runner)
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
private void runForAllRows(TableGroupRowRunner runner, boolean doSubRows)
-
runForAllRows
public void runForAllRows(TableGroupRowVisibilityRunner runner)
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
public void runForSelectedRows(TableGroupRowRunner runner)
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
public boolean isUnfilteredDataSourceAdded(java.lang.Object ds)
- Specified by:
isUnfilteredDataSourceAdded
in interfaceTableView<DATASOURCETYPE>
-
refilter
public void refilter()
-
isFiltered
public boolean isFiltered(DATASOURCETYPE ds)
-
getFilterSubRows
protected abstract boolean getFilterSubRows()
-
redrawTable
protected abstract void redrawTable()
-
debug
protected void debug(java.lang.String s)
-
_processDataSourceQueue
private void _processDataSourceQueue()
-
addDataSource
public void addDataSource(DATASOURCETYPE dataSource)
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
private void addDataSource(DATASOURCETYPE dataSource, boolean skipFilterCheck)
-
addDataSources
public void addDataSources(DATASOURCETYPE[] dataSources)
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>
-
addDataSources
private void addDataSources(DATASOURCETYPE[] dataSources, boolean skipFilterCheck)
-
hasPendingDSChanges
protected boolean hasPendingDSChanges()
-
dataSourceExists
public boolean dataSourceExists(DATASOURCETYPE dataSource)
- Specified by:
dataSourceExists
in interfaceTableView<DATASOURCETYPE>
- 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>
-
getOffUIThread
public abstract void getOffUIThread(AERunnable runnable)
-
processDataSourceQueueSync
public void processDataSourceQueueSync()
- Specified by:
processDataSourceQueueSync
in interfaceTableView<DATASOURCETYPE>
-
size
public int size(boolean bIncludeQueue)
- Specified by:
size
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getRows
public TableRowCore[] 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
public TableRowCore[] getRowsAndSubRows(boolean includeHidden)
- Specified by:
getRowsAndSubRows
in interfaceTableView<DATASOURCETYPE>
-
getRowsAndSubRows
private void getRowsAndSubRows(java.util.List<TableRowCore> result, TableRowCore[] rows, boolean includeHidden)
-
numberAllVisibleRows
protected boolean numberAllVisibleRows()
-
numberAllVisibleRows
private int numberAllVisibleRows(TableRowCore[] rows, int pos)
-
getRowAndSubRowCount
public int[] getRowAndSubRowCount()
- Specified by:
getRowAndSubRowCount
in interfaceTableView<DATASOURCETYPE>
-
getRowAndSubRowCount
private void getRowAndSubRowCount(TableRowCore[] rows, int[] result, boolean isHidden)
-
getRow
public TableRowCore getRow(DATASOURCETYPE dataSource)
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
public TableRowCore getRow(int iPos)
- Specified by:
getRow
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getRowQuick
public TableRowCore getRowQuick(int iPos)
-
indexOf
public int indexOf(TableRowCore row)
- Specified by:
indexOf
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfaceTableView<DATASOURCETYPE>
-
getDataSources
public java.util.HashSet<DATASOURCETYPE> getDataSources()
- Specified by:
getDataSources
in interfaceTableView<DATASOURCETYPE>
- Returns:
- a new, unsorted Hashset of all datasources
-
getDataSources
public java.util.HashSet<DATASOURCETYPE> getDataSources(boolean include_filtered)
- Specified by:
getDataSources
in interfaceTableView<DATASOURCETYPE>
- Returns:
- a new, unsorted Hashset of datasources
-
removeDataSource
public void removeDataSource(DATASOURCETYPE dataSource)
- Specified by:
removeDataSource
in interfaceTableView<DATASOURCETYPE>
-
removeDataSources
public void removeDataSources(DATASOURCETYPE[] dataSources)
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
private void reallyAddDataSources(java.lang.Object[] dataSources)
-
createNewRow
public abstract TableRowCore createNewRow(java.lang.Object object)
-
delete
public void delete()
- Specified by:
delete
in interfaceTableView<DATASOURCETYPE>
-
getRowsSync
public java.lang.Object getRowsSync()
-
generate
public void generate(IndentWriter writer)
- 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
private void reallyRemoveDataSources(java.lang.Object[] dataSources)
-
tableMutated
public void tableMutated()
-
fillRowGaps
protected void fillRowGaps(boolean bForceDataRefresh)
-
sortRows
public void sortRows(boolean bForceDataRefresh)
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()
-
uiRemoveRows
public abstract void uiRemoveRows(TableRowCore[] rows, java.lang.Integer[] rowIndexes)
-
uiGuessMaxVisibleRows
public abstract int uiGuessMaxVisibleRows()
-
resetLastSortedOn
public void resetLastSortedOn()
- Specified by:
resetLastSortedOn
in interfaceTableView<DATASOURCETYPE>
-
getColumnCells
public TableCellCore[] getColumnCells(java.lang.String sColumnName)
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
private void addSortedDataSource(java.lang.Object[] dataSources)
-
cellInvalidate
public void cellInvalidate(TableColumnCore tableColumn, DATASOURCETYPE data_source)
- Specified by:
cellInvalidate
in interfaceTableStructureModificationListener<DATASOURCETYPE>
-
cellInvalidate
public void cellInvalidate(TableColumnCore tableColumn, DATASOURCETYPE data_source, boolean bMustRefresh)
-
columnInvalidate
public void columnInvalidate(java.lang.String sColumnName)
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
public void columnInvalidate(java.lang.String sColumnName, boolean mustRefresh)
- Specified by:
columnInvalidate
in interfaceTableView<DATASOURCETYPE>
-
columnInvalidate
public void columnInvalidate(TableColumnCore tableColumn, boolean bMustRefresh)
-
columnInvalidate
public void columnInvalidate(TableColumnCore tableColumn)
- Specified by:
columnInvalidate
in interfaceTableStructureModificationListener<DATASOURCETYPE>
- Specified by:
columnInvalidate
in interfaceTableView<DATASOURCETYPE>
-
getPropertiesPrefix
public java.lang.String getPropertiesPrefix()
- Specified by:
getPropertiesPrefix
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getTableID
public java.lang.String getTableID()
- Specified by:
getTableID
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getDataSourceType
public java.lang.Class<?> getDataSourceType()
- Specified by:
getDataSourceType
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
tableStructureChanged
public void tableStructureChanged(boolean columnAddedOrRemoved, java.lang.Class forPluginDataSourceType)
- Specified by:
tableStructureChanged
in interfaceTableStructureModificationListener<DATASOURCETYPE>
-
getTableColumn
public TableColumn getTableColumn(java.lang.String sColumnName)
- Specified by:
getTableColumn
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getVisibleColumns
public TableColumnCore[] getVisibleColumns()
- Specified by:
getVisibleColumns
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getAllColumns
public TableColumnCore[] getAllColumns()
- Specified by:
getAllColumns
in interfaceTableView<DATASOURCETYPE>
-
setColumnsOrdered
public void setColumnsOrdered(TableColumnCore[] columnsOrdered)
-
isColumnVisible
public boolean isColumnVisible(TableColumn column)
- Specified by:
isColumnVisible
in interfaceTableView<DATASOURCETYPE>
-
refreshTable
public void refreshTable(boolean bForceSort)
- Specified by:
refreshTable
in interfaceTableView<DATASOURCETYPE>
-
getSelectedDataSourcesList
public java.util.List<java.lang.Object> getSelectedDataSourcesList()
-
getSelectedPluginDataSourcesList
public java.util.List<java.lang.Object> getSelectedPluginDataSourcesList()
Returns an array of all selected Data Sources. Null data sources are ommitted.- Returns:
- an array containing the selected data sources
-
getSelectedDataSources
public java.util.List<java.lang.Object> 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
public java.lang.Object[] getSelectedDataSources(boolean bCoreDataSource)
Description copied from interface:TableView
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
-
getSelectedRows
public TableRowCore[] 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:
TableView.getSelectedRows()
-
getSelectedRowsSize
public int getSelectedRowsSize()
- Specified by:
getSelectedRowsSize
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getSelectedRowsList
public java.util.List<TableRowCore> getSelectedRowsList()
Returns an list of all selected TableRowSWT objects. Null data sources are ommitted.- Returns:
- an list containing the selected TableRowSWT objects
-
isSelected
public boolean isSelected(TableRow row)
- Specified by:
isSelected
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getFocusedRow
public TableRowCore getFocusedRow()
- Specified by:
getFocusedRow
in interfaceTableView<DATASOURCETYPE>
- Returns:
-
getFirstSelectedDataSource
public java.lang.Object getFirstSelectedDataSource()
- Specified by:
getFirstSelectedDataSource
in interfaceTableView<DATASOURCETYPE>
-
getFirstSelectedDataSource
public java.lang.Object getFirstSelectedDataSource(boolean bCoreObject)
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>
-
hasSortColumn
public boolean hasSortColumn(TableColumn column)
- Specified by:
hasSortColumn
in interfaceTableView<DATASOURCETYPE>
-
getSortColumnCount
public int getSortColumnCount()
- Specified by:
getSortColumnCount
in interfaceTableView<DATASOURCETYPE>
-
getSortColumns
public TableColumnCore[] getSortColumns()
- Specified by:
getSortColumns
in interfaceTableView<DATASOURCETYPE>
-
addSortColumn
public void addSortColumn(TableColumnCore column)
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
public boolean setSortColumns(TableColumnCore[] newSortColumns, boolean allowOrderChange)
- Specified by:
setSortColumns
in interfaceTableView<DATASOURCETYPE>
-
setRowSelected
public void setRowSelected(TableRowCore row, boolean selected, boolean trigger)
-
setSelectedRows
public void setSelectedRows(TableRowCore[] newSelectionArray, boolean trigger)
-
reaffirmSelection
protected void reaffirmSelection()
-
isSingleSelection
public abstract boolean isSingleSelection()
-
uiSelectionChanged
public abstract void uiSelectionChanged(TableRowCore[] newlySelectedRows, TableRowCore[] deselectedRows)
-
setSelectedRows
public void setSelectedRows(TableRowCore[] rows)
- 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
public java.lang.String getFilterText()
-
isMenuEnabled
public boolean isMenuEnabled()
-
setMenuEnabled
public void setMenuEnabled(boolean menuEnabled)
-
isLastRow
protected boolean isLastRow(TableRowCore row)
-
triggerTabViewsDataSourceChanged
public abstract void triggerTabViewsDataSourceChanged()
-
uiChangeColumnIndicator
protected abstract void uiChangeColumnIndicator()
-
isProvideIndexesOnRemove
public boolean isProvideIndexesOnRemove()
-
setProvideIndexesOnRemove
public void setProvideIndexesOnRemove(boolean provideIndexesOnRemove)
-
isTableSelected
public boolean isTableSelected()
- Specified by:
isTableSelected
in interfaceTableView<DATASOURCETYPE>
-
isTableFocused
protected abstract boolean isTableFocused()
-
-