Package com.biglybt.ui.common.table.impl
Class TableColumnManager
java.lang.Object
com.biglybt.ui.common.table.impl.TableColumnManager
Holds a list of column definitions (TableColumnCore) for
all the tables in Azureus.
Column definitions are added via
PluginInterface.addColumn(TableColumn)
See Use javadoc section for more uses.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map
Holds the order in which the columns are auto-hidden key = TABLE_* type value = List of TableColumn, indexed in the order they should be removedprivate static AEMonitor
private static final String
private static TableColumnManager
private boolean
private Map
<String, Map<String, TableColumnCore>> private AEMonitor
private long
private Map
<String, TableColumnCreationListener> key = TableID; value = table column idsprivate static Comparator
<TableColumn> private static final boolean
private Object
key = table; value = map of columns Do not access directly. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumns
(TableColumnCore[] itemsToAdd) Adds a column definition to the listString[]
appendLists
(String[] list1, String[] list2) static String
createSubViewID
(String base, String sub) private void
Helper for getAllTableColumnCorevoid
ensureIntegrity
(Class dataSourceType, String sTableID) void
generateDiagnostics
(IndentWriter writer) private Map
<String, TableColumnCore> getAllTableColumnCore
(Class forDataSourceType, String tableID) Will create columns for tableID if neededgetAllTableColumnCoreAsArray
(Class forDataSourceType, String tableID) getAutoHideOrder
(String sTableID) static String
getBaseViewID
(String id) getColumnInfo
(TableColumnCore column) getColumnInfo
(Class forDataSourceType, String forTableID, String columnID) String[]
getDefaultColumnNames
(String tableID) String[]
getDefaultSortColumnNames
(String tableID) static TableColumnManager
Retrieve the static TableColumnManager instancegetTableColumnCore
(String sTableID, String sColumnName) int
getTableColumnCount
(String sTableID) static Comparator
<TableColumn> getTableColumnsAsMap
(Class forDataSourceType, String sTableID) Retrieves TableColumnCore objects of a particular type.private Map
getTableConfigDefaultMap
(String sTableID) getTableConfigMap
(String sTableID) String[]
private Map
boolean
hasTableColumnSettings
(String sTableID) boolean
loadTableColumnSettings
(Class forDataSourceType, String sTableID) private void
void
registerColumn
(Class forDataSourceType, String columnID, TableColumnCreationListener listener) void
removeColumns
(TableColumnCore[] itemsToRemove) Remove a column definition from the listvoid
void
resetColumns
(Class dataSourceType, String tableID) void
saveTableColumns
(Class forDataSourceType, String sTableID) private void
void
setAutoHideOrder
(String sTableID, String[] autoHideOrderColumnIDs) void
setDefaultColumnNames
(String tableID, TableColumn[] columns) void
setDefaultColumnNames
(String tableID, String[] columnNames) void
setDefaultSortColumnName
(String tableID, String... columnNames) protected void
setSortColumnNames
(String tableID, String... columnNames) void
setTableConfigDefault
(String sTableID, Map mapTableConfig) private void
setTableConfigDefaultMap
(String sTableID, Map mapTableConfigDefault) void
setTableConfigMap
(String sTableID, Map mapTableConfig) void
unregisterColumn
(Class forDataSourceType, String columnID)
-
Field Details
-
CONFIG_FILE
- See Also:
-
instance
-
class_mon
-
items
-
items_mon
-
autoHideOrder
Holds the order in which the columns are auto-hidden key = TABLE_* type value = List of TableColumn, indexed in the order they should be removed -
tablesConfig
key = table; value = map of columns Do not access directly. UsegetTableConfigMap(String)
orsaveTableConfigs()
-
lastTableConfigAccess
private long lastTableConfigAccess -
orderComparator
-
mapColumnIDsToListener
-
mapDataSourceTypeToColumnIDs
-
mapTableDefaultColumns
key = TableID; value = table column ids -
mapTableIDsDSTs
-
mapResetTable_Version
-
RERESET
private static final boolean RERESET- See Also:
-
isDirty
private boolean isDirty
-
-
Constructor Details
-
TableColumnManager
private TableColumnManager()
-
-
Method Details
-
getInstance
Retrieve the static TableColumnManager instance- Returns:
- the static TableColumnManager instance
-
addColumns
Adds a column definition to the list- Parameters:
itemsToAdd
- The column definition object
-
removeColumns
Remove a column definition from the list- Parameters:
itemsToRemove
- The column definition object
-
getTableColumnsAsMap
Retrieves TableColumnCore objects of a particular type.- Parameters:
forDataSourceType
-sTableID
- TABLE_* constant. SeeTableColumn
for list of constants- Returns:
- Map of column definition objects matching the supplied criteria. key = name value = TableColumnCore object
-
getTableColumnCount
-
getAllTableColumnCoreAsArray
-
getDefaultColumnNames
-
setDefaultColumnNames
-
setDefaultColumnNames
-
getAllTableColumnCore
Will create columns for tableID if needed -
doAddCreate
Helper for getAllTableColumnCore- Since:
- 4.0.0.5
-
getTableIDs
-
appendLists
-
getTableColumnCore
-
ensureIntegrity
-
getDefaultSortColumnNames
-
setDefaultSortColumnName
-
setSortColumnNames
-
saveTableConfigs
private void saveTableConfigs() -
saveTableColumns
-
loadTableColumnSettings
-
hasTableColumnSettings
-
getTablesConfigMap
-
getTableConfigMap
-
setTableConfigMap
-
createSubViewID
-
getBaseViewID
-
getTableConfigDefaultMap
-
setTableConfigDefaultMap
-
setTableConfigDefault
-
setAutoHideOrder
-
getAutoHideOrder
-
generateDiagnostics
- Parameters:
writer
-
-
getTableColumnOrderComparator
-
registerColumn
public void registerColumn(Class forDataSourceType, String columnID, TableColumnCreationListener listener) - Parameters:
forDataSourceType
-columnID
-listener
-- Since:
- 3.1.1.1
-
unregisterColumn
-
getColumnInfo
-
getColumnInfo
-
resetAllTables
public void resetAllTables() -
resetColumns
-
markDirty
private void markDirty()
-