Search in sources :

Example 11 with TableColumnCreationListener

use of com.biglybt.pif.ui.tables.TableColumnCreationListener in project BiglyBT by BiglySoftware.

the class SBC_DownloadHistoryView method initColumns.

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

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnDLHistoryName(column);
        }
    });
    tableManager.registerColumn(DownloadHistory.class, ColumnDLHistoryAddDate.COLUMN_ID, new TableColumnCoreCreationListener() {

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

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnDLHistoryAddDate(column);
        }
    });
    tableManager.registerColumn(DownloadHistory.class, ColumnDLHistoryCompleteDate.COLUMN_ID, new TableColumnCoreCreationListener() {

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

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnDLHistoryCompleteDate(column);
        }
    });
    tableManager.registerColumn(DownloadHistory.class, ColumnDLHistoryRemoveDate.COLUMN_ID, new TableColumnCoreCreationListener() {

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

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnDLHistoryRemoveDate(column);
        }
    });
    tableManager.registerColumn(DownloadHistory.class, ColumnDLHistoryHash.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnDLHistoryHash(column);
        }
    });
    tableManager.registerColumn(DownloadHistory.class, ColumnDLHistorySize.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnDLHistorySize(column);
        }
    });
    tableManager.registerColumn(DownloadHistory.class, ColumnDLHistorySaveLocation.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnDLHistorySaveLocation(column);
        }
    });
    tableManager.setDefaultColumnNames(TABLE_NAME, new String[] { ColumnDLHistoryName.COLUMN_ID, ColumnDLHistoryAddDate.COLUMN_ID, ColumnDLHistoryCompleteDate.COLUMN_ID, ColumnDLHistoryRemoveDate.COLUMN_ID });
    tableManager.setDefaultSortColumnName(TABLE_NAME, ColumnDLHistoryName.COLUMN_ID);
}
Also used : ColumnDateSizer(com.biglybt.ui.swt.views.tableitems.ColumnDateSizer) TableColumn(com.biglybt.pif.ui.tables.TableColumn) TableColumnManager(com.biglybt.ui.common.table.impl.TableColumnManager) TableColumnCreationListener(com.biglybt.pif.ui.tables.TableColumnCreationListener) DownloadHistory(com.biglybt.core.history.DownloadHistory)

Example 12 with TableColumnCreationListener

use of com.biglybt.pif.ui.tables.TableColumnCreationListener in project BiglyBT by BiglySoftware.

the class SBC_TagsOverview method initColumns.

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

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagCount(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagColor.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagColor(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagName.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagName(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagType.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagType(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagPublic.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagPublic(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagUpRate.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagUpRate(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagDownRate.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagDownRate(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagUpLimit.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagUpLimit(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagDownLimit.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagDownLimit(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagUpSession.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagUpSession(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagDownSession.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagDownSession(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagUpTotal.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagUpTotal(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagDownTotal.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagDownTotal(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagRSSFeed.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagRSSFeed(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagUploadPriority.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagUploadPriority(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagMinSR.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagMinSR(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagMaxSR.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagMaxSR(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagAggregateSR.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagAggregateSR(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagAggregateSRMax.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagAggregateSRMax(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagXCode.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagXCode(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagInitialSaveLocation.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagInitialSaveLocation(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagMoveOnComp.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagMoveOnComp(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagCopyOnComp.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagCopyOnComp(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagProperties.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagProperties(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagVisible.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagVisible(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagGroup.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagGroup(column);
        }
    });
    tableManager.registerColumn(Tag.class, ColumnTagLimits.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnTagLimits(column);
        }
    });
    tableManager.setDefaultColumnNames(TABLE_TAGS, new String[] { ColumnTagColor.COLUMN_ID, ColumnTagName.COLUMN_ID, ColumnTagCount.COLUMN_ID, ColumnTagType.COLUMN_ID, ColumnTagPublic.COLUMN_ID, ColumnTagUpRate.COLUMN_ID, ColumnTagDownRate.COLUMN_ID, ColumnTagUpLimit.COLUMN_ID, ColumnTagDownLimit.COLUMN_ID });
    tableManager.setDefaultSortColumnName(TABLE_TAGS, ColumnTagName.COLUMN_ID);
}
Also used : TableColumnManager(com.biglybt.ui.common.table.impl.TableColumnManager) TableColumnCreationListener(com.biglybt.pif.ui.tables.TableColumnCreationListener) TableColumn(com.biglybt.pif.ui.tables.TableColumn)

Aggregations

TableColumnCreationListener (com.biglybt.pif.ui.tables.TableColumnCreationListener)12 TableColumn (com.biglybt.pif.ui.tables.TableColumn)11 TableColumnManager (com.biglybt.ui.common.table.impl.TableColumnManager)11 TableManager (com.biglybt.pif.ui.tables.TableManager)4 UIManager (com.biglybt.pif.ui.UIManager)3 ColumnDateSizer (com.biglybt.ui.swt.views.tableitems.ColumnDateSizer)3 TableCell (com.biglybt.pif.ui.tables.TableCell)2 TableCellRefreshListener (com.biglybt.pif.ui.tables.TableCellRefreshListener)2 TableCellSWT (com.biglybt.ui.swt.views.table.TableCellSWT)2 Image (org.eclipse.swt.graphics.Image)2 Point (org.eclipse.swt.graphics.Point)2 RelatedAttributeLookupListener (com.biglybt.core.content.RelatedAttributeLookupListener)1 DownloadManager (com.biglybt.core.download.DownloadManager)1 DownloadHistory (com.biglybt.core.history.DownloadHistory)1 Subscription (com.biglybt.core.subs.Subscription)1 Tag (com.biglybt.core.tag.Tag)1 TagType (com.biglybt.core.tag.TagType)1 Taggable (com.biglybt.core.tag.Taggable)1 TaggableLifecycleAdapter (com.biglybt.core.tag.TaggableLifecycleAdapter)1 FileListener (com.biglybt.core.torrent.impl.TorrentOpenOptions.FileListener)1