FileDocCategorySizeDatePackage
TableManager.javaAPI DocAzureus 3.0.3.44951Sun Sep 23 04:57:42 BST 2007org.gudy.azureus2.plugins.ui.tables

TableManager

public interface TableManager
Allows plugins to manage Azureus UI tables.
author
TuxPaper
since
2.0.8.5

Fields Summary
public static final String
TABLE_MYTORRENTS_COMPLETE
Visible for Completed Torrents table
public static final String
TABLE_MYTORRENTS_INCOMPLETE
Visible for Incompleted Torrents table
public static final String
TABLE_TORRENT_PEERS
Visible for Torrent Peers table
public static final String
TABLE_TORRENT_PIECES
Visible for Torrent Pieces table
public static final String
TABLE_TORRENT_FILES
Visible for Torrent Files table
public static final String
TABLE_MYTRACKER
Visible for My Tracker table
public static final String
TABLE_MYSHARES
Visible for My Shares table
public static final String
TABLE_ALL_PEERS
Visible for All Peers table
Constructors Summary
Methods Summary
public voidaddColumn(TableColumn tableColumn)
Adds a column to an Azureus UI table.

param
tableColumn a column previously created with {@link #createColumn}

public TableContextMenuItemaddContextMenuItem(java.lang.String tableID, java.lang.String resourceKey)
Adds a Context Menu item to the specified table or to all table context menus.

param
tableID Which table the menu item will be visible in. See {@link TableManager}. If null, the menu item will be added to all table context menus.
param
resourceKey ID of the context menu, which is also used to retrieve the textual name from the plugin language file.
return
a newly created menu item for the table's context menu.

public TableContextMenuItemaddContextMenuItem(TableContextMenuItem parent, java.lang.String resourceKey)
Adds a Context Menu item as a sub-item of the given menu item.

param
parent The MenuItem to add this new item to. The parent MenuItem must have its style attribute to be set to "menu".
param
resourceKey ID of the context menu, which is also used to retrieve the textual name from the plugin language file.
return
a newly created menu item existing inside the given menu item.

public TableColumncreateColumn(java.lang.String tableID, java.lang.String cellID)
Creates a column for a UI table. In order for this object to be displayed in an Azureus UI table, the returned object must be added via the {@link #addColumn(TableColumn)}

The distinction between creating and adding a column is required because some TableColumn functions are not available or act differently after the column had been added.

In order to the plugin to display correctly the column name, your are required to create a key in your language file consisting of the {@link TableManager} Table ID of the table you are adding the column to, plus ".column." plus the logical name of your column.

For example, if you are creating a column named "quality" in the table TABLE_TORRENT_FILES, youwould have to add the following to your language file:
Files.column.quality=Column Title
and if you wish to have a short description of the column (visible when the user is setting up columns), create another entry with the same key plus ".info". For the example above:
Files.column.quality.info=One line description

param
tableID Which table the column will be visible in. See {@link TableManager}.
param
cellID The logical name of the column.
return
an interface object allowing modification of the table column.