Class TableManagerImpl

  • All Implemented Interfaces:
    TableManager

    public class TableManagerImpl
    extends java.lang.Object
    implements TableManager
    Manage Tables There's a TableManager per plugin interface
    Since:
    2.0.8.5
    • Constructor Detail

      • TableManagerImpl

        public TableManagerImpl​(UIManagerImpl _ui_manager)
    • Method Detail

      • createColumn

        public TableColumn createColumn​(java.lang.String tableID,
                                        java.lang.String cellID)
        Description copied from interface: TableManager
        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 TableManager.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, you are required to create a key in your language file consisting of the 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, you would 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


        If you wish to add a menu item to tables that show torrents, use MenuManager.addMenuItem(String, String)

        Specified by:
        createColumn in interface TableManager
        Parameters:
        tableID - Which table the column will be visible in. See TableManager.
        cellID - The logical name of the column.
        Returns:
        an interface object allowing modification of the table column.
      • addContextMenuItem

        public TableContextMenuItem addContextMenuItem​(TableContextMenuItem parent,
                                                       java.lang.String resourceKey)
        Description copied from interface: TableManager
        Adds a Context Menu item as a sub-item of the given menu item.
        Specified by:
        addContextMenuItem in interface TableManager
        Parameters:
        parent - The MenuItem to add this new item to. The parent MenuItem must have its style attribute to be set to "menu".
        resourceKey - ID of the context menu, which is also used to retrieve the textual name from the plugin language file.
        Returns:
        a newly created menu item existing inside the given menu item.
      • addContextMenuItem

        public TableContextMenuItem addContextMenuItem​(java.lang.String tableID,
                                                       java.lang.String resourceKey)
        Description copied from interface: TableManager
        Adds a Context Menu item to the specified table or to all table context menus.
        Specified by:
        addContextMenuItem in interface TableManager
        Parameters:
        tableID - Which table the menu item will be visible in. See TableManager. If null, the menu item will be added to all table context menus.
        resourceKey - ID of the context menu, which is also used to retrieve the textual name from the plugin language file.
        Returns:
        a newly created menu item for the table's context menu.