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());
}
}
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);
}
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);
}
Aggregations