Search in sources :

Example 6 with ColumnDateSizer

use of com.biglybt.ui.swt.views.tableitems.ColumnDateSizer in project BiglyBT by BiglySoftware.

the class ColumnTagDiscoveryAddedOn method refresh.

@Override
public void refresh(TableCell cell) {
    TableColumn tc = cell.getTableColumn();
    if (tc instanceof ColumnDateSizer) {
        TagDiscovery discovery = (TagDiscovery) cell.getDataSource();
        ((ColumnDateSizer) tc).refresh(cell, discovery.getTimestamp());
    }
}
Also used : ColumnDateSizer(com.biglybt.ui.swt.views.tableitems.ColumnDateSizer) TagDiscovery(com.biglybt.core.tag.TagDiscovery)

Example 7 with ColumnDateSizer

use of com.biglybt.ui.swt.views.tableitems.ColumnDateSizer in project BiglyBT by BiglySoftware.

the class SBC_ArchivedDownloadsView method initColumns.

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

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnArchiveDLName(column);
        }
    });
    tableManager.registerColumn(DownloadStub.class, ColumnArchiveDLSize.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnArchiveDLSize(column);
        }
    });
    tableManager.registerColumn(DownloadStub.class, ColumnArchiveDLFileCount.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnArchiveDLFileCount(column);
        }
    });
    tableManager.registerColumn(DownloadStub.class, ColumnArchiveDLDate.COLUMN_ID, new TableColumnCoreCreationListener() {

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

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnArchiveDLDate(column);
        }
    });
    tableManager.registerColumn(DownloadStub.class, ColumnArchiveDLTags.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnArchiveDLTags(column);
        }
    });
    tableManager.registerColumn(DownloadStub.class, ColumnArchiveShareRatio.COLUMN_ID, new TableColumnCreationListener() {

        @Override
        public void tableColumnCreated(TableColumn column) {
            new ColumnArchiveShareRatio(column);
        }
    });
    tableManager.setDefaultColumnNames(TABLE_NAME, new String[] { ColumnArchiveDLName.COLUMN_ID, ColumnArchiveDLSize.COLUMN_ID, ColumnArchiveDLFileCount.COLUMN_ID, ColumnArchiveDLDate.COLUMN_ID, ColumnArchiveShareRatio.COLUMN_ID });
    tableManager.setDefaultSortColumnName(TABLE_NAME, ColumnArchiveDLName.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) DownloadStub(com.biglybt.pif.download.DownloadStub) TableColumnCreationListener(com.biglybt.pif.ui.tables.TableColumnCreationListener)

Example 8 with ColumnDateSizer

use of com.biglybt.ui.swt.views.tableitems.ColumnDateSizer 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)

Aggregations

ColumnDateSizer (com.biglybt.ui.swt.views.tableitems.ColumnDateSizer)8 TableColumn (com.biglybt.pif.ui.tables.TableColumn)7 DownloadHistory (com.biglybt.core.history.DownloadHistory)4 TableColumnCreationListener (com.biglybt.pif.ui.tables.TableColumnCreationListener)3 TableColumnManager (com.biglybt.ui.common.table.impl.TableColumnManager)3 TagDiscovery (com.biglybt.core.tag.TagDiscovery)1 DownloadStub (com.biglybt.pif.download.DownloadStub)1 DownloadStubEx (com.biglybt.pif.download.DownloadStub.DownloadStubEx)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