|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TableColumn
This interface provides access to an Azureus table column.
Field Summary | |
---|---|
static int |
ALIGN_BOTTOM
bottom align |
static int |
ALIGN_CENTER
center alignment |
static int |
ALIGN_LEAD
leading alignment |
static int |
ALIGN_TOP
top align |
static int |
ALIGN_TRAIL
trailing alignment |
static java.lang.String |
CAT_BYTES
|
static java.lang.String |
CAT_CONNECTION
|
static java.lang.String |
CAT_CONTENT
|
static java.lang.String |
CAT_ESSENTIAL
|
static java.lang.String |
CAT_PEER_IDENTIFICATION
|
static java.lang.String |
CAT_PROGRESS
|
static java.lang.String |
CAT_PROTOCOL
|
static java.lang.String |
CAT_SETTINGS
|
static java.lang.String |
CAT_SHARING
|
static java.lang.String |
CAT_SWARM
|
static java.lang.String |
CAT_TIME
|
static java.lang.String |
CAT_TRACKER
|
static int |
INTERVAL_GRAPHIC
Trigger refresh listeners every time a graphic cycle occurs (set by user) |
static int |
INTERVAL_INVALID_ONLY
Trigger refresh only when the cell/row becomes invalid |
static int |
INTERVAL_LIVE
Trigger refresh listeners every time a GUI update cycle occurs (set by user) |
static int |
MENU_STYLE_COLUMN_DATA
|
static int |
MENU_STYLE_HEADER
|
static int |
POSITION_INVISIBLE
For setPosition(int) . |
static int |
POSITION_LAST
For setPosition(int) . |
static int |
TYPE_GRAPHIC
The graphic type, providing access to graphic specific functions in TableCell . |
static int |
TYPE_TEXT
The cells in this column display textual information. |
static 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). |
static java.lang.String |
UD_FORCE_VISIBLE
|
Method Summary | |
---|---|
void |
addCellAddedListener(TableCellAddedListener listener)
Adds a listener that triggers when a TableCell that belongs to this column is being added. |
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 |
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 |
addColumnExtraInfoListener(TableColumnExtraInfoListener listener)
|
TableContextMenuItem |
addContextMenuItem(java.lang.String resourceKey)
Adds a Context Menu item to data section of the column |
TableContextMenuItem |
addContextMenuItem(java.lang.String resourceKey,
int menuStyle)
Adds a Context Menu item to the column |
void |
addListeners(java.lang.Object listenerObject)
A listener is added for every type of cell listener the supplied object implements |
int |
getAlignment()
Returns the alignment of the column |
java.lang.Class |
getForDataSourceType()
|
java.lang.String |
getIconReference()
|
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. |
java.lang.String |
getName()
The logical name of the column. |
java.lang.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 |
getRefreshInterval()
Returns the refresh interval of the column. |
java.lang.String |
getTableID()
Which table the column will be visible in. |
int |
getType()
Returns the type of the contained data. |
java.lang.Object |
getUserData(java.lang.String key)
|
java.lang.String |
getUserDataString(java.lang.String key)
|
int |
getWidth()
Returns the column's size |
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. |
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 |
isVisible()
Gets the visibility of the column |
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 |
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 |
removeCellDisposeListener(TableCellDisposeListener listener)
|
void |
removeCellMouseListener(TableCellMouseListener listener)
Remove a previously added TableCellMouseListener |
void |
removeCellRefreshListener(TableCellRefreshListener listener)
Removed a previously added TableCellRefreshListener |
void |
removeCellToolTipListener(TableCellToolTipListener listener)
|
void |
removeColumnExtraInfoListener(TableColumnExtraInfoListener listener)
|
void |
removeUserData(java.lang.String key)
|
void |
setAlignment(int alignment)
Orientation of the columns text and header. |
void |
setIconReference(java.lang.String iconID,
boolean showOnlyIcon)
|
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 autowidth)
Sets whether the min width of the column is automatically set. |
void |
setNameOverride(java.lang.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 |
setPreferredWidth(int width)
Sets the preferred width of the column. |
void |
setPreferredWidthAuto(boolean auto)
Sets whether the preferred with is automatically calculated. |
void |
setRefreshInterval(int interval)
Set how often the cell receives a refresh() trigger |
void |
setType(int type)
The type of the contained data. Current supported types are long, string, and graphic. |
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 sessions |
void |
setVisible(boolean visible)
Sets the visibility of the column |
void |
setWidth(int unadjustedWidth)
The column size. |
void |
setWidthLimits(int min,
int max)
Sets the minimum and maximum widths in one call |
void |
setWidthPX(int realPixelWidth)
|
Field Detail |
---|
static final int MENU_STYLE_HEADER
static final int MENU_STYLE_COLUMN_DATA
static final int TYPE_TEXT
static final int TYPE_GRAPHIC
TableCell
.
static final int TYPE_TEXT_ONLY
static final int ALIGN_LEAD
static final int ALIGN_TRAIL
static final int ALIGN_CENTER
static final int ALIGN_TOP
static final int ALIGN_BOTTOM
static final int POSITION_INVISIBLE
setPosition(int)
. Make column invisible initially.
static final int POSITION_LAST
setPosition(int)
. Make column the last column initially.
static final int INTERVAL_GRAPHIC
static final int INTERVAL_LIVE
static final int INTERVAL_INVALID_ONLY
static final java.lang.String CAT_ESSENTIAL
static final java.lang.String CAT_SHARING
static final java.lang.String CAT_TRACKER
static final java.lang.String CAT_TIME
static final java.lang.String CAT_SWARM
static final java.lang.String CAT_CONTENT
static final java.lang.String CAT_PEER_IDENTIFICATION
static final java.lang.String CAT_PROTOCOL
static final java.lang.String CAT_BYTES
static final java.lang.String CAT_SETTINGS
static final java.lang.String CAT_CONNECTION
static final java.lang.String CAT_PROGRESS
static final java.lang.String UD_FORCE_VISIBLE
Method Detail |
---|
void initialize(int iAlignment, int iPosition, int iWidth, int iInterval)
iAlignment
- See setAlignment(int)
iPosition
- See setPosition(int)
iWidth
- See setWidth(int)
iInterval
- See setRefreshInterval(int)
void initialize(int iAlignment, int iPosition, int iWidth)
iAlignment
- See setAlignment(int)
iPosition
- See setPosition(int)
iWidth
- See setWidth(int)
java.lang.String getName()
TableManager.createColumn(java.lang.String, java.lang.String)
and can not be changed.
java.lang.String getNameOverride()
void setNameOverride(java.lang.String name)
java.lang.String getTableID()
TableManager.createColumn(java.lang.String, java.lang.String)
and can not be changed.
TableManager
.TABLE_* constant(s)void setType(int type)
NOTE: This MUST be set BEFORE adding the column to a table.
The default type is TYPE_TEXT_ONLY
.
type
- TYPE_TEXT
, TYPE_TEXT_ONLY
, TYPE_GRAPHIC
int getType()
void setWidth(int unadjustedWidth)
NOTE: This MUST be set BEFORE adding the column to a table.
width
- the size in pixels, adjusting for DPIvoid setWidthPX(int realPixelWidth)
int getWidth()
void setPosition(int position)
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.
position
- Column Number (0 based), POSITION_INVISIBLE or POSITION_LASTint getPosition()
void setAlignment(int alignment)
NOTE: This MUST be set BEFORE adding the column to a table.
alignment
- ALIGN_TRAIL, ALIGN_LEAD, or ALIGN_CENTERint getAlignment()
void setRefreshInterval(int interval)
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"int getRefreshInterval()
void setMinWidth(int minwidth)
If not set, the width specified on initialize will be the minimum width
Not all UIs may have this feature implemented.
minwidth
- new minumum widthint getMinWidth()
If not set, the width specified on initialize will be the minimum width
Not all UIs may have this feature implemented.
void setMaxWidth(int maxwidth)
Not all UIs may have this feature implemented.
maxwidth
- new maximum widthint getMaxWidth()
Not all UIs may have this feature implemented.
void setWidthLimits(int min, int max)
Not all UIs may have this min and max limits implemented.
min
- New minimum column widthmax
- New maximum column widthvoid setMaxWidthAuto(boolean automaxwidth)
automaxwidth
- boolean isMaxWidthAuto()
void setMinWidthAuto(boolean autowidth)
autowidth
- boolean isMinWidthAuto()
void setPreferredWidth(int width)
width
- New preferred widthint getPreferredWidth()
boolean isPreferredWidthAuto()
void setPreferredWidthAuto(boolean auto)
auto
- Preferred Width Auto Stateboolean isVisible()
Not all UIs may have this feature implemented.
void setUserData(java.lang.String key, java.lang.Object value)
key
- the key under which the value will be stored and serializedvalue
- should be BEncodable, otherwise it won't be serializedvoid removeUserData(java.lang.String key)
void postConfigLoad()
void preConfigSave()
java.lang.Object getUserData(java.lang.String key)
key
-
java.lang.String getUserDataString(java.lang.String key)
void setVisible(boolean visible)
visible
- New visibility statevoid addCellRefreshListener(TableCellRefreshListener listener)
listener
- Listener Object to be called when refresh is needed.void removeCellRefreshListener(TableCellRefreshListener listener)
listener
- Previously added listenervoid addCellAddedListener(TableCellAddedListener listener)
listener
- Listener Object to be called when refresh is needed.void removeCellAddedListener(TableCellAddedListener listener)
void addCellDisposeListener(TableCellDisposeListener listener)
listener
- Listener Object to be called when refresh is needed.void removeCellDisposeListener(TableCellDisposeListener listener)
void addCellToolTipListener(TableCellToolTipListener listener)
listener
- Listener Object to be called when refresh is needed.void removeCellToolTipListener(TableCellToolTipListener listener)
void addCellMouseListener(TableCellMouseListener listener)
listener
- void removeCellMouseListener(TableCellMouseListener listener)
listener
- Previously added listenervoid addListeners(java.lang.Object listenerObject)
listenerObject
- Object implementing some cell listenetersvoid invalidateCells()
void invalidateCell(java.lang.Object data_source)
TableContextMenuItem addContextMenuItem(java.lang.String resourceKey, int menuStyle)
resourceKey
- 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)
TableContextMenuItem addContextMenuItem(java.lang.String resourceKey)
resourceKey
- ID of the context menu, which is also used to retreieve
the textual name from the plugin language file.
boolean isObfusticated()
Currently not fully implemented for plugins
void setObfustication(boolean hideData)
hideData
- new state of obfusticationvoid remove()
void addColumnExtraInfoListener(TableColumnExtraInfoListener listener)
listener
- void removeColumnExtraInfoListener(TableColumnExtraInfoListener listener)
listener
- java.lang.Class getForDataSourceType()
void setIconReference(java.lang.String iconID, boolean showOnlyIcon)
java.lang.String getIconReference()
void setMinimumRequiredUserMode(int mode)
mode
- from Parameter. constants
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |