Search in sources :

Example 1 with ColumnTagDiscoveryTorrent

use of com.biglybt.ui.swt.columns.tagdiscovery.ColumnTagDiscoveryTorrent in project BiglyBT by BiglySoftware.

the class SBC_TagDiscovery method initColumns.

protected void initColumns() {
    synchronized (SBC_TagDiscovery.class) {
        if (columnsAdded) {
            return;
        }
        columnsAdded = true;
    }
    TableColumnManager tableManager = TableColumnManager.getInstance();
    tableManager.registerColumn(TagDiscovery.class, ColumnTagDiscoveryName.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagDiscoveryName(column);
        }
    });
    tableManager.registerColumn(TagDiscovery.class, ColumnTagDiscoveryTorrent.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagDiscoveryTorrent(column);
        }
    });
    tableManager.registerColumn(TagDiscovery.class, ColumnTagDiscoveryAddedOn.COLUMN_ID, new TableColumnCoreCreationListener() {

        @Override
        public TableColumnCore createTableColumnCore(Class<?> forDataSourceType, String tableID, String columnID) {
            return new ColumnDateSizer(TagDiscovery.class, columnID, TableColumnCreator.DATE_COLUMN_WIDTH, tableID) {
            };
        }

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagDiscoveryAddedOn(column);
        }
    });
    tableManager.registerColumn(TagDiscovery.class, ColumnTagDiscoveryNetwork.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagDiscoveryNetwork(column);
        }
    });
    tableManager.setDefaultColumnNames(TABLE_TAGDISCOVERY, new String[] { ColumnTagDiscoveryName.COLUMN_ID, ColumnTagDiscoveryTorrent.COLUMN_ID, ColumnTagDiscoveryAddedOn.COLUMN_ID });
    tableManager.setDefaultSortColumnName(TABLE_TAGDISCOVERY, ColumnTagDiscoveryAddedOn.COLUMN_ID);
}
Also used : ColumnDateSizer(com.biglybt.ui.swt.views.tableitems.ColumnDateSizer) ColumnTagDiscoveryNetwork(com.biglybt.ui.swt.columns.tagdiscovery.ColumnTagDiscoveryNetwork) ColumnTagDiscoveryAddedOn(com.biglybt.ui.swt.columns.tagdiscovery.ColumnTagDiscoveryAddedOn) ColumnTagDiscoveryName(com.biglybt.ui.swt.columns.tagdiscovery.ColumnTagDiscoveryName) TableColumn(com.biglybt.pif.ui.tables.TableColumn) TableColumnManager(com.biglybt.ui.common.table.impl.TableColumnManager) TableColumnCreationListener(com.biglybt.pif.ui.tables.TableColumnCreationListener) ColumnTagDiscoveryTorrent(com.biglybt.ui.swt.columns.tagdiscovery.ColumnTagDiscoveryTorrent)

Aggregations

TableColumn (com.biglybt.pif.ui.tables.TableColumn)1 TableColumnCreationListener (com.biglybt.pif.ui.tables.TableColumnCreationListener)1 TableColumnManager (com.biglybt.ui.common.table.impl.TableColumnManager)1 ColumnTagDiscoveryAddedOn (com.biglybt.ui.swt.columns.tagdiscovery.ColumnTagDiscoveryAddedOn)1 ColumnTagDiscoveryName (com.biglybt.ui.swt.columns.tagdiscovery.ColumnTagDiscoveryName)1 ColumnTagDiscoveryNetwork (com.biglybt.ui.swt.columns.tagdiscovery.ColumnTagDiscoveryNetwork)1 ColumnTagDiscoveryTorrent (com.biglybt.ui.swt.columns.tagdiscovery.ColumnTagDiscoveryTorrent)1 ColumnDateSizer (com.biglybt.ui.swt.views.tableitems.ColumnDateSizer)1