FileDocCategorySizeDatePackage
TableColumn.javaAPI DocAzureus 3.0.3.414152Thu May 31 16:24:28 BST 2007org.gudy.azureus2.plugins.ui.tables

TableColumn

public interface TableColumn
This interface provides access to an Azureus table column.

Fields Summary
public static final int
TYPE_TEXT
The cells in this column display textual information.
public static final int
TYPE_GRAPHIC
The graphic type, providing access to graphic specific functions in {@link TableCell}.
public static final int
TYPE_TEXT_ONLY
The cells in this column display only textual information, and does not set any other visible properties of cell (background, foreground, icon, etc). Using this type allows azureus to call refresh less, and saves on CPU.
public static final int
ALIGN_LEAD
leading alignment
public static final int
ALIGN_TRAIL
trailing alignment
public static final int
ALIGN_CENTER
center alignment
public static final int
POSITION_INVISIBLE
For {@link #setPosition(int)}. Make column invisible initially.
public static final int
POSITION_LAST
For {@link #setPosition(int)}. Make column the last column initially.
public static final int
INTERVAL_GRAPHIC
Trigger refresh listeners every time a graphic cycle occurs (set by user)
public static final int
INTERVAL_LIVE
Trigger refresh listeners every time a GUI update cycle occurs (set by user)
public static final int
INTERVAL_INVALID_ONLY
Trigger refresh only when the cell/row becomes invalid
Constructors Summary
Methods Summary
public voidaddCellAddedListener(TableCellAddedListener listener)
Adds a listener that triggers when a TableCell that belongs to this column is being added.

param
listener Listener Object to be called when refresh is needed.
since
2.1.0.0

public voidaddCellDisposeListener(TableCellDisposeListener listener)
Adds a listener that triggers when a TableCell that belongs to this column is being disposed.

param
listener Listener Object to be called when refresh is needed.
since
2.1.0.0

public voidaddCellMouseListener(TableCellMouseListener listener)
Adds a listener that triggers when a TableCell that belongs to this column has a mouse event.

param
listener
since
2.3.0.7

public voidaddCellRefreshListener(TableCellRefreshListener listener)
Adds a listener that triggers when a TableCell that belongs to this column needs refreshing.

param
listener Listener Object to be called when refresh is needed.
since
2.1.0.0

public voidaddCellToolTipListener(TableCellToolTipListener listener)
Adds a listener that triggers when a TableCell that belongs to this column has a tooltip action

param
listener Listener Object to be called when refresh is needed.
since
2.1.0.2

public TableContextMenuItemaddContextMenuItem(java.lang.String resourceKey)
Adds a Context Menu item to the "This Column" sub menu

param
resourceKey ID of the context menu, which is also used to retreieve the textual name from the plugin language file.
return
a newly created menu item
since
2.4.0.0

public voidaddListeners(java.lang.Object listenerObject)
A listener is added for every type of cell listener the supplied object implements

param
listenerObject Object implementing some cell listeneters
since
2.4.0.0

public intgetAlignment()
Returns the alignment of the column

return
ALIGN_TRAIL, ALIGN_LEAD, or ALIGN_CENTER
since
2.1.0.0

public intgetMaxWidth()
Gets the maximum width the column can be

Not all UIs may have this feature implemented.

return
maximum width of column
since
3.0.0.7

public intgetMinWidth()
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.

return
minumum width of the column
since
3.0.0.7

public java.lang.StringgetName()
The logical name of the column. This was set via {@link TableManager#createColumn} and can not be changed.

return
the column name (identification)
since
2.1.0.0

public intgetPosition()
Returns the position of the column

return
Column Number (0 based), POSITION_INVISIBLE or POSITION_LAST
since
2.1.0.0

public intgetPreferredWidth()
Gets the preferred width of the coloumn.

return
preferred width
since
3.0.0.7

public intgetRefreshInterval()
Returns the refresh interval of the column. The default is INTERVAL_INVALID_ONLY

return
INTERVAL_* constant, or a number representing the # of GUI refresh cycles between each cell refresh call.
since
2.1.0.0

public java.lang.StringgetTableID()
Which table the column will be visible in. This was set via {@link TableManager#createColumn} and can not be changed.

return
{@link TableManager}.TABLE_* constant(s)
since
2.1.0.0

public intgetType()
Returns the type of the contained data.

return
type TYPE_TEXT, or TYPE_GRAPHIC
since
2.1.0.0

public intgetWidth()
Returns the column's size

return
width in pixels
since
2.1.0.0

public voidinitialize(int iAlignment, int iPosition, int iWidth, int iInterval)
Initialize a group of variables all at once. Saves on individual setXxx.

param
iAlignment See {@link #setAlignment(int)}
param
iPosition See {@link #setPosition(int)}
param
iWidth See {@link #setWidth(int)}
param
iInterval See {@link #setRefreshInterval(int)}
since
2.1.0.0

public voidinitialize(int iAlignment, int iPosition, int iWidth)
Initialize a group of variables all at once. Saves on individual setXxx.

param
iAlignment See {@link #setAlignment(int)}
param
iPosition See {@link #setPosition(int)}
param
iWidth See {@link #setWidth(int)}
since
2.1.0.0

public voidinvalidateCell(java.lang.Object data_source)
Invalidates any cells which are linked to the given data source object.

since
3.0.1.5

public voidinvalidateCells()
Invalidate all cells in this column. The cells will be forced to update on the next refresh.

since
2.1.0.0

public booleanisMaxWidthAuto()
Retrieve whether the max width is automatically being set.

return
max width auto setting state
since
3.0.0.7

public booleanisMinWidthAuto()
Retrieve whether the min width is automatically being set

return
min width auto setting state
since
3.0.0.7

public booleanisObfusticated()
Returns whether the column's data will be obfusticated when screen capturing (for bug reports, etc).

Currently not fully implemented for plugins

return
Obfusticated value
since
2.4.0.3

public booleanisPreferredWidthAuto()
Retrieves whether the preferred width is automatically calculated.

return
preferred width auto calculation state
since
3.0.0.7

public booleanisVisible()
Gets the visibility of the column

Not all UIs may have this feature implemented.

return
Column visibility
since
3.0.0.7

public voidremoveCellAddedListener(TableCellAddedListener listener)

public voidremoveCellDisposeListener(TableCellDisposeListener listener)

public voidremoveCellMouseListener(TableCellMouseListener listener)
Remove a previously added TableCellMouseListener

param
listener Previously added listener
since
2.3.0.7

public voidremoveCellRefreshListener(TableCellRefreshListener listener)
Removed a previously added TableCellRefreshListener

param
listener Previously added listener
since
2.1.0.0

public voidremoveCellToolTipListener(TableCellToolTipListener listener)

public voidsetAlignment(int alignment)
Orientation of the columns text and header.

NOTE: This MUST be set BEFORE adding the column to a table.

param
alignment ALIGN_TRAIL, ALIGN_LEAD, or ALIGN_CENTER
since
2.1.0.0

public voidsetMaxWidth(int maxwidth)
Sets the maximum width that the column can be

Not all UIs may have this feature implemented.

param
maxwidth new maximum width
since
3.0.0.7

public voidsetMaxWidthAuto(boolean automaxwidth)
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.

param
automaxwidth
since
3.0.0.7

public voidsetMinWidth(int minwidth)
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.

param
minwidth new minumum width
since
3.0.0.7

public voidsetMinWidthAuto(boolean autowidth)
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.

param
autowidth
since
3.0.0.7

public voidsetObfustication(boolean hideData)
Sets whether the column's data will be obfusticated during a screen capture (for bug reports, etc).

param
hideData new state of obfustication
since
2.4.0.3

public voidsetPosition(int position)
Location to put the column. When set before being added to the UI (see {@link TableManager#addColumn}), 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.

param
position Column Number (0 based), POSITION_INVISIBLE or POSITION_LAST
since
2.1.0.0

public voidsetPreferredWidth(int width)
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.

param
width New preferred width
since
3.0.0.7

public voidsetPreferredWidthAuto(boolean auto)
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

param
auto Preferred Width Auto State
since
3.0.0.7

public voidsetRefreshInterval(int interval)
Set how often the cell receives a refresh() trigger

param
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"
since
2.1.0.0

public voidsetType(int type)
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 {@link #TYPE_TEXT_ONLY}.

param
type {@link #TYPE_TEXT}, {@link #TYPE_TEXT_ONLY}, {@link #TYPE_GRAPHIC}
since
2.1.0.0

public voidsetVisible(boolean visible)
Sets the visibility of the column

param
visible New visibility state
since
3.0.0.7

public voidsetWidth(int width)
The column size.

NOTE: This MUST be set BEFORE adding the column to a table.

param
width the size in pixels
since
2.1.0.0

public voidsetWidthLimits(int min, int max)
Sets the minimum and maximum widths in one call

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

param
min New minimum column width
param
max New maximum column width
since
3.0.0.7