Package com.biglybt.ui.common.table
Interface TableView<DATASOURCETYPE>
-
- All Superinterfaces:
AEDiagnosticsEvidenceGenerator
- All Known Subinterfaces:
TableViewSWT<DATASOURCETYPE>
- All Known Implementing Classes:
TableViewImpl
,TableViewPainted
public interface TableView<DATASOURCETYPE> extends AEDiagnosticsEvidenceGenerator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCountChangeListener(TableCountChangeListener listener)
void
addDataSource(DATASOURCETYPE dataSource)
Adds a dataSource to the table as a new row.void
addDataSources(DATASOURCETYPE[] dataSources)
Add a list of dataSources to the table.void
addExpansionChangeListener(TableExpansionChangeListener listener)
void
addLifeCycleListener(TableLifeCycleListener l)
void
addRefreshListener(TableRefreshListener l, boolean trigger)
void
addSelectionListener(TableSelectionListener listener, boolean trigger)
void
addSortColumn(TableColumnCore column)
Add a column to the sorting.void
addTableDataSourceChangedListener(TableDataSourceChangedListener l, boolean trigger)
The data set that this table represents has been changed.boolean
canHaveSubItems()
void
clipboardSelected()
Send Selected rows to the clipboard in a SpreadSheet friendly format (tab/cr delimited)void
columnInvalidate(TableColumnCore tableColumn)
void
columnInvalidate(java.lang.String sColumnName)
Invalidate all the cells in a columnvoid
columnInvalidate(java.lang.String sColumnName, boolean forceRefresh)
boolean
dataSourceExists(DATASOURCETYPE dataSource)
void
delete()
TableColumnCore[]
getAllColumns()
TableCellCore[]
getColumnCells(java.lang.String columnName)
Retrieve a list ofjava.util.HashSet<DATASOURCETYPE>
getDataSources()
java.util.HashSet<DATASOURCETYPE>
getDataSources(boolean include_filtered)
java.lang.Class
getDataSourceType()
java.lang.Object
getFirstSelectedDataSource()
TableRowCore
getFocusedRow()
boolean
getHeaderVisible()
int
getMaxItemShown()
java.lang.Object
getParentDataSource()
java.lang.String
getPropertiesPrefix()
TableRowCore
getRow(int position)
TableRowCore
getRow(int x, int y)
TableRowCore
getRow(DATASOURCETYPE dataSource)
Get the row associated with a datasourceint[]
getRowAndSubRowCount()
int
getRowCount()
int
getRowDefaultHeight()
TableRowCore[]
getRows()
Get all the rows for this table, in the order they are displayedTableRowCore[]
getRowsAndSubRows(boolean includeHidden)
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.TableRowCore[]
getSelectedRows()
Returns an array of all selected TableRowSWT.int
getSelectedRowsSize()
int
getSortColumnCount()
TableColumnCore[]
getSortColumns()
TableCellCore
getTableCellWithCursor()
TableColumn
getTableColumn(java.lang.String columnName)
java.lang.String
getTableID()
TableRowCore
getTableRowWithCursor()
Retrieves the row that has the cursor over itTableViewCreator
getTableViewCreator()
TableColumnCore[]
getVisibleColumns()
TableRowCore[]
getVisibleRows()
boolean
hasChangesPending()
boolean
hasSortColumn(TableColumn column)
int
indexOf(TableRowCore row)
boolean
isColumnVisible(TableColumn column)
boolean
isDisposed()
boolean
isRowVisible(TableRowCore row)
boolean
isSelected(TableRow row)
boolean
isTableSelected()
boolean
isUnfilteredDataSourceAdded(java.lang.Object ds)
void
processDataSourceQueue()
Process the queue of datasources to be added and removedvoid
processDataSourceQueueSync()
void
refreshTable(boolean bForceSort)
void
removeAllTableRows()
Remove all the data sources (table rows) from the table.void
removeCountChangeListener(TableCountChangeListener l)
void
removeDataSource(DATASOURCETYPE dataSource)
void
removeDataSources(DATASOURCETYPE[] dataSources)
void
removeExpansionChangeListener(TableExpansionChangeListener listener)
void
removeTableDataSourceChangedListener(TableDataSourceChangedListener l)
void
resetLastSortedOn()
void
runForAllRows(TableGroupRowRunner runner)
For every row source, run the code provided by the specified parameter.void
runForAllRows(TableGroupRowVisibilityRunner runner)
For every row source, run the code provided by the specified parameter.void
runForSelectedRows(TableGroupRowRunner runner)
void
scrollVertically(int distance)
void
selectAll()
Does not fire off selection eventsvoid
setEnabled(boolean enable)
void
setEnableTabViews(boolean enableTabViews, boolean expandByDefault)
void
setHeaderVisible(boolean visible)
void
setMaxItemShown(int newIndex)
void
setParentDataSource(java.lang.Object newDataSource)
void
setRowDefaultHeight(int iHeight)
void
setRowDefaultHeightEM(float lineHeight)
void
setRowDefaultHeightPX(int realPX)
void
setSelectedRows(TableRowCore[] rows)
boolean
setSortColumns(TableColumnCore[] newSortColumns, boolean allowOrderChange)
int
size(boolean bIncludeQueue)
void
sortRows(boolean bForceDataRefresh)
Sort rows using the columns specified ingetSortColumns()
-
Methods inherited from interface com.biglybt.core.util.AEDiagnosticsEvidenceGenerator
generate
-
-
-
-
Method Detail
-
addCountChangeListener
void addCountChangeListener(TableCountChangeListener listener)
- Parameters:
listener
-
-
addDataSource
void addDataSource(DATASOURCETYPE dataSource)
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- Parameters:
dataSource
- data source to add to the table
-
addDataSources
void addDataSources(DATASOURCETYPE[] dataSources)
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- Parameters:
dataSources
-
-
addLifeCycleListener
void addLifeCycleListener(TableLifeCycleListener l)
-
addRefreshListener
void addRefreshListener(TableRefreshListener l, boolean trigger)
-
addSelectionListener
void addSelectionListener(TableSelectionListener listener, boolean trigger)
- Parameters:
listener
-bFireSelection
-
-
addTableDataSourceChangedListener
void addTableDataSourceChangedListener(TableDataSourceChangedListener l, boolean trigger)
The data set that this table represents has been changed. This is not for listening on changes to data sources changing within the table- Parameters:
l
-trigger
-
-
clipboardSelected
void clipboardSelected()
Send Selected rows to the clipboard in a SpreadSheet friendly format (tab/cr delimited)
-
columnInvalidate
void columnInvalidate(java.lang.String sColumnName)
Invalidate all the cells in a column- Parameters:
sColumnName
- Name of column to invalidate
-
columnInvalidate
void columnInvalidate(java.lang.String sColumnName, boolean forceRefresh)
-
columnInvalidate
void columnInvalidate(TableColumnCore tableColumn)
- Parameters:
tableColumn
-
-
delete
void delete()
-
getColumnCells
TableCellCore[] getColumnCells(java.lang.String columnName)
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.
- Parameters:
sColumnName
- Which column cell's to return. This does not sort the array on the column.- Returns:
- array of cells
-
getDataSources
java.util.HashSet<DATASOURCETYPE> getDataSources()
- Returns:
- a new, unsorted Hashset of all datasources
-
getDataSources
java.util.HashSet<DATASOURCETYPE> getDataSources(boolean include_filtered)
- Returns:
- a new, unsorted Hashset of datasources
-
getFirstSelectedDataSource
java.lang.Object getFirstSelectedDataSource()
-
getPropertiesPrefix
java.lang.String getPropertiesPrefix()
- Returns:
-
getRow
TableRowCore getRow(DATASOURCETYPE dataSource)
Get the row associated with a datasource- Parameters:
dataSource
- a reference to a core Datasource object (not a plugin datasource object)- Returns:
- The row, or null
-
getRows
TableRowCore[] getRows()
Get all the rows for this table, in the order they are displayed- Returns:
- a list of TableRowSWT objects in the order the user sees them
-
getRowsAndSubRows
TableRowCore[] getRowsAndSubRows(boolean includeHidden)
-
getSelectedDataSources
java.util.List<java.lang.Object> getSelectedDataSources()
Returns an array of all selected Data Sources. Null data sources are ommitted.- Returns:
- an array containing the selected data sources
-
getSelectedDataSources
java.lang.Object[] getSelectedDataSources(boolean bCoreDataSource)
Returns an array of all selected Data Sources. Null data sources are ommitted.- Parameters:
bCoreDataSource
-- Returns:
- an array containing the selected data sources
-
getSelectedRows
TableRowCore[] getSelectedRows()
Returns an array of all selected TableRowSWT. Null data sources are ommitted.- Returns:
- an array containing the selected data sources
-
hasSortColumn
boolean hasSortColumn(TableColumn column)
-
getSortColumnCount
int getSortColumnCount()
-
getSortColumns
TableColumnCore[] getSortColumns()
-
addSortColumn
void addSortColumn(TableColumnCore column)
Add a column to the sorting. If the column already is in the sort list, flip its order
-
setSortColumns
boolean setSortColumns(TableColumnCore[] newSortColumns, boolean allowOrderChange)
-
sortRows
void sortRows(boolean bForceDataRefresh)
Sort rows using the columns specified ingetSortColumns()
-
isDisposed
boolean isDisposed()
- Returns:
-
processDataSourceQueue
void processDataSourceQueue()
Process the queue of datasources to be added and removed
-
refreshTable
void refreshTable(boolean bForceSort)
- Parameters:
bForceSort
-
-
removeAllTableRows
void removeAllTableRows()
Remove all the data sources (table rows) from the table.
-
removeDataSource
void removeDataSource(DATASOURCETYPE dataSource)
- Parameters:
dataSource
-
-
removeTableDataSourceChangedListener
void removeTableDataSourceChangedListener(TableDataSourceChangedListener l)
- Parameters:
l
-
-
runForAllRows
void runForAllRows(TableGroupRowRunner runner)
For every row source, run the code provided by the specified parameter.- Parameters:
runner
- Code to run for each row/datasource
-
runForAllRows
void runForAllRows(TableGroupRowVisibilityRunner runner)
For every row source, run the code provided by the specified parameter.- Parameters:
runner
- Code to run for each row/datasource
-
runForSelectedRows
void runForSelectedRows(TableGroupRowRunner runner)
- Parameters:
runner
-
-
selectAll
void selectAll()
Does not fire off selection events
-
setEnableTabViews
void setEnableTabViews(boolean enableTabViews, boolean expandByDefault)
-
setParentDataSource
void setParentDataSource(java.lang.Object newDataSource)
- Parameters:
newDataSource
-
-
getParentDataSource
java.lang.Object getParentDataSource()
-
setRowDefaultHeight
void setRowDefaultHeight(int iHeight)
- Parameters:
iHeight
- Height will be adjusted for larger DPI
-
setRowDefaultHeightEM
void setRowDefaultHeightEM(float lineHeight)
-
setRowDefaultHeightPX
void setRowDefaultHeightPX(int realPX)
-
setSelectedRows
void setSelectedRows(TableRowCore[] rows)
-
size
int size(boolean bIncludeQueue)
- Parameters:
bIncludeQueue
-- Returns:
-
getFocusedRow
TableRowCore getFocusedRow()
- Returns:
-
getTableID
java.lang.String getTableID()
- Returns:
-
getTableViewCreator
TableViewCreator getTableViewCreator()
-
getRow
TableRowCore getRow(int x, int y)
- Parameters:
x
-y
-- Returns:
-
dataSourceExists
boolean dataSourceExists(DATASOURCETYPE dataSource)
- Parameters:
dataSource
-- Returns:
-
getVisibleColumns
TableColumnCore[] getVisibleColumns()
- Returns:
-
getVisibleRows
TableRowCore[] getVisibleRows()
-
removeDataSources
void removeDataSources(DATASOURCETYPE[] dataSources)
- Parameters:
dataSources
-
-
getSelectedRowsSize
int getSelectedRowsSize()
- Returns:
- Since:
- 3.0.0.7
-
scrollVertically
void scrollVertically(int distance)
-
indexOf
int indexOf(TableRowCore row)
- Parameters:
row
-- Returns:
- Since:
- 3.0.0.7
-
isRowVisible
boolean isRowVisible(TableRowCore row)
- Parameters:
row
-- Returns:
- Since:
- 3.0.4.3
-
getTableCellWithCursor
TableCellCore getTableCellWithCursor()
- Returns:
- Since:
- 3.0.4.3
-
getTableRowWithCursor
TableRowCore getTableRowWithCursor()
Retrieves the row that has the cursor over it- Returns:
- null if mouse isn't over a row
- Since:
- 3.0.4.3
-
getRowDefaultHeight
int getRowDefaultHeight()
- Returns:
- Since:
- 3.0.4.3
-
isColumnVisible
boolean isColumnVisible(TableColumn column)
-
getRow
TableRowCore getRow(int position)
- Parameters:
position
-- Returns:
- Since:
- 3.0.4.3
-
getDataSourceType
java.lang.Class getDataSourceType()
- Returns:
- Since:
- 3.1.1.1
-
getTableColumn
TableColumn getTableColumn(java.lang.String columnName)
- Parameters:
columnName
-- Returns:
- Since:
- 3.1.1.1
-
setEnabled
void setEnabled(boolean enable)
-
canHaveSubItems
boolean canHaveSubItems()
-
isSelected
boolean isSelected(TableRow row)
- Parameters:
tableRowImpl
-- Returns:
- Since:
- 4.4.0.5
-
isUnfilteredDataSourceAdded
boolean isUnfilteredDataSourceAdded(java.lang.Object ds)
-
setHeaderVisible
void setHeaderVisible(boolean visible)
- Parameters:
visible
-- Since:
- 4.6.0.5
-
getHeaderVisible
boolean getHeaderVisible()
- Returns:
- Since:
- 4.6.0.5
-
processDataSourceQueueSync
void processDataSourceQueueSync()
- Since:
- 4.6.0.5
-
getMaxItemShown
int getMaxItemShown()
- Since:
- 4.6.0.5
-
setMaxItemShown
void setMaxItemShown(int newIndex)
- Parameters:
newIndex
-- Since:
- 4.6.0.5
-
getRowCount
int getRowCount()
-
getRowAndSubRowCount
int[] getRowAndSubRowCount()
-
resetLastSortedOn
void resetLastSortedOn()
-
hasChangesPending
boolean hasChangesPending()
-
getAllColumns
TableColumnCore[] getAllColumns()
-
removeCountChangeListener
void removeCountChangeListener(TableCountChangeListener l)
-
addExpansionChangeListener
void addExpansionChangeListener(TableExpansionChangeListener listener)
-
removeExpansionChangeListener
void removeExpansionChangeListener(TableExpansionChangeListener listener)
-
isTableSelected
boolean isTableSelected()
-
-