|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aelitis.azureus.ui.common.table.impl.TableViewImpl<DATASOURCETYPE>
public abstract class TableViewImpl<DATASOURCETYPE>
Nested Class Summary | |
---|---|
static class |
TableViewImpl.filter<DATASOURCETYPE>
|
Field Summary | |
---|---|
protected static ConfigurationManager |
configMan
|
static boolean |
DEBUG_SELECTION
|
static boolean |
DEBUGADDREMOVE
Helpful output when trying to debug add/removal of rows |
protected TableViewImpl.filter<DATASOURCETYPE> |
filter
|
protected java.lang.String |
propertiesPrefix
Prefix for retrieving text from the properties file (MessageText) Typically TableID + "View" |
protected java.lang.String |
tableID
TableID (from TableManager )
of the table this class is
handling. |
Constructor Summary | |
---|---|
TableViewImpl(java.lang.Class<?> pluginDataSourceType,
java.lang.String _sTableID,
java.lang.String _sPropertiesPrefix,
TableColumnCore[] _basicItems)
|
Method Summary | |
---|---|
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. |
void |
addDataSources(DATASOURCETYPE[] dataSources)
Add a list of dataSources to the table. |
void |
addDataSources(DATASOURCETYPE[] dataSources,
boolean skipFilterCheck)
|
void |
addExpansionChangeListener(TableExpansionChangeListener listener)
|
void |
addLifeCycleListener(TableLifeCycleListener l)
|
void |
addRefreshListener(TableRefreshListener l,
boolean trigger)
|
void |
addRefreshListener(TableRowRefreshListener listener)
|
void |
addSelectionListener(TableSelectionListener listener,
boolean bFireSelection)
|
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(java.lang.String sColumnName)
Invalidate all the cells in a column |
void |
columnInvalidate(TableColumnCore tableColumn)
|
void |
columnInvalidate(TableColumnCore tableColumn,
boolean bMustRefresh)
|
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 of |
java.util.ArrayList<DATASOURCETYPE> |
getDataSources()
|
java.util.ArrayList<DATASOURCETYPE> |
getDataSources(boolean include_filtered)
|
java.lang.Class<?> |
getDataSourceType()
|
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(DATASOURCETYPE dataSource)
Get the row associated with a datasource |
TableRowCore |
getRow(int iPos)
|
int |
getRowCount()
|
TableRowCore |
getRowQuick(int iPos)
|
TableRowCore[] |
getRows()
Get all the rows for this table, in the order they are displayed |
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()
|
TableColumnCore |
getSortColumn()
|
TableColumn |
getTableColumn(java.lang.String sColumnName)
|
java.lang.String |
getTableID()
|
TableColumnCore[] |
getVisibleColumns()
|
int |
indexOf(TableRowCore row)
|
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()
|
boolean |
isTableSelected()
|
boolean |
isUnfilteredDataSourceAdded(java.lang.Object ds)
|
void |
processDataSourceQueue()
Process the queue of datasources to be added and removed |
void |
processDataSourceQueueSync()
|
void |
reallyAddDataSources(java.lang.Object[] dataSources)
|
void |
reallyRemoveDataSources(java.lang.Object[] dataSources)
|
void |
refilter()
|
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. |
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 events |
protected void |
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 |
setRowsSync(java.lang.Object o)
|
void |
setSelectedRows(TableRowCore[] rows)
|
void |
setSelectedRows(TableRowCore[] newSelectionArray,
boolean trigger)
|
protected boolean |
setSortColumn(TableColumnCore newSortColumn,
boolean allowOrderChange)
|
int |
size(boolean bIncludeQueue)
|
void |
sortColumn(boolean bForceDataRefresh)
|
void |
tableInvalidate()
Invalidate and refresh whole table |
void |
tableStructureChanged(boolean columnAddedOrRemoved,
java.lang.Class forPluginDataSourceType)
|
void |
triggerDefaultSelectedListeners(TableRowCore[] selectedRows,
int keyMask)
|
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 |
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.aelitis.azureus.ui.common.table.TableView |
---|
canHaveSubItems, clipboardSelected, getMaxItemShown, getRow, getRowDefaultHeight, getTableCellWithCursor, getTableRowWithCursor, getTableViewCreator, isDisposed, isRowVisible, setEnabled, setEnableTabViews, setFocus, setMaxItemShown, setRowDefaultHeight, setRowDefaultHeightEM, setRowDefaultHeightPX |
Methods inherited from interface com.aelitis.azureus.ui.common.table.TableStructureModificationListener |
---|
columnOrderChanged, columnSizeChanged |
Field Detail |
---|
public static final boolean DEBUGADDREMOVE
public static final boolean DEBUG_SELECTION
protected static final ConfigurationManager configMan
protected java.lang.String tableID
TableManager
)
of the table this class is
handling. Config settings are stored with the prefix of
"Table.TableID"
protected java.lang.String propertiesPrefix
protected TableViewImpl.filter<DATASOURCETYPE> filter
Constructor Detail |
---|
public TableViewImpl(java.lang.Class<?> pluginDataSourceType, java.lang.String _sTableID, java.lang.String _sPropertiesPrefix, TableColumnCore[] _basicItems)
Method Detail |
---|
public void addSelectionListener(TableSelectionListener listener, boolean bFireSelection)
addSelectionListener
in interface TableView<DATASOURCETYPE>
public void addTableDataSourceChangedListener(TableDataSourceChangedListener l, boolean trigger)
TableView
addTableDataSourceChangedListener
in interface TableView<DATASOURCETYPE>
public void removeTableDataSourceChangedListener(TableDataSourceChangedListener l)
removeTableDataSourceChangedListener
in interface TableView<DATASOURCETYPE>
public void setParentDataSource(java.lang.Object newDataSource)
setParentDataSource
in interface TableView<DATASOURCETYPE>
public java.lang.Object getParentDataSource()
getParentDataSource
in interface TableView<DATASOURCETYPE>
public void triggerDefaultSelectedListeners(TableRowCore[] selectedRows, int keyMask)
selectedRows
- protected void triggerLifeCycleListener(int eventType)
eventType
- public void triggerSelectionListeners(TableRowCore[] rows)
protected void triggerDeselectionListeners(TableRowCore[] rows)
protected void triggerMouseEnterExitRow(TableRowCore row, boolean enter)
protected void triggerFocusChangedListeners(TableRowCore row)
protected void triggerTableRefreshListeners()
public void addLifeCycleListener(TableLifeCycleListener l)
addLifeCycleListener
in interface TableView<DATASOURCETYPE>
public void addRefreshListener(TableRefreshListener l, boolean trigger)
addRefreshListener
in interface TableView<DATASOURCETYPE>
public void addCountChangeListener(TableCountChangeListener listener)
addCountChangeListener
in interface TableView<DATASOURCETYPE>
public void removeCountChangeListener(TableCountChangeListener listener)
removeCountChangeListener
in interface TableView<DATASOURCETYPE>
public void triggerListenerRowAdded(TableRowCore[] rows)
protected void triggerListenerRowRemoved(TableRowCore row)
public void addExpansionChangeListener(TableExpansionChangeListener listener)
addExpansionChangeListener
in interface TableView<DATASOURCETYPE>
public void removeExpansionChangeListener(TableExpansionChangeListener listener)
removeExpansionChangeListener
in interface TableView<DATASOURCETYPE>
public void invokeExpansionChangeListeners(TableRowCore row, boolean expanded)
public void addRefreshListener(TableRowRefreshListener listener)
public void removeRefreshListener(TableRowRefreshListener listener)
public void invokeRefreshListeners(TableRowCore row)
public void runForAllRows(TableGroupRowRunner runner)
TableView
runForAllRows
in interface TableView<DATASOURCETYPE>
runner
- Code to run for each row/datasourcepublic void runForAllRows(TableGroupRowVisibilityRunner runner)
TableView
runForAllRows
in interface TableView<DATASOURCETYPE>
runner
- Code to run for each row/datasourcepublic void runForSelectedRows(TableGroupRowRunner runner)
runForSelectedRows
in interface TableView<DATASOURCETYPE>
runner
- Code to run for each selected row/datasourcepublic boolean isUnfilteredDataSourceAdded(java.lang.Object ds)
isUnfilteredDataSourceAdded
in interface TableView<DATASOURCETYPE>
public void refilter()
public boolean isFiltered(DATASOURCETYPE ds)
protected void debug(java.lang.String s)
public void addDataSource(DATASOURCETYPE dataSource)
TableView
addDataSource
in interface TableView<DATASOURCETYPE>
dataSource
- data source to add to the tablepublic void addDataSources(DATASOURCETYPE[] dataSources)
TableView
addDataSources
in interface TableView<DATASOURCETYPE>
public void addDataSources(DATASOURCETYPE[] dataSources, boolean skipFilterCheck)
public boolean dataSourceExists(DATASOURCETYPE dataSource)
dataSourceExists
in interface TableView<DATASOURCETYPE>
public void processDataSourceQueue()
TableView
processDataSourceQueue
in interface TableView<DATASOURCETYPE>
public abstract void getOffUIThread(AERunnable runnable)
public void processDataSourceQueueSync()
processDataSourceQueueSync
in interface TableView<DATASOURCETYPE>
public int size(boolean bIncludeQueue)
size
in interface TableView<DATASOURCETYPE>
public TableRowCore[] getRows()
TableView
getRows
in interface TableView<DATASOURCETYPE>
public TableRowCore getRow(DATASOURCETYPE dataSource)
TableView
getRow
in interface TableView<DATASOURCETYPE>
dataSource
- a reference to a core Datasource object
(not a plugin datasource object)
public TableRowCore getRow(int iPos)
getRow
in interface TableView<DATASOURCETYPE>
public TableRowCore getRowQuick(int iPos)
public int indexOf(TableRowCore row)
indexOf
in interface TableView<DATASOURCETYPE>
public int getRowCount()
getRowCount
in interface TableView<DATASOURCETYPE>
public java.util.ArrayList<DATASOURCETYPE> getDataSources()
getDataSources
in interface TableView<DATASOURCETYPE>
public java.util.ArrayList<DATASOURCETYPE> getDataSources(boolean include_filtered)
getDataSources
in interface TableView<DATASOURCETYPE>
public void removeDataSource(DATASOURCETYPE dataSource)
removeDataSource
in interface TableView<DATASOURCETYPE>
public void removeDataSources(DATASOURCETYPE[] dataSources)
removeDataSources
in interface TableView<DATASOURCETYPE>
dataSources
- data sources to be removedbImmediate
- Remove immediately, or queue and remove at next refreshpublic void reallyAddDataSources(java.lang.Object[] dataSources)
public abstract TableRowCore createNewRow(java.lang.Object object)
public void delete()
delete
in interface TableView<DATASOURCETYPE>
public java.lang.Object getRowsSync()
public void setRowsSync(java.lang.Object o)
public void generate(IndentWriter writer)
generate
in interface AEDiagnosticsEvidenceGenerator
public void removeAllTableRows()
TableView
removeAllTableRows
in interface TableView<DATASOURCETYPE>
public void reallyRemoveDataSources(java.lang.Object[] dataSources)
protected void fillRowGaps(boolean bForceDataRefresh)
public void sortColumn(boolean bForceDataRefresh)
protected void _sortColumn(boolean bForceDataRefresh, boolean bFillGapsOnly, boolean bFollowSelected)
public abstract void visibleRowsChanged()
public abstract void uiRemoveRows(TableRowCore[] rows, java.lang.Integer[] rowIndexes)
public abstract int uiGuessMaxVisibleRows()
public void resetLastSortedOn()
resetLastSortedOn
in interface TableView<DATASOURCETYPE>
public TableCellCore[] getColumnCells(java.lang.String sColumnName)
TableView
TableCells, 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.
getColumnCells
in interface TableView<DATASOURCETYPE>
public void cellInvalidate(TableColumnCore tableColumn, DATASOURCETYPE data_source)
cellInvalidate
in interface TableStructureModificationListener<DATASOURCETYPE>
public void cellInvalidate(TableColumnCore tableColumn, DATASOURCETYPE data_source, boolean bMustRefresh)
public void columnInvalidate(java.lang.String sColumnName)
TableView
columnInvalidate
in interface TableView<DATASOURCETYPE>
sColumnName
- Name of column to invalidatepublic void columnInvalidate(TableColumnCore tableColumn, boolean bMustRefresh)
public void columnInvalidate(TableColumnCore tableColumn)
columnInvalidate
in interface TableStructureModificationListener<DATASOURCETYPE>
columnInvalidate
in interface TableView<DATASOURCETYPE>
public java.lang.String getPropertiesPrefix()
getPropertiesPrefix
in interface TableView<DATASOURCETYPE>
public java.lang.String getTableID()
getTableID
in interface TableView<DATASOURCETYPE>
public java.lang.Class<?> getDataSourceType()
getDataSourceType
in interface TableView<DATASOURCETYPE>
public void tableStructureChanged(boolean columnAddedOrRemoved, java.lang.Class forPluginDataSourceType)
tableStructureChanged
in interface TableStructureModificationListener<DATASOURCETYPE>
public TableColumn getTableColumn(java.lang.String sColumnName)
getTableColumn
in interface TableView<DATASOURCETYPE>
public TableColumnCore[] getVisibleColumns()
getVisibleColumns
in interface TableView<DATASOURCETYPE>
public TableColumnCore[] getAllColumns()
getAllColumns
in interface TableView<DATASOURCETYPE>
protected void setColumnsOrdered(TableColumnCore[] columnsOrdered)
public boolean isColumnVisible(TableColumn column)
isColumnVisible
in interface TableView<DATASOURCETYPE>
public void refreshTable(boolean bForceSort)
refreshTable
in interface TableView<DATASOURCETYPE>
public java.util.List<java.lang.Object> getSelectedDataSourcesList()
public java.util.List<java.lang.Object> getSelectedPluginDataSourcesList()
public java.util.List<java.lang.Object> getSelectedDataSources()
getSelectedDataSources
in interface TableView<DATASOURCETYPE>
public java.lang.Object[] getSelectedDataSources(boolean bCoreDataSource)
TableView
getSelectedDataSources
in interface TableView<DATASOURCETYPE>
public TableRowCore[] getSelectedRows()
TableView
getSelectedRows
in interface TableView<DATASOURCETYPE>
TableView.getSelectedRows()
public int getSelectedRowsSize()
getSelectedRowsSize
in interface TableView<DATASOURCETYPE>
public java.util.List<TableRowCore> getSelectedRowsList()
public boolean isSelected(TableRow row)
isSelected
in interface TableView<DATASOURCETYPE>
public TableRowCore getFocusedRow()
getFocusedRow
in interface TableView<DATASOURCETYPE>
public java.lang.Object getFirstSelectedDataSource()
getFirstSelectedDataSource
in interface TableView<DATASOURCETYPE>
public java.lang.Object getFirstSelectedDataSource(boolean bCoreObject)
public void tableInvalidate()
public boolean getHeaderVisible()
getHeaderVisible
in interface TableView<DATASOURCETYPE>
public void setHeaderVisible(boolean visible)
setHeaderVisible
in interface TableView<DATASOURCETYPE>
public TableColumnCore getSortColumn()
getSortColumn
in interface TableView<DATASOURCETYPE>
protected boolean setSortColumn(TableColumnCore newSortColumn, boolean allowOrderChange)
public void setRowSelected(TableRowCore row, boolean selected, boolean trigger)
public void setSelectedRows(TableRowCore[] newSelectionArray, boolean trigger)
public abstract boolean isSingleSelection()
public abstract void uiSelectionChanged(TableRowCore[] newlySelectedRows, TableRowCore[] deselectedRows)
public void setSelectedRows(TableRowCore[] rows)
setSelectedRows
in interface TableView<DATASOURCETYPE>
public void selectAll()
TableView
selectAll
in interface TableView<DATASOURCETYPE>
public java.lang.String getFilterText()
public boolean isMenuEnabled()
public void setMenuEnabled(boolean menuEnabled)
protected boolean isLastRow(TableRowCore row)
public abstract void triggerTabViewsDataSourceChanged()
protected abstract void uiChangeColumnIndicator()
public boolean isProvideIndexesOnRemove()
public void setProvideIndexesOnRemove(boolean provideIndexesOnRemove)
public boolean isTableSelected()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |