Class TableColumnImpl
- java.lang.Object
-
- com.biglybt.ui.common.table.impl.TableColumnImpl
-
- All Implemented Interfaces:
TableColumn
,TableColumnCore
,java.util.Comparator<TableRowCore>
- Direct Known Subclasses:
CoreTableColumn
public class TableColumnImpl extends java.lang.Object implements TableColumnCore
Table Column definition and modification routines. Implements both the plugin API and the core API.A column is defined in relation to a table. When one column is in multiple tables of different table ids, each table has it's own column instance
- See Also:
TableColumnManager
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
ATTRIBUTE_NAME_OVERIDE
private boolean
auto_tooltip
private int[]
backgroundColor
private boolean
bColumnAdded
private boolean
bCoreDataSource
private boolean
bDefaultSortAscending
private boolean
bObfuscateData
private boolean
bPreferredWidthAuto
private boolean
bSortAscending
private boolean
bSortValueLive
private boolean
bVisible
private java.util.ArrayList<TableCellAddedListener>
cellAddedListeners
private java.util.ArrayList<TableCellClipboardListener>
cellClipboardListeners
private java.util.ArrayList<TableCellDisposeListener>
cellDisposeListeners
private TableCellInplaceEditorListener
cellEditorListener
private java.util.ArrayList<TableCellMouseListener>
cellMouseListeners
private java.util.ArrayList<TableCellMouseMoveListener>
cellMouseMoveListeners
private java.util.ArrayList<TableCellRefreshListener>
cellRefreshListeners
private java.util.ArrayList<TableCellToolTipListener>
cellToolTipListeners
private java.util.ArrayList<TableCellVisibilityListener>
cellVisibilityListeners
private static java.lang.String
CFG_SORTDIRECTION
private java.util.ArrayList<TableColumnExtraInfoListener>
columnExtraInfoListeners
private boolean
firstLoad
private int[]
foregroundColor
private java.util.List<java.lang.Class<?>>
forPluginDataSourceTypes
private int
iAlignment
private java.lang.String
iconID
private int
iConsecutiveErrCount
private int
iDefaultAlignment
private int
iDefaultWidth
private int
iInterval
private int
iMaxWidth
private int
iMinWidth
private static boolean
intiutiveSorting
private static java.util.Comparator<java.lang.String>
intuitiveComparator
private int
iPosition
private int
iPreferredWidth
private int
iPreferredWidthMax
private boolean
isDirty
private int
iType
private int
iWidth
private long
lLastSortValueChange
private long
lStatsRefreshCount
private long
lStatsRefreshTotalTime
private long
lStatsRefreshZeroCount
private java.util.Map<java.lang.String,java.util.List<java.lang.Object>>
mapOtherCellListeners
private java.util.ArrayList<TableContextMenuItem>
menuItemsColumn
private java.util.ArrayList<TableContextMenuItem>
menuItemsHeader
private boolean
postLoadConfig
private boolean
removed
private boolean
showOnlyImage
private java.lang.String
sName
Internal Name/ID of the columnprivate java.lang.String
sTableID
Table the column belongs toprivate java.lang.String
sTitleLanguageKey
key of the displayed title for the column.protected AEMonitor
this_mon
private static UIFunctions
uiFunctions
private java.util.Map
userData
-
Fields inherited from interface com.biglybt.pif.ui.tables.TableColumn
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEAD, ALIGN_TOP, ALIGN_TRAIL, CAT_BYTES, CAT_CONNECTION, CAT_CONTENT, CAT_ESSENTIAL, CAT_PEER_IDENTIFICATION, CAT_PROGRESS, CAT_PROTOCOL, CAT_SETTINGS, CAT_SHARING, CAT_SWARM, CAT_TIME, CAT_TRACKER, INTERVAL_GRAPHIC, INTERVAL_INVALID_ONLY, INTERVAL_LIVE, MENU_STYLE_COLUMN_DATA, MENU_STYLE_HEADER, POSITION_INVISIBLE, POSITION_LAST, TYPE_GRAPHIC, TYPE_TEXT, TYPE_TEXT_ONLY, UD_FORCE_VISIBLE
-
-
Constructor Summary
Constructors Constructor Description TableColumnImpl(java.lang.String tableID, java.lang.String columnID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCellAddedListener(TableCellAddedListener listener)
Adds a listener that triggers when a TableCell that belongs to this column is being added.void
addCellClipboardListener(TableCellClipboardListener listener)
void
addCellDisposeListener(TableCellDisposeListener listener)
Adds a listener that triggers when a TableCell that belongs to this column is being disposed.void
addCellMouseListener(TableCellMouseListener listener)
Adds a listener that triggers when a TableCell that belongs to this column has a mouse event.void
addCellMouseMoveListener(TableCellMouseMoveListener listener)
void
addCellOtherListener(java.lang.String listenerID, java.lang.Object listener)
void
addCellRefreshListener(TableCellRefreshListener listener)
Adds a listener that triggers when a TableCell that belongs to this column needs refreshing.void
addCellToolTipListener(TableCellToolTipListener listener)
Adds a listener that triggers when a TableCell that belongs to this column has a tooltip actionvoid
addCellVisibilityListener(TableCellVisibilityListener listener)
void
addColumnExtraInfoListener(TableColumnExtraInfoListener listener)
TableContextMenuItem
addContextMenuItem(java.lang.String key)
Adds a Context Menu item to data section of the columnTableContextMenuItem
addContextMenuItem(java.lang.String key, int menuStyle)
Adds a Context Menu item to the columnvoid
addDataSourceType(java.lang.Class<?> cla)
void
addDataSourceTypes(java.lang.Class[] datasourceTypes)
void
addListeners(java.lang.Object listenerObject)
A listener is added for every type of cell listener the supplied object implementsvoid
addRefreshTime(long ms)
int
compare(TableRowCore arg0, TableRowCore arg1)
boolean
doesAutoTooltip()
void
generateDiagnostics(IndentWriter writer)
int
getAlignment()
Returns the alignment of the columnint[]
getBackgroundColor()
java.util.List
getCellAddedListeners()
Retreive all the Cell Added listenersjava.lang.Object[]
getCellOtherListeners(java.lang.String listenerID)
java.util.List<TableCellRefreshListener>
getCellRefreshListeners()
Retrieve all the refresh listeners for the celljava.lang.String
getClipboardText(TableCell cell)
boolean
getColumnAdded()
Retrieve whether the column has been added to the TableColumnManagerjava.util.List<TableColumnExtraInfoListener>
getColumnExtraInfoListeners()
int
getConsecutiveErrCount()
TableContextMenuItem[]
getContextMenuItems(int menuStyle)
java.lang.Class
getForDataSourceType()
java.lang.Class[]
getForDataSourceTypes()
int[]
getForegroundColor()
java.lang.String
getIconReference()
TableCellInplaceEditorListener
getInplaceEditorListener()
long
getLastSortValueChange()
private java.lang.String
getListCountString(java.util.List<?> l)
int
getMaxWidth()
Gets the maximum width the column can beint
getMinWidth()
Gets the minimum width that the column can be before other columns start collapsing.java.lang.String
getName()
The logical name of the column.java.lang.String
getNameOverride()
Returns the user's column name override if it existsint
getPosition()
Returns the position of the columnint
getPreferredWidth()
Gets the preferred width of the coloumn.int
getPreferredWidthMax()
int
getRefreshInterval()
Returns the refresh interval of the column.java.lang.String
getTableID()
Which table the column will be visible in.java.lang.String
getTitleLanguageKey()
Returns the key in the properties bundle that has the title of the column.java.lang.String
getTitleLanguageKey(boolean with_renames)
int
getType()
Returns the type of the contained data.boolean
getUseCoreDataSource()
Retrieve whether a core or plugin object is sent via getDataSource()java.lang.Object
getUserData(java.lang.String key)
java.lang.String
getUserDataString(java.lang.String key)
int
getWidth()
Returns the column's sizeboolean
handlesDataSourceType(java.lang.Class<?> cla)
boolean
hasCellMouseMoveListener()
boolean
hasCellOtherListeners(java.lang.String listenerID)
boolean
hasCellRefreshListener()
boolean
hasInplaceEditorListener()
private void
init(java.lang.String tableID, java.lang.String columnID)
void
initialize(int iAlignment, int iPosition, int iWidth)
Initialize a group of variables all at once.void
initialize(int iAlignment, int iPosition, int iWidth, int iInterval)
Initialize a group of variables all at once.void
invalidateCell(java.lang.Object data_source)
Invalidates any cells which are linked to the given data source object.void
invalidateCells()
Invalidate all cells in this column.void
invokeCellAddedListeners(TableCell cell)
Send a cellAdded trigger to all listeners stored in TableColumnvoid
invokeCellDisposeListeners(TableCell cell)
Send a dispose trigger to all listeners stored in TableColumnvoid
invokeCellMouseListeners(TableCellMouseEvent event)
Send a mouse event to the cell mouse listenersvoid
invokeCellRefreshListeners(TableCell cell, boolean fastRefresh)
Send a refresh trigger to all listeners stored in TableColumnvoid
invokeCellToolTipListeners(TableCellCore cell, int type)
Send a tool tip event to the tool tip listenersvoid
invokeCellVisibilityListeners(TableCellCore cell, int visibility)
Send a visibility event to the cell's visibility listenersboolean
isDirty()
boolean
isFirstLoad()
boolean
isObfuscated()
Returns whether the column's data will be obfuscated when screen capturing (for bug reports, etc).boolean
isPreferredWidthAuto()
Retrieves whether the preferred width is automatically calculated.boolean
isRemoved()
boolean
isSortAscending()
boolean
isSortValueLive()
boolean
isVisible()
Gets the visibility of the columnvoid
loadSettings(java.util.Map mapSettings)
Load width and position settings from config.private void
markDirty()
void
postConfigLoad()
implement this method if you want to be notified when the stored column configuration such as user data or GUI-adjustable properties have been loadedvoid
preAdd()
void
preConfigSave()
implement this method if you want to be notified when the column configuration is about to be serializedvoid
remove()
void
removeCellAddedListener(TableCellAddedListener listener)
void
removeCellClipboardListener(TableCellClipboardListener listener)
void
removeCellDisposeListener(TableCellDisposeListener listener)
void
removeCellMouseListener(TableCellMouseListener listener)
Remove a previously added TableCellMouseListenervoid
removeCellMouseMoveListener(TableCellMouseMoveListener listener)
void
removeCellOtherListener(java.lang.String listenerID, java.lang.Object l)
void
removeCellRefreshListener(TableCellRefreshListener listener)
Removed a previously added TableCellRefreshListenervoid
removeCellToolTipListener(TableCellToolTipListener listener)
void
removeCellVisibilityListener(TableCellVisibilityListener listener)
void
removeColumnExtraInfoListener(TableColumnExtraInfoListener listener)
void
removeContextMenuItem(TableContextMenuItem menuItem)
void
removeUserData(java.lang.String key)
void
reset()
void
saveSettings(java.util.Map mapSettings)
Save width and position settings to config.void
setAlignment(int alignment)
Orientation of the columns text and header.void
setAutoTooltip(boolean auto_tooltip)
void
setBackgroundColor(int[] rgb)
void
setColumnAdded()
Set the internal flag specifying whether the column has been added to the TableColumnManager.void
setConsecutiveErrCount(int iCount)
void
setDefaultSortAscending(boolean bAscending)
void
setForegroundColor(int[] rgb)
void
setIconReference(java.lang.String iconID, boolean showOnlyIcon)
void
setInplaceEditorListener(TableCellInplaceEditorListener l)
void
setLastSortValueChange(long lastSortValueChange)
void
setMaxWidth(int maxwidth)
Sets the maximum width that the column can bevoid
setMinimumRequiredUserMode(int mode)
*since 4501void
setMinWidth(int minwidth)
Sets the minimum width that the column can be before other columns start collapsing.void
setNameOverride(java.lang.String name)
void
setObfuscation(boolean hideData)
Sets whether the column's data will be obfuscated during a screen capture (for bug reports, etc).void
setPosition(int position)
Location to put the column.void
setPositionNoShift(int position)
Sets the position of the column without adjusting the other columns.void
setPreferredWidth(int width)
Sets the preferred width of the column.void
setPreferredWidthAuto(boolean auto)
Sets whether the preferred with is automatically calculated.void
setPreferredWidthMax(int maxprefwidth)
void
setRefreshInterval(int interval)
Set how often the cell receives a refresh() triggervoid
setSortAscending(boolean bAscending)
void
setSortValueLive(boolean live)
void
setTableID(java.lang.String tableID)
void
setType(int type)
The type of the contained data.
Current supported types are long, string, and graphic.void
setUseCoreDataSource(boolean bCoreDataSource)
Changes what {@link TableCellCore.getDataSource()} and {@link TableRowCore.getDataSource()} return.void
setUserData(java.lang.String key, java.lang.Object value)
Associates custom data with the column, usually meant for column-specific settings and stores it across sessionsvoid
setVisible(boolean visible)
Sets the visibility of the columnvoid
setWidth(int realPXWidth)
The column size.void
setWidthLimits(int min, int max)
Sets the minimum and maximum widths in one callvoid
setWidthPX(int width)
boolean
showOnlyImage()
void
triggerColumnSizeChange(int diff)
-
-
-
Field Detail
-
CFG_SORTDIRECTION
private static final java.lang.String CFG_SORTDIRECTION
- See Also:
- Constant Field Values
-
ATTRIBUTE_NAME_OVERIDE
private static final java.lang.String ATTRIBUTE_NAME_OVERIDE
- See Also:
- Constant Field Values
-
uiFunctions
private static UIFunctions uiFunctions
-
intuitiveComparator
private static java.util.Comparator<java.lang.String> intuitiveComparator
-
intiutiveSorting
private static boolean intiutiveSorting
-
sName
private java.lang.String sName
Internal Name/ID of the column
-
sTitleLanguageKey
private java.lang.String sTitleLanguageKey
key of the displayed title for the column. If null, uses default calc
-
iAlignment
private int iAlignment
-
iDefaultAlignment
private int iDefaultAlignment
-
iType
private int iType
-
iPosition
private int iPosition
-
iWidth
private int iWidth
-
iDefaultWidth
private int iDefaultWidth
-
iInterval
private int iInterval
-
lLastSortValueChange
private long lLastSortValueChange
-
foregroundColor
private int[] foregroundColor
-
backgroundColor
private int[] backgroundColor
-
sTableID
private java.lang.String sTableID
Table the column belongs to
-
bColumnAdded
private boolean bColumnAdded
-
bCoreDataSource
private boolean bCoreDataSource
-
cellEditorListener
private TableCellInplaceEditorListener cellEditorListener
-
cellRefreshListeners
private java.util.ArrayList<TableCellRefreshListener> cellRefreshListeners
-
cellAddedListeners
private java.util.ArrayList<TableCellAddedListener> cellAddedListeners
-
cellDisposeListeners
private java.util.ArrayList<TableCellDisposeListener> cellDisposeListeners
-
cellToolTipListeners
private java.util.ArrayList<TableCellToolTipListener> cellToolTipListeners
-
cellMouseListeners
private java.util.ArrayList<TableCellMouseListener> cellMouseListeners
-
cellMouseMoveListeners
private java.util.ArrayList<TableCellMouseMoveListener> cellMouseMoveListeners
-
cellVisibilityListeners
private java.util.ArrayList<TableCellVisibilityListener> cellVisibilityListeners
-
cellClipboardListeners
private java.util.ArrayList<TableCellClipboardListener> cellClipboardListeners
-
columnExtraInfoListeners
private java.util.ArrayList<TableColumnExtraInfoListener> columnExtraInfoListeners
-
mapOtherCellListeners
private java.util.Map<java.lang.String,java.util.List<java.lang.Object>> mapOtherCellListeners
-
iConsecutiveErrCount
private int iConsecutiveErrCount
-
menuItemsHeader
private java.util.ArrayList<TableContextMenuItem> menuItemsHeader
-
menuItemsColumn
private java.util.ArrayList<TableContextMenuItem> menuItemsColumn
-
bObfuscateData
private boolean bObfuscateData
-
this_mon
protected final AEMonitor this_mon
-
bSortValueLive
private boolean bSortValueLive
-
lStatsRefreshTotalTime
private long lStatsRefreshTotalTime
-
lStatsRefreshCount
private long lStatsRefreshCount
-
lStatsRefreshZeroCount
private long lStatsRefreshZeroCount
-
bSortAscending
private boolean bSortAscending
-
bDefaultSortAscending
private boolean bDefaultSortAscending
-
iMinWidth
private int iMinWidth
-
iMaxWidth
private int iMaxWidth
-
bVisible
private boolean bVisible
-
iPreferredWidth
private int iPreferredWidth
-
bPreferredWidthAuto
private boolean bPreferredWidthAuto
-
iPreferredWidthMax
private int iPreferredWidthMax
-
auto_tooltip
private boolean auto_tooltip
-
userData
private java.util.Map userData
-
removed
private boolean removed
-
forPluginDataSourceTypes
private java.util.List<java.lang.Class<?>> forPluginDataSourceTypes
-
iconID
private java.lang.String iconID
-
firstLoad
private boolean firstLoad
-
showOnlyImage
private boolean showOnlyImage
-
postLoadConfig
private boolean postLoadConfig
-
isDirty
private boolean isDirty
-
-
Method Detail
-
init
private void init(java.lang.String tableID, java.lang.String columnID)
-
initialize
public void initialize(int iAlignment, int iPosition, int iWidth, int iInterval)
Description copied from interface:TableColumn
Initialize a group of variables all at once. Saves on individual setXxx.- Specified by:
initialize
in interfaceTableColumn
- Parameters:
iAlignment
- SeeTableColumn.setAlignment(int)
iPosition
- SeeTableColumn.setPosition(int)
iWidth
- SeeTableColumn.setWidth(int)
iInterval
- SeeTableColumn.setRefreshInterval(int)
-
initialize
public void initialize(int iAlignment, int iPosition, int iWidth)
Description copied from interface:TableColumn
Initialize a group of variables all at once. Saves on individual setXxx.- Specified by:
initialize
in interfaceTableColumn
- Parameters:
iAlignment
- SeeTableColumn.setAlignment(int)
iPosition
- SeeTableColumn.setPosition(int)
iWidth
- SeeTableColumn.setWidth(int)
-
getName
public java.lang.String getName()
Description copied from interface:TableColumn
The logical name of the column. This was set viaTableManager.createColumn(java.lang.String, java.lang.String)
and can not be changed.- Specified by:
getName
in interfaceTableColumn
- Returns:
- the column name (identification)
-
getNameOverride
public java.lang.String getNameOverride()
Description copied from interface:TableColumn
Returns the user's column name override if it exists- Specified by:
getNameOverride
in interfaceTableColumn
- Returns:
-
setNameOverride
public void setNameOverride(java.lang.String name)
- Specified by:
setNameOverride
in interfaceTableColumn
-
getTableID
public java.lang.String getTableID()
Description copied from interface:TableColumn
Which table the column will be visible in. This was set viaTableManager.createColumn(java.lang.String, java.lang.String)
and can not be changed.- Specified by:
getTableID
in interfaceTableColumn
- Returns:
TableManager
.TABLE_* constant(s)
-
setType
public void setType(int type)
Description copied from interface:TableColumn
The type of the contained data.
Current supported types are long, string, and graphic.NOTE: This MUST be set BEFORE adding the column to a table.
The default type isTableColumn.TYPE_TEXT_ONLY
.- Specified by:
setType
in interfaceTableColumn
- Parameters:
type
-TableColumn.TYPE_TEXT
,TableColumn.TYPE_TEXT_ONLY
,TableColumn.TYPE_GRAPHIC
-
getType
public int getType()
Description copied from interface:TableColumn
Returns the type of the contained data.- Specified by:
getType
in interfaceTableColumn
- Returns:
- type TYPE_TEXT, or TYPE_GRAPHIC
-
setWidth
public void setWidth(int realPXWidth)
Description copied from interface:TableColumn
The column size.NOTE: This MUST be set BEFORE adding the column to a table.
- Specified by:
setWidth
in interfaceTableColumn
-
setWidthPX
public void setWidthPX(int width)
- Specified by:
setWidthPX
in interfaceTableColumn
-
triggerColumnSizeChange
public void triggerColumnSizeChange(int diff)
- Specified by:
triggerColumnSizeChange
in interfaceTableColumnCore
-
getWidth
public int getWidth()
Description copied from interface:TableColumn
Returns the column's size- Specified by:
getWidth
in interfaceTableColumn
- Returns:
- width in pixels
-
setPosition
public void setPosition(int position)
Description copied from interface:TableColumn
Location to put the column. When set before being added to the UI (seeTableManager.addColumn(com.biglybt.pif.ui.tables.TableColumn)
), the supplied value will be used as the default position. If the user has moved the column previously, the new position will be used, and the default position will be ignored. This function cannot be called after you have added the column to a UI table. In the future, setting the position after adding the column to the UI table will result in the column being moved.- Specified by:
setPosition
in interfaceTableColumn
- Parameters:
position
- Column Number (0 based), POSITION_INVISIBLE or POSITION_LAST
-
getPosition
public int getPosition()
Description copied from interface:TableColumn
Returns the position of the column- Specified by:
getPosition
in interfaceTableColumn
- Returns:
- Column Number (0 based), POSITION_INVISIBLE or POSITION_LAST
-
setAlignment
public void setAlignment(int alignment)
Description copied from interface:TableColumn
Orientation of the columns text and header.NOTE: This MUST be set BEFORE adding the column to a table.
- Specified by:
setAlignment
in interfaceTableColumn
- Parameters:
alignment
- ALIGN_TRAIL, ALIGN_LEAD, or ALIGN_CENTER
-
getAlignment
public int getAlignment()
Description copied from interface:TableColumn
Returns the alignment of the column- Specified by:
getAlignment
in interfaceTableColumn
- Returns:
- ALIGN_TRAIL, ALIGN_LEAD, or ALIGN_CENTER
-
getForegroundColor
public int[] getForegroundColor()
- Specified by:
getForegroundColor
in interfaceTableColumnCore
-
setForegroundColor
public void setForegroundColor(int[] rgb)
- Specified by:
setForegroundColor
in interfaceTableColumnCore
-
getBackgroundColor
public int[] getBackgroundColor()
- Specified by:
getBackgroundColor
in interfaceTableColumnCore
-
setBackgroundColor
public void setBackgroundColor(int[] rgb)
- Specified by:
setBackgroundColor
in interfaceTableColumnCore
-
addCellRefreshListener
public void addCellRefreshListener(TableCellRefreshListener listener)
Description copied from interface:TableColumn
Adds a listener that triggers when a TableCell that belongs to this column needs refreshing.- Specified by:
addCellRefreshListener
in interfaceTableColumn
- Parameters:
listener
- Listener Object to be called when refresh is needed.
-
getCellRefreshListeners
public java.util.List<TableCellRefreshListener> getCellRefreshListeners()
Description copied from interface:TableColumnCore
Retrieve all the refresh listeners for the cell- Specified by:
getCellRefreshListeners
in interfaceTableColumnCore
- Returns:
- Cell refresh listeners
-
removeCellRefreshListener
public void removeCellRefreshListener(TableCellRefreshListener listener)
Description copied from interface:TableColumn
Removed a previously added TableCellRefreshListener- Specified by:
removeCellRefreshListener
in interfaceTableColumn
- Parameters:
listener
- Previously added listener
-
hasCellRefreshListener
public boolean hasCellRefreshListener()
- Specified by:
hasCellRefreshListener
in interfaceTableColumnCore
- Returns:
-
setRefreshInterval
public void setRefreshInterval(int interval)
Description copied from interface:TableColumn
Set how often the cell receives a refresh() trigger- Specified by:
setRefreshInterval
in interfaceTableColumn
- Parameters:
interval
- INTERVAL_GRAPHIC, INTERVAL_LIVE, INTERVAL_INVALID_ONLY constants, or an integer based on the user-configurable "GUI refresh interval". For example, specifying 4 will result in a refresh trigger every 4 "GUI refresh intervals"
-
getRefreshInterval
public int getRefreshInterval()
Description copied from interface:TableColumn
Returns the refresh interval of the column. The default is INTERVAL_INVALID_ONLY- Specified by:
getRefreshInterval
in interfaceTableColumn
- Returns:
- INTERVAL_* constant, or a number representing the # of GUI refresh cycles between each cell refresh call.
-
addCellAddedListener
public void addCellAddedListener(TableCellAddedListener listener)
Description copied from interface:TableColumn
Adds a listener that triggers when a TableCell that belongs to this column is being added.- Specified by:
addCellAddedListener
in interfaceTableColumn
- Parameters:
listener
- Listener Object to be called when refresh is needed.
-
addCellOtherListener
public void addCellOtherListener(java.lang.String listenerID, java.lang.Object listener)
- Specified by:
addCellOtherListener
in interfaceTableColumnCore
-
removeCellOtherListener
public void removeCellOtherListener(java.lang.String listenerID, java.lang.Object l)
- Specified by:
removeCellOtherListener
in interfaceTableColumnCore
-
getCellOtherListeners
public java.lang.Object[] getCellOtherListeners(java.lang.String listenerID)
- Specified by:
getCellOtherListeners
in interfaceTableColumnCore
- Returns:
-
hasCellOtherListeners
public boolean hasCellOtherListeners(java.lang.String listenerID)
- Specified by:
hasCellOtherListeners
in interfaceTableColumnCore
- Returns:
-
getCellAddedListeners
public java.util.List getCellAddedListeners()
Description copied from interface:TableColumnCore
Retreive all the Cell Added listeners- Specified by:
getCellAddedListeners
in interfaceTableColumnCore
- Returns:
- cell added listeners for this cell
-
removeCellAddedListener
public void removeCellAddedListener(TableCellAddedListener listener)
- Specified by:
removeCellAddedListener
in interfaceTableColumn
-
addCellDisposeListener
public void addCellDisposeListener(TableCellDisposeListener listener)
Description copied from interface:TableColumn
Adds a listener that triggers when a TableCell that belongs to this column is being disposed.- Specified by:
addCellDisposeListener
in interfaceTableColumn
- Parameters:
listener
- Listener Object to be called when refresh is needed.
-
removeCellDisposeListener
public void removeCellDisposeListener(TableCellDisposeListener listener)
- Specified by:
removeCellDisposeListener
in interfaceTableColumn
-
addCellToolTipListener
public void addCellToolTipListener(TableCellToolTipListener listener)
Description copied from interface:TableColumn
Adds a listener that triggers when a TableCell that belongs to this column has a tooltip action- Specified by:
addCellToolTipListener
in interfaceTableColumn
- Parameters:
listener
- Listener Object to be called when refresh is needed.
-
removeCellToolTipListener
public void removeCellToolTipListener(TableCellToolTipListener listener)
- Specified by:
removeCellToolTipListener
in interfaceTableColumn
-
addCellMouseListener
public void addCellMouseListener(TableCellMouseListener listener)
Description copied from interface:TableColumn
Adds a listener that triggers when a TableCell that belongs to this column has a mouse event.- Specified by:
addCellMouseListener
in interfaceTableColumn
-
removeCellMouseListener
public void removeCellMouseListener(TableCellMouseListener listener)
Description copied from interface:TableColumn
Remove a previously added TableCellMouseListener- Specified by:
removeCellMouseListener
in interfaceTableColumn
- Parameters:
listener
- Previously added listener
-
hasCellMouseMoveListener
public boolean hasCellMouseMoveListener()
- Specified by:
hasCellMouseMoveListener
in interfaceTableColumnCore
- Returns:
-
addCellMouseMoveListener
public void addCellMouseMoveListener(TableCellMouseMoveListener listener)
-
removeCellMouseMoveListener
public void removeCellMouseMoveListener(TableCellMouseMoveListener listener)
-
addCellClipboardListener
public void addCellClipboardListener(TableCellClipboardListener listener)
-
removeCellClipboardListener
public void removeCellClipboardListener(TableCellClipboardListener listener)
-
addCellVisibilityListener
public void addCellVisibilityListener(TableCellVisibilityListener listener)
-
removeCellVisibilityListener
public void removeCellVisibilityListener(TableCellVisibilityListener listener)
-
getColumnExtraInfoListeners
public java.util.List<TableColumnExtraInfoListener> getColumnExtraInfoListeners()
- Specified by:
getColumnExtraInfoListeners
in interfaceTableColumnCore
- Returns:
-
addColumnExtraInfoListener
public void addColumnExtraInfoListener(TableColumnExtraInfoListener listener)
- Specified by:
addColumnExtraInfoListener
in interfaceTableColumn
-
removeColumnExtraInfoListener
public void removeColumnExtraInfoListener(TableColumnExtraInfoListener listener)
- Specified by:
removeColumnExtraInfoListener
in interfaceTableColumn
-
invalidateCells
public void invalidateCells()
Description copied from interface:TableColumn
Invalidate all cells in this column. The cells will be forced to update on the next refresh.- Specified by:
invalidateCells
in interfaceTableColumn
-
invalidateCell
public void invalidateCell(java.lang.Object data_source)
Description copied from interface:TableColumn
Invalidates any cells which are linked to the given data source object.- Specified by:
invalidateCell
in interfaceTableColumn
-
addListeners
public void addListeners(java.lang.Object listenerObject)
Description copied from interface:TableColumn
A listener is added for every type of cell listener the supplied object implements- Specified by:
addListeners
in interfaceTableColumn
- Parameters:
listenerObject
- Object implementing some cell listeneters
-
setColumnAdded
public void setColumnAdded()
Description copied from interface:TableColumnCore
Set the internal flag specifying whether the column has been added to the TableColumnManager. Some functions can not be run after a column has been added.- Specified by:
setColumnAdded
in interfaceTableColumnCore
-
getColumnAdded
public boolean getColumnAdded()
Description copied from interface:TableColumnCore
Retrieve whether the column has been added to the TableColumnManager- Specified by:
getColumnAdded
in interfaceTableColumnCore
- Returns:
- true - Column has been added
false - Column has not been added
-
setUseCoreDataSource
public void setUseCoreDataSource(boolean bCoreDataSource)
Description copied from interface:TableColumnCore
Changes what {@link TableCellCore.getDataSource()} and {@link TableRowCore.getDataSource()} return.- Specified by:
setUseCoreDataSource
in interfaceTableColumnCore
- Parameters:
bCoreDataSource
- true - returns a core object
false - returns a plugin object (if available)
-
getUseCoreDataSource
public boolean getUseCoreDataSource()
Description copied from interface:TableColumnCore
Retrieve whether a core or plugin object is sent via getDataSource()- Specified by:
getUseCoreDataSource
in interfaceTableColumnCore
- Returns:
- true - returns a core object
false - returns a plugin object (if available)
-
invokeCellRefreshListeners
public void invokeCellRefreshListeners(TableCell cell, boolean fastRefresh) throws java.lang.Throwable
Description copied from interface:TableColumnCore
Send a refresh trigger to all listeners stored in TableColumn- Specified by:
invokeCellRefreshListeners
in interfaceTableColumnCore
- Parameters:
cell
- the cell is being refreshed- Throws:
java.lang.Throwable
-
invokeCellAddedListeners
public void invokeCellAddedListeners(TableCell cell)
Description copied from interface:TableColumnCore
Send a cellAdded trigger to all listeners stored in TableColumn- Specified by:
invokeCellAddedListeners
in interfaceTableColumnCore
- Parameters:
cell
- the cell is being added
-
invokeCellDisposeListeners
public void invokeCellDisposeListeners(TableCell cell)
Description copied from interface:TableColumnCore
Send a dispose trigger to all listeners stored in TableColumn- Specified by:
invokeCellDisposeListeners
in interfaceTableColumnCore
- Parameters:
cell
- the cell is being disposed
-
getClipboardText
public java.lang.String getClipboardText(TableCell cell)
- Specified by:
getClipboardText
in interfaceTableColumnCore
-
invokeCellToolTipListeners
public void invokeCellToolTipListeners(TableCellCore cell, int type)
Description copied from interface:TableColumnCore
Send a tool tip event to the tool tip listeners- Specified by:
invokeCellToolTipListeners
in interfaceTableColumnCore
- Parameters:
cell
- Cell to get the tool tip event
-
invokeCellMouseListeners
public void invokeCellMouseListeners(TableCellMouseEvent event)
Description copied from interface:TableColumnCore
Send a mouse event to the cell mouse listeners- Specified by:
invokeCellMouseListeners
in interfaceTableColumnCore
- Parameters:
event
- Mouse Event to send
-
invokeCellVisibilityListeners
public void invokeCellVisibilityListeners(TableCellCore cell, int visibility)
Description copied from interface:TableColumnCore
Send a visibility event to the cell's visibility listeners- Specified by:
invokeCellVisibilityListeners
in interfaceTableColumnCore
visibility
- Visibility state
-
setPositionNoShift
public void setPositionNoShift(int position)
Description copied from interface:TableColumnCore
Sets the position of the column without adjusting the other columns. This will cause duplicate columns, and is only usefull if you are adjusting the positions of multiple columns at once.- Specified by:
setPositionNoShift
in interfaceTableColumnCore
- Parameters:
position
- new position (0 based)
-
getUserData
public java.lang.Object getUserData(java.lang.String key)
- Specified by:
getUserData
in interfaceTableColumn
- Returns:
- data set via setUserData()
-
getUserDataString
public java.lang.String getUserDataString(java.lang.String key)
- Specified by:
getUserDataString
in interfaceTableColumn
-
setUserData
public void setUserData(java.lang.String key, java.lang.Object value)
Description copied from interface:TableColumn
Associates custom data with the column, usually meant for column-specific settings and stores it across sessions- Specified by:
setUserData
in interfaceTableColumn
- Parameters:
key
- the key under which the value will be stored and serializedvalue
- should be BEncodable, otherwise it won't be serialized
-
removeUserData
public void removeUserData(java.lang.String key)
- Specified by:
removeUserData
in interfaceTableColumn
-
remove
public void remove()
- Specified by:
remove
in interfaceTableColumn
-
isRemoved
public boolean isRemoved()
- Specified by:
isRemoved
in interfaceTableColumnCore
- Returns:
-
loadSettings
public final void loadSettings(java.util.Map mapSettings)
Description copied from interface:TableColumnCore
Load width and position settings from config.- Specified by:
loadSettings
in interfaceTableColumnCore
- Parameters:
mapSettings
- map to place settings into
-
isFirstLoad
public boolean isFirstLoad()
-
postConfigLoad
public void postConfigLoad()
Description copied from interface:TableColumn
implement this method if you want to be notified when the stored column configuration such as user data or GUI-adjustable properties have been loaded- Specified by:
postConfigLoad
in interfaceTableColumn
-
preAdd
public void preAdd()
-
preConfigSave
public void preConfigSave()
Description copied from interface:TableColumn
implement this method if you want to be notified when the column configuration is about to be serialized- Specified by:
preConfigSave
in interfaceTableColumn
-
saveSettings
public final void saveSettings(java.util.Map mapSettings)
Description copied from interface:TableColumnCore
Save width and position settings to config.- Specified by:
saveSettings
in interfaceTableColumnCore
- Parameters:
mapSettings
- map to place settings into
-
getTitleLanguageKey
public java.lang.String getTitleLanguageKey()
Description copied from interface:TableColumnCore
Returns the key in the properties bundle that has the title of the column.- Specified by:
getTitleLanguageKey
in interfaceTableColumnCore
- Returns:
- Title's language key
-
getTitleLanguageKey
public java.lang.String getTitleLanguageKey(boolean with_renames)
- Specified by:
getTitleLanguageKey
in interfaceTableColumnCore
-
getConsecutiveErrCount
public int getConsecutiveErrCount()
- Specified by:
getConsecutiveErrCount
in interfaceTableColumnCore
- Returns:
- # of consecutive errors
-
setConsecutiveErrCount
public void setConsecutiveErrCount(int iCount)
- Specified by:
setConsecutiveErrCount
in interfaceTableColumnCore
- Parameters:
iCount
- # of consecutive errors
-
removeContextMenuItem
public void removeContextMenuItem(TableContextMenuItem menuItem)
- Specified by:
removeContextMenuItem
in interfaceTableColumnCore
-
addContextMenuItem
public TableContextMenuItem addContextMenuItem(java.lang.String key)
Description copied from interface:TableColumn
Adds a Context Menu item to data section of the column- Specified by:
addContextMenuItem
in interfaceTableColumn
- Parameters:
key
- ID of the context menu, which is also used to retreieve the textual name from the plugin language file.- Returns:
- a newly created menu item
-
addContextMenuItem
public TableContextMenuItem addContextMenuItem(java.lang.String key, int menuStyle)
Description copied from interface:TableColumn
Adds a Context Menu item to the column- Specified by:
addContextMenuItem
in interfaceTableColumn
- Parameters:
key
- ID of the context menu, which is also used to retreieve the textual name from the plugin language file.menuStyle
- See MENU_STYLE_* constants (header or data)- Returns:
- a newly created menu item
-
getContextMenuItems
public TableContextMenuItem[] getContextMenuItems(int menuStyle)
- Specified by:
getContextMenuItems
in interfaceTableColumnCore
- Returns:
-
isObfuscated
public boolean isObfuscated()
Description copied from interface:TableColumn
Returns whether the column's data will be obfuscated when screen capturing (for bug reports, etc).Currently not fully implemented for plugins
- Specified by:
isObfuscated
in interfaceTableColumn
- Returns:
- Obfuscated value
-
setObfuscation
public void setObfuscation(boolean hideData)
Description copied from interface:TableColumn
Sets whether the column's data will be obfuscated during a screen capture (for bug reports, etc).- Specified by:
setObfuscation
in interfaceTableColumn
- Parameters:
hideData
- new state of obfuscation
-
getLastSortValueChange
public long getLastSortValueChange()
- Specified by:
getLastSortValueChange
in interfaceTableColumnCore
- Returns:
-
setLastSortValueChange
public void setLastSortValueChange(long lastSortValueChange)
- Specified by:
setLastSortValueChange
in interfaceTableColumnCore
-
isSortValueLive
public boolean isSortValueLive()
- Specified by:
isSortValueLive
in interfaceTableColumnCore
- Returns:
-
setSortValueLive
public void setSortValueLive(boolean live)
- Specified by:
setSortValueLive
in interfaceTableColumnCore
-
addRefreshTime
public void addRefreshTime(long ms)
- Specified by:
addRefreshTime
in interfaceTableColumnCore
-
generateDiagnostics
public void generateDiagnostics(IndentWriter writer)
- Specified by:
generateDiagnostics
in interfaceTableColumnCore
-
getListCountString
private java.lang.String getListCountString(java.util.List<?> l)
-
setTableID
public void setTableID(java.lang.String tableID)
- Specified by:
setTableID
in interfaceTableColumnCore
-
compare
public int compare(TableRowCore arg0, TableRowCore arg1)
- Specified by:
compare
in interfacejava.util.Comparator<TableRowCore>
- See Also:
TableView.sortRows(boolean)
-
setSortAscending
public void setSortAscending(boolean bAscending)
- Specified by:
setSortAscending
in interfaceTableColumnCore
- Parameters:
bAscending
- The bAscending to set.
-
isSortAscending
public boolean isSortAscending()
- Specified by:
isSortAscending
in interfaceTableColumnCore
- Returns:
- Returns the bAscending.
-
setDefaultSortAscending
public void setDefaultSortAscending(boolean bAscending)
- Specified by:
setDefaultSortAscending
in interfaceTableColumnCore
-
getMinWidth
public int getMinWidth()
Description copied from interface:TableColumn
Gets the minimum width that the column can be before other columns start collapsing.If not set, the width specified on initialize will be the minimum width
Not all UIs may have this feature implemented.
- Specified by:
getMinWidth
in interfaceTableColumn
- Returns:
- minumum width of the column
-
setMinWidth
public void setMinWidth(int minwidth)
Description copied from interface:TableColumn
Sets the minimum width that the column can be before other columns start collapsing. This may not prevent the user from resizing the column smaller than specified.If not set, the width specified on initialize will be the minimum width
Not all UIs may have this feature implemented.
- Specified by:
setMinWidth
in interfaceTableColumn
- Parameters:
minwidth
- new minumum width
-
getMaxWidth
public int getMaxWidth()
Description copied from interface:TableColumn
Gets the maximum width the column can beNot all UIs may have this feature implemented.
- Specified by:
getMaxWidth
in interfaceTableColumn
- Returns:
- maximum width of column
-
setMaxWidth
public void setMaxWidth(int maxwidth)
Description copied from interface:TableColumn
Sets the maximum width that the column can beNot all UIs may have this feature implemented.
- Specified by:
setMaxWidth
in interfaceTableColumn
- Parameters:
maxwidth
- new maximum width
-
setWidthLimits
public void setWidthLimits(int min, int max)
Description copied from interface:TableColumn
Sets the minimum and maximum widths in one callNot all UIs may have this min and max limits implemented.
- Specified by:
setWidthLimits
in interfaceTableColumn
- Parameters:
min
- New minimum column widthmax
- New maximum column width
-
isVisible
public boolean isVisible()
Description copied from interface:TableColumn
Gets the visibility of the columnNot all UIs may have this feature implemented.
- Specified by:
isVisible
in interfaceTableColumn
- Returns:
- Column visibility
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:TableColumn
Sets the visibility of the column- Specified by:
setVisible
in interfaceTableColumn
- Parameters:
visible
- New visibility state
-
getPreferredWidth
public int getPreferredWidth()
Description copied from interface:TableColumn
Gets the preferred width of the coloumn.- Specified by:
getPreferredWidth
in interfaceTableColumn
- Returns:
- preferred width
-
setPreferredWidthAuto
public void setPreferredWidthAuto(boolean auto)
Description copied from interface:TableColumn
Sets whether the preferred with is automatically calculated. An automatically calculated preferred width will be set to the largest text width known to that column- Specified by:
setPreferredWidthAuto
in interfaceTableColumn
- Parameters:
auto
- Preferred Width Auto State
-
isPreferredWidthAuto
public boolean isPreferredWidthAuto()
Description copied from interface:TableColumn
Retrieves whether the preferred width is automatically calculated.- Specified by:
isPreferredWidthAuto
in interfaceTableColumn
- Returns:
- preferred width auto calculation state
-
setPreferredWidthMax
public void setPreferredWidthMax(int maxprefwidth)
-
getPreferredWidthMax
public int getPreferredWidthMax()
-
setPreferredWidth
public void setPreferredWidth(int width)
Description copied from interface:TableColumn
Sets the preferred width of the column. When the UI is in auto-expand mode and space is made available, the columns will first fill to their preferred width, then to their maximum width.- Specified by:
setPreferredWidth
in interfaceTableColumn
- Parameters:
width
- New preferred width
-
setAutoTooltip
public void setAutoTooltip(boolean auto_tooltip)
- Specified by:
setAutoTooltip
in interfaceTableColumnCore
-
doesAutoTooltip
public boolean doesAutoTooltip()
- Specified by:
doesAutoTooltip
in interfaceTableColumnCore
-
setInplaceEditorListener
public void setInplaceEditorListener(TableCellInplaceEditorListener l)
- Specified by:
setInplaceEditorListener
in interfaceTableColumnCore
-
hasInplaceEditorListener
public boolean hasInplaceEditorListener()
- Specified by:
hasInplaceEditorListener
in interfaceTableColumnCore
-
getInplaceEditorListener
public TableCellInplaceEditorListener getInplaceEditorListener()
- Specified by:
getInplaceEditorListener
in interfaceTableColumnCore
-
getForDataSourceTypes
public java.lang.Class[] getForDataSourceTypes()
-
reset
public void reset()
- Specified by:
reset
in interfaceTableColumnCore
-
addDataSourceType
public void addDataSourceType(java.lang.Class<?> cla)
- Specified by:
addDataSourceType
in interfaceTableColumnCore
-
addDataSourceTypes
public void addDataSourceTypes(java.lang.Class[] datasourceTypes)
-
handlesDataSourceType
public boolean handlesDataSourceType(java.lang.Class<?> cla)
- Specified by:
handlesDataSourceType
in interfaceTableColumnCore
-
getForDataSourceType
public java.lang.Class getForDataSourceType()
- Specified by:
getForDataSourceType
in interfaceTableColumn
- Returns:
-
setIconReference
public void setIconReference(java.lang.String iconID, boolean showOnlyIcon)
- Specified by:
setIconReference
in interfaceTableColumn
-
getIconReference
public java.lang.String getIconReference()
- Specified by:
getIconReference
in interfaceTableColumn
-
setMinimumRequiredUserMode
public void setMinimumRequiredUserMode(int mode)
Description copied from interface:TableColumn
*since 4501- Specified by:
setMinimumRequiredUserMode
in interfaceTableColumn
- Parameters:
mode
- from Parameter. constants
-
showOnlyImage
public boolean showOnlyImage()
- Specified by:
showOnlyImage
in interfaceTableColumnCore
-
markDirty
private void markDirty()
-
isDirty
public boolean isDirty()
- Specified by:
isDirty
in interfaceTableColumnCore
-
-