com.aelitis.azureus.ui.common.table.impl
Class TableColumnImpl

java.lang.Object
  extended by com.aelitis.azureus.ui.common.table.impl.TableColumnImpl
All Implemented Interfaces:
TableColumnCore, Comparator, TableColumn
Direct Known Subclasses:
CoreTableColumn

public class TableColumnImpl
extends 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

Author:
TuxPaper
See Also:
TableColumnManager

Field Summary
protected  AEMonitor this_mon
           
 
Fields inherited from interface org.gudy.azureus2.plugins.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
TableColumnImpl(String tableID, String columnID)
           
 
Method Summary
 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(String listenerID, 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 action
 void addCellVisibilityListener(TableCellVisibilityListener listener)
           
 void addColumnExtraInfoListener(TableColumnExtraInfoListener listener)
           
 TableContextMenuItem addContextMenuItem(String key)
          Adds a Context Menu item to data section of the column
 TableContextMenuItem addContextMenuItem(String key, int menuStyle)
          Adds a Context Menu item to the column
 void addDataSourceType(Class<?> cla)
           
 void addDataSourceTypes(Class[] datasourceTypes)
           
 void addListeners(Object listenerObject)
          A listener is added for every type of cell listener the supplied object implements
 void addRefreshTime(long ms)
           
 int compare(Object arg0, Object arg1)
           
 boolean doesAutoTooltip()
           
 void generateDiagnostics(IndentWriter writer)
           
 int getAlignment()
          Returns the alignment of the column
 List getCellAddedListeners()
          Retreive all the Cell Added listeners
 Object[] getCellOtherListeners(String listenerID)
           
 List<TableCellRefreshListener> getCellRefreshListeners()
          Retrieve all the refresh listeners for the cell
 String getClipboardText(TableCell cell)
           
 boolean getColumnAdded()
          Retrieve whether the column has been added to the TableColumnManager
 List<TableColumnExtraInfoListener> getColumnExtraInfoListeners()
           
 int getConsecutiveErrCount()
           
 TableContextMenuItem[] getContextMenuItems(int menuStyle)
           
 Class getForDataSourceType()
           
 Class[] getForDataSourceTypes()
           
 String getIconReference()
           
 TableCellInplaceEditorListener getInplaceEditorListener()
           
 long getLastSortValueChange()
           
 int getMaxWidth()
          Gets the maximum width the column can be
 int getMinWidth()
          Gets the minimum width that the column can be before other columns start collapsing.
 String getName()
          The logical name of the column.
 String getNameOverride()
          Returns the user's column name override if it exists
 int getPosition()
          Returns the position of the column
 int getPreferredWidth()
          Gets the preferred width of the coloumn.
 int getPreferredWidthMax()
           
 int getRefreshInterval()
          Returns the refresh interval of the column.
 String getTableID()
          Which table the column will be visible in.
 String getTitleLanguageKey()
          Returns the key in the properties bundle that has the title of the column.
 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()
 Object getUserData(String key)
           
 String getUserDataString(String key)
           
 int getWidth()
          Returns the column's size
 boolean handlesDataSourceType(Class<?> cla)
           
 boolean hasCellMouseMoveListener()
           
 boolean hasCellOtherListeners(String listenerID)
           
 boolean hasCellRefreshListener()
           
 boolean hasInplaceEditorListener()
           
 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(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 TableColumn
 void invokeCellDisposeListeners(TableCell cell)
          Send a dispose trigger to all listeners stored in TableColumn
 void invokeCellMouseListeners(TableCellMouseEvent event)
          Send a mouse event to the cell mouse listeners
 void invokeCellRefreshListeners(TableCell cell, boolean fastRefresh)
          Send a refresh trigger to all listeners stored in TableColumn
 void invokeCellToolTipListeners(TableCellCore cell, int type)
          Send a tool tip event to the tool tip listeners
 void invokeCellVisibilityListeners(TableCellCore cell, int visibility)
          Send a visibility event to the cell's visibility listeners
 boolean isFirstLoad()
           
 boolean isMaxWidthAuto()
          Retrieve whether the max width is automatically being set.
 boolean isMinWidthAuto()
          Retrieve whether the min width is automatically being set
 boolean isObfusticated()
          Returns whether the column's data will be obfusticated 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 column
 void loadSettings(Map mapSettings)
          Load width and position settings from config.
 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 loaded
 void preAdd()
           
 void preConfigSave()
          implement this method if you want to be notified when the column configuration is about to be serialized
 void remove()
           
 void removeCellAddedListener(TableCellAddedListener listener)
           
 void removeCellClipboardListener(TableCellClipboardListener listener)
           
 void removeCellDisposeListener(TableCellDisposeListener listener)
           
 void removeCellMouseListener(TableCellMouseListener listener)
          Remove a previously added TableCellMouseListener
 void removeCellMouseMoveListener(TableCellMouseMoveListener listener)
           
 void removeCellOtherListener(String listenerID, Object l)
           
 void removeCellRefreshListener(TableCellRefreshListener listener)
          Removed a previously added TableCellRefreshListener
 void removeCellToolTipListener(TableCellToolTipListener listener)
           
 void removeCellVisibilityListener(TableCellVisibilityListener listener)
           
 void removeColumnExtraInfoListener(TableColumnExtraInfoListener listener)
           
 void removeContextMenuItem(TableContextMenuItem menuItem)
           
 void removeUserData(String key)
           
 void reset()
           
 void saveSettings(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 setColumnAdded()
          Set the internal flag specifying whether the column has been added to the TableColumnManager.
 void setConsecutiveErrCount(int iCount)
           
 void setDefaultSortAscending(boolean bAscending)
           
 void setIconReference(String iconID, boolean showOnlyIcon)
           
 void setInplaceEditorListener(TableCellInplaceEditorListener l)
           
 void setLastSortValueChange(long lastSortValueChange)
           
 void setMaxWidth(int maxwidth)
          Sets the maximum width that the column can be
 void setMaxWidthAuto(boolean automaxwidth)
          Sets whether the max width is automatically set.
 void setMinimumRequiredUserMode(int mode)
          *since 4501
 void setMinWidth(int minwidth)
          Sets the minimum width that the column can be before other columns start collapsing.
 void setMinWidthAuto(boolean autominwidth)
          Sets whether the min width of the column is automatically set.
 void setNameOverride(String name)
           
 void setObfustication(boolean hideData)
          Sets whether the column's data will be obfusticated 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() trigger
 void setSortAscending(boolean bAscending)
           
 void setSortValueLive(boolean live)
           
 void setTableID(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 TableCellCore.getDataSource() and TableRowCore.getDataSource() return.
 void setUserData(String key, Object value)
          Associates custom data with the column, usually meant for column-specific settings and stores it across sessions
 void setVisible(boolean visible)
          Sets the visibility of the column
 void setWidth(int realPXWidth)
          The column size.
 void setWidthLimits(int min, int max)
          Sets the minimum and maximum widths in one call
 void setWidthPX(int width)
           
 boolean showOnlyImage()
           
 void triggerColumnSizeChange(int diff)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

this_mon

protected AEMonitor this_mon
Constructor Detail

TableColumnImpl

public TableColumnImpl(String tableID,
                       String columnID)
Method Detail

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 interface TableColumn
Parameters:
iAlignment - See TableColumn.setAlignment(int)
iPosition - See TableColumn.setPosition(int)
iWidth - See TableColumn.setWidth(int)
iInterval - See TableColumn.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 interface TableColumn
Parameters:
iAlignment - See TableColumn.setAlignment(int)
iPosition - See TableColumn.setPosition(int)
iWidth - See TableColumn.setWidth(int)

getName

public String getName()
Description copied from interface: TableColumn
The logical name of the column. This was set via TableManager.createColumn(java.lang.String, java.lang.String) and can not be changed.

Specified by:
getName in interface TableColumn
Returns:
the column name (identification)

getNameOverride

public String getNameOverride()
Description copied from interface: TableColumn
Returns the user's column name override if it exists

Specified by:
getNameOverride in interface TableColumn
Returns:

setNameOverride

public void setNameOverride(String name)
Specified by:
setNameOverride in interface TableColumn

getTableID

public String getTableID()
Description copied from interface: TableColumn
Which table the column will be visible in. This was set via TableManager.createColumn(java.lang.String, java.lang.String) and can not be changed.

Specified by:
getTableID in interface TableColumn
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 is TableColumn.TYPE_TEXT_ONLY.

Specified by:
setType in interface TableColumn
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 interface TableColumn
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 interface TableColumn

setWidthPX

public void setWidthPX(int width)
Specified by:
setWidthPX in interface TableColumn

triggerColumnSizeChange

public void triggerColumnSizeChange(int diff)
Specified by:
triggerColumnSizeChange in interface TableColumnCore

getWidth

public int getWidth()
Description copied from interface: TableColumn
Returns the column's size

Specified by:
getWidth in interface TableColumn
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 (see TableManager.addColumn(org.gudy.azureus2.plugins.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 interface TableColumn
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 interface TableColumn
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 interface TableColumn
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 interface TableColumn
Returns:
ALIGN_TRAIL, ALIGN_LEAD, or ALIGN_CENTER

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 interface TableColumn
Parameters:
listener - Listener Object to be called when refresh is needed.

getCellRefreshListeners

public List<TableCellRefreshListener> getCellRefreshListeners()
Description copied from interface: TableColumnCore
Retrieve all the refresh listeners for the cell

Specified by:
getCellRefreshListeners in interface TableColumnCore
Returns:
Cell refresh listeners

removeCellRefreshListener

public void removeCellRefreshListener(TableCellRefreshListener listener)
Description copied from interface: TableColumn
Removed a previously added TableCellRefreshListener

Specified by:
removeCellRefreshListener in interface TableColumn
Parameters:
listener - Previously added listener

hasCellRefreshListener

public boolean hasCellRefreshListener()
Specified by:
hasCellRefreshListener in interface TableColumnCore
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 interface TableColumn
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 interface TableColumn
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 interface TableColumn
Parameters:
listener - Listener Object to be called when refresh is needed.

addCellOtherListener

public void addCellOtherListener(String listenerID,
                                 Object listener)
Specified by:
addCellOtherListener in interface TableColumnCore

removeCellOtherListener

public void removeCellOtherListener(String listenerID,
                                    Object l)
Specified by:
removeCellOtherListener in interface TableColumnCore

getCellOtherListeners

public Object[] getCellOtherListeners(String listenerID)
Specified by:
getCellOtherListeners in interface TableColumnCore
Returns:

hasCellOtherListeners

public boolean hasCellOtherListeners(String listenerID)
Specified by:
hasCellOtherListeners in interface TableColumnCore
Returns:

getCellAddedListeners

public List getCellAddedListeners()
Description copied from interface: TableColumnCore
Retreive all the Cell Added listeners

Specified by:
getCellAddedListeners in interface TableColumnCore
Returns:
cell added listeners for this cell

removeCellAddedListener

public void removeCellAddedListener(TableCellAddedListener listener)
Specified by:
removeCellAddedListener in interface TableColumn

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 interface TableColumn
Parameters:
listener - Listener Object to be called when refresh is needed.

removeCellDisposeListener

public void removeCellDisposeListener(TableCellDisposeListener listener)
Specified by:
removeCellDisposeListener in interface TableColumn

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 interface TableColumn
Parameters:
listener - Listener Object to be called when refresh is needed.

removeCellToolTipListener

public void removeCellToolTipListener(TableCellToolTipListener listener)
Specified by:
removeCellToolTipListener in interface TableColumn

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 interface TableColumn

removeCellMouseListener

public void removeCellMouseListener(TableCellMouseListener listener)
Description copied from interface: TableColumn
Remove a previously added TableCellMouseListener

Specified by:
removeCellMouseListener in interface TableColumn
Parameters:
listener - Previously added listener

hasCellMouseMoveListener

public boolean hasCellMouseMoveListener()
Specified by:
hasCellMouseMoveListener in interface TableColumnCore
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 List<TableColumnExtraInfoListener> getColumnExtraInfoListeners()
Specified by:
getColumnExtraInfoListeners in interface TableColumnCore
Returns:

addColumnExtraInfoListener

public void addColumnExtraInfoListener(TableColumnExtraInfoListener listener)
Specified by:
addColumnExtraInfoListener in interface TableColumn

removeColumnExtraInfoListener

public void removeColumnExtraInfoListener(TableColumnExtraInfoListener listener)
Specified by:
removeColumnExtraInfoListener in interface TableColumn

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 interface TableColumn

invalidateCell

public void invalidateCell(Object data_source)
Description copied from interface: TableColumn
Invalidates any cells which are linked to the given data source object.

Specified by:
invalidateCell in interface TableColumn

addListeners

public void addListeners(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 interface TableColumn
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 interface TableColumnCore

getColumnAdded

public boolean getColumnAdded()
Description copied from interface: TableColumnCore
Retrieve whether the column has been added to the TableColumnManager

Specified by:
getColumnAdded in interface TableColumnCore
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 TableCellCore.getDataSource() and TableRowCore.getDataSource() return.

Specified by:
setUseCoreDataSource in interface TableColumnCore
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 interface TableColumnCore
Returns:
true - returns a core object
false - returns a plugin object (if available)

invokeCellRefreshListeners

public void invokeCellRefreshListeners(TableCell cell,
                                       boolean fastRefresh)
                                throws Throwable
Description copied from interface: TableColumnCore
Send a refresh trigger to all listeners stored in TableColumn

Specified by:
invokeCellRefreshListeners in interface TableColumnCore
Parameters:
cell - the cell is being refreshed
Throws:
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 interface TableColumnCore
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 interface TableColumnCore
Parameters:
cell - the cell is being disposed

getClipboardText

public String getClipboardText(TableCell cell)
Specified by:
getClipboardText in interface TableColumnCore

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 interface TableColumnCore
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 interface TableColumnCore
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 interface TableColumnCore
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 interface TableColumnCore
Parameters:
position - new position (0 based)
See Also:
TableColumnManager.ensureIntegrity()

getUserData

public Object getUserData(String key)
Specified by:
getUserData in interface TableColumn
Returns:
data set via setUserData()

getUserDataString

public String getUserDataString(String key)
Specified by:
getUserDataString in interface TableColumn

setUserData

public void setUserData(String key,
                        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 interface TableColumn
Parameters:
key - the key under which the value will be stored and serialized
value - should be BEncodable, otherwise it won't be serialized

removeUserData

public void removeUserData(String key)
Specified by:
removeUserData in interface TableColumn

remove

public void remove()
Specified by:
remove in interface TableColumn

isRemoved

public boolean isRemoved()
Specified by:
isRemoved in interface TableColumnCore
Returns:

loadSettings

public final void loadSettings(Map mapSettings)
Description copied from interface: TableColumnCore
Load width and position settings from config.

Specified by:
loadSettings in interface TableColumnCore
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 interface TableColumn

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 interface TableColumn

saveSettings

public final void saveSettings(Map mapSettings)
Description copied from interface: TableColumnCore
Save width and position settings to config.

Specified by:
saveSettings in interface TableColumnCore
Parameters:
mapSettings - map to place settings into

getTitleLanguageKey

public 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 interface TableColumnCore
Returns:
Title's language key

getTitleLanguageKey

public String getTitleLanguageKey(boolean with_renames)
Specified by:
getTitleLanguageKey in interface TableColumnCore

getConsecutiveErrCount

public int getConsecutiveErrCount()
Specified by:
getConsecutiveErrCount in interface TableColumnCore
Returns:
# of consecutive errors

setConsecutiveErrCount

public void setConsecutiveErrCount(int iCount)
Specified by:
setConsecutiveErrCount in interface TableColumnCore
Parameters:
iCount - # of consecutive errors

removeContextMenuItem

public void removeContextMenuItem(TableContextMenuItem menuItem)
Specified by:
removeContextMenuItem in interface TableColumnCore

addContextMenuItem

public TableContextMenuItem addContextMenuItem(String key)
Description copied from interface: TableColumn
Adds a Context Menu item to data section of the column

Specified by:
addContextMenuItem in interface TableColumn
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(String key,
                                               int menuStyle)
Description copied from interface: TableColumn
Adds a Context Menu item to the column

Specified by:
addContextMenuItem in interface TableColumn
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 interface TableColumnCore
Returns:

isObfusticated

public boolean isObfusticated()
Description copied from interface: TableColumn
Returns whether the column's data will be obfusticated when screen capturing (for bug reports, etc).

Currently not fully implemented for plugins

Specified by:
isObfusticated in interface TableColumn
Returns:
Obfusticated value

setObfustication

public void setObfustication(boolean hideData)
Description copied from interface: TableColumn
Sets whether the column's data will be obfusticated during a screen capture (for bug reports, etc).

Specified by:
setObfustication in interface TableColumn
Parameters:
hideData - new state of obfustication

getLastSortValueChange

public long getLastSortValueChange()
Specified by:
getLastSortValueChange in interface TableColumnCore
Returns:

setLastSortValueChange

public void setLastSortValueChange(long lastSortValueChange)
Specified by:
setLastSortValueChange in interface TableColumnCore

isSortValueLive

public boolean isSortValueLive()
Specified by:
isSortValueLive in interface TableColumnCore
Returns:

setSortValueLive

public void setSortValueLive(boolean live)
Specified by:
setSortValueLive in interface TableColumnCore

addRefreshTime

public void addRefreshTime(long ms)
Specified by:
addRefreshTime in interface TableColumnCore

generateDiagnostics

public void generateDiagnostics(IndentWriter writer)
Specified by:
generateDiagnostics in interface TableColumnCore

setTableID

public void setTableID(String tableID)
Specified by:
setTableID in interface TableColumnCore

compare

public int compare(Object arg0,
                   Object arg1)
Specified by:
compare in interface Comparator

setSortAscending

public void setSortAscending(boolean bAscending)
Specified by:
setSortAscending in interface TableColumnCore
Parameters:
bAscending - The bAscending to set.

isSortAscending

public boolean isSortAscending()
Specified by:
isSortAscending in interface TableColumnCore
Returns:
Returns the bAscending.

setDefaultSortAscending

public void setDefaultSortAscending(boolean bAscending)
Specified by:
setDefaultSortAscending in interface TableColumnCore

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 interface TableColumn
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 interface TableColumn
Parameters:
minwidth - new minumum width

getMaxWidth

public int getMaxWidth()
Description copied from interface: TableColumn
Gets the maximum width the column can be

Not all UIs may have this feature implemented.

Specified by:
getMaxWidth in interface TableColumn
Returns:
maximum width of column

setMaxWidth

public void setMaxWidth(int maxwidth)
Description copied from interface: TableColumn
Sets the maximum width that the column can be

Not all UIs may have this feature implemented.

Specified by:
setMaxWidth in interface TableColumn
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 call

Not all UIs may have this min and max limits implemented.

Specified by:
setWidthLimits in interface TableColumn
Parameters:
min - New minimum column width
max - New maximum column width

isVisible

public boolean isVisible()
Description copied from interface: TableColumn
Gets the visibility of the column

Not all UIs may have this feature implemented.

Specified by:
isVisible in interface TableColumn
Returns:
Column visibility

setVisible

public void setVisible(boolean visible)
Description copied from interface: TableColumn
Sets the visibility of the column

Specified by:
setVisible in interface TableColumn
Parameters:
visible - New visibility state

isMaxWidthAuto

public boolean isMaxWidthAuto()
Description copied from interface: TableColumn
Retrieve whether the max width is automatically being set.

Specified by:
isMaxWidthAuto in interface TableColumn
Returns:
max width auto setting state

setMaxWidthAuto

public void setMaxWidthAuto(boolean automaxwidth)
Description copied from interface: TableColumn
Sets whether the max width is automatically set. Depending on the UI, automatically setting the max width usually results in the maximum width being grown to fit the largest text set for any cell (past or present). Therefore, the column will never grow larger than the largest text it contains or contained.

Specified by:
setMaxWidthAuto in interface TableColumn

isMinWidthAuto

public boolean isMinWidthAuto()
Description copied from interface: TableColumn
Retrieve whether the min width is automatically being set

Specified by:
isMinWidthAuto in interface TableColumn
Returns:
min width auto setting state

setMinWidthAuto

public void setMinWidthAuto(boolean autominwidth)
Description copied from interface: TableColumn
Sets whether the min width of the column is automatically set. Depending on the UI, automatically setting the min width usually results in the column never shrinking below the maximum text width ever encountered.

Specified by:
setMinWidthAuto in interface TableColumn

getPreferredWidth

public int getPreferredWidth()
Description copied from interface: TableColumn
Gets the preferred width of the coloumn.

Specified by:
getPreferredWidth in interface TableColumn
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 interface TableColumn
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 interface TableColumn
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 interface TableColumn
Parameters:
width - New preferred width

setAutoTooltip

public void setAutoTooltip(boolean auto_tooltip)
Specified by:
setAutoTooltip in interface TableColumnCore

doesAutoTooltip

public boolean doesAutoTooltip()
Specified by:
doesAutoTooltip in interface TableColumnCore

setInplaceEditorListener

public void setInplaceEditorListener(TableCellInplaceEditorListener l)
Specified by:
setInplaceEditorListener in interface TableColumnCore

hasInplaceEditorListener

public boolean hasInplaceEditorListener()
Specified by:
hasInplaceEditorListener in interface TableColumnCore

getInplaceEditorListener

public TableCellInplaceEditorListener getInplaceEditorListener()
Specified by:
getInplaceEditorListener in interface TableColumnCore

getForDataSourceTypes

public Class[] getForDataSourceTypes()

reset

public void reset()
Specified by:
reset in interface TableColumnCore

addDataSourceType

public void addDataSourceType(Class<?> cla)
Specified by:
addDataSourceType in interface TableColumnCore

addDataSourceTypes

public void addDataSourceTypes(Class[] datasourceTypes)

handlesDataSourceType

public boolean handlesDataSourceType(Class<?> cla)
Specified by:
handlesDataSourceType in interface TableColumnCore

getForDataSourceType

public Class getForDataSourceType()
Specified by:
getForDataSourceType in interface TableColumn
Returns:

setIconReference

public void setIconReference(String iconID,
                             boolean showOnlyIcon)
Specified by:
setIconReference in interface TableColumn

getIconReference

public String getIconReference()
Specified by:
getIconReference in interface TableColumn

setMinimumRequiredUserMode

public void setMinimumRequiredUserMode(int mode)
Description copied from interface: TableColumn
*since 4501

Specified by:
setMinimumRequiredUserMode in interface TableColumn
Parameters:
mode - from Parameter. constants

showOnlyImage

public boolean showOnlyImage()
Specified by:
showOnlyImage in interface TableColumnCore