|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.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 String |
propertiesPrefix
Prefix for retrieving text from the properties file (MessageText) Typically TableID + "View" |
protected String |
tableID
TableID (from TableManager)
of the table this class is
handling. |
| Constructor Summary | |
|---|---|
TableViewImpl(Class<?> pluginDataSourceType,
String _sTableID,
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(String sColumnName)
Invalidate all the cells in a column |
void |
columnInvalidate(TableColumnCore tableColumn)
|
void |
columnInvalidate(TableColumnCore tableColumn,
boolean bMustRefresh)
|
abstract TableRowCore |
createNewRow(Object object)
|
boolean |
dataSourceExists(DATASOURCETYPE dataSource)
|
protected void |
debug(String s)
|
void |
delete()
|
protected void |
fillRowGaps(boolean bForceDataRefresh)
|
void |
generate(IndentWriter writer)
|
TableColumnCore[] |
getAllColumns()
|
TableCellCore[] |
getColumnCells(String sColumnName)
Retrieve a list of |
ArrayList<DATASOURCETYPE> |
getDataSources()
|
Class<?> |
getDataSourceType()
|
String |
getFilterText()
|
Object |
getFirstSelectedDataSource()
|
Object |
getFirstSelectedDataSource(boolean bCoreObject)
Returns the first selected data sources. |
TableRowCore |
getFocusedRow()
|
boolean |
getHeaderVisible()
|
abstract void |
getOffUIThread(AERunnable runnable)
|
Object |
getParentDataSource()
|
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 |
Object |
getRowsSync()
|
List<Object> |
getSelectedDataSources()
Returns an array of all selected Data Sources. |
Object[] |
getSelectedDataSources(boolean bCoreDataSource)
Returns an array of all selected Data Sources. |
List<Object> |
getSelectedDataSourcesList()
|
List<Object> |
getSelectedPluginDataSourcesList()
Returns an array of all selected Data Sources. |
TableRowCore[] |
getSelectedRows()
Returns an array of all selected TableRowSWT. |
List<TableRowCore> |
getSelectedRowsList()
Returns an list of all selected TableRowSWT objects. |
int |
getSelectedRowsSize()
|
TableColumnCore |
getSortColumn()
|
TableColumn |
getTableColumn(String sColumnName)
|
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(Object ds)
|
void |
processDataSourceQueue()
Process the queue of datasources to be added and removed |
void |
processDataSourceQueueSync()
|
void |
reallyAddDataSources(Object[] dataSources)
|
void |
reallyRemoveDataSources(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(Object newDataSource)
|
void |
setProvideIndexesOnRemove(boolean provideIndexesOnRemove)
|
void |
setRowSelected(TableRowCore row,
boolean selected,
boolean trigger)
|
void |
setRowsSync(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,
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,
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, 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 String tableID
TableManager)
of the table this class is
handling. Config settings are stored with the prefix of
"Table.TableID"
protected String propertiesPrefix
protected TableViewImpl.filter<DATASOURCETYPE> filter
| Constructor Detail |
|---|
public TableViewImpl(Class<?> pluginDataSourceType,
String _sTableID,
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(Object newDataSource)
setParentDataSource in interface TableView<DATASOURCETYPE>public 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(Object ds)
isUnfilteredDataSourceAdded in interface TableView<DATASOURCETYPE>public void refilter()
public boolean isFiltered(DATASOURCETYPE ds)
protected void debug(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 ArrayList<DATASOURCETYPE> getDataSources()
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(Object[] dataSources)
public abstract TableRowCore createNewRow(Object object)
public void delete()
delete in interface TableView<DATASOURCETYPE>public Object getRowsSync()
public void setRowsSync(Object o)
public void generate(IndentWriter writer)
generate in interface AEDiagnosticsEvidenceGeneratorpublic void removeAllTableRows()
TableView
removeAllTableRows in interface TableView<DATASOURCETYPE>public void reallyRemoveDataSources(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,
Integer[] rowIndexes)
public abstract int uiGuessMaxVisibleRows()
public void resetLastSortedOn()
resetLastSortedOn in interface TableView<DATASOURCETYPE>public TableCellCore[] getColumnCells(String sColumnName)
TableViewTableCells, 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(String sColumnName)
TableView
columnInvalidate in interface TableView<DATASOURCETYPE>sColumnName - Name of column to invalidate
public void columnInvalidate(TableColumnCore tableColumn,
boolean bMustRefresh)
public void columnInvalidate(TableColumnCore tableColumn)
columnInvalidate in interface TableStructureModificationListener<DATASOURCETYPE>columnInvalidate in interface TableView<DATASOURCETYPE>public String getPropertiesPrefix()
getPropertiesPrefix in interface TableView<DATASOURCETYPE>public String getTableID()
getTableID in interface TableView<DATASOURCETYPE>public Class<?> getDataSourceType()
getDataSourceType in interface TableView<DATASOURCETYPE>
public void tableStructureChanged(boolean columnAddedOrRemoved,
Class forPluginDataSourceType)
tableStructureChanged in interface TableStructureModificationListener<DATASOURCETYPE>public TableColumn getTableColumn(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 List<Object> getSelectedDataSourcesList()
public List<Object> getSelectedPluginDataSourcesList()
public List<Object> getSelectedDataSources()
getSelectedDataSources in interface TableView<DATASOURCETYPE>public 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 List<TableRowCore> getSelectedRowsList()
public boolean isSelected(TableRow row)
isSelected in interface TableView<DATASOURCETYPE>public TableRowCore getFocusedRow()
getFocusedRow in interface TableView<DATASOURCETYPE>public Object getFirstSelectedDataSource()
getFirstSelectedDataSource in interface TableView<DATASOURCETYPE>public 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 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 | ||||||||