use of com.biglybt.ui.swt.views.tableitems.ColumnDateSizer 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);
}
use of com.biglybt.ui.swt.views.tableitems.ColumnDateSizer in project BiglyBT by BiglySoftware.
the class ColumnArchiveDLDate method refresh.
@Override
public void refresh(TableCell cell) {
TableColumn tc = cell.getTableColumn();
if (tc instanceof ColumnDateSizer) {
DownloadStubEx dl = (DownloadStubEx) cell.getDataSource();
((ColumnDateSizer) tc).refresh(cell, dl.getCreationDate());
}
}
use of com.biglybt.ui.swt.views.tableitems.ColumnDateSizer in project BiglyBT by BiglySoftware.
the class ColumnDLHistoryRemoveDate method refresh.
@Override
public void refresh(TableCell cell) {
TableColumn tc = cell.getTableColumn();
if (tc instanceof ColumnDateSizer) {
DownloadHistory dl = (DownloadHistory) cell.getDataSource();
((ColumnDateSizer) tc).refresh(cell, dl.getRemoveTime());
}
}
use of com.biglybt.ui.swt.views.tableitems.ColumnDateSizer in project BiglyBT by BiglySoftware.
the class ColumnDLHistoryAddDate method refresh.
@Override
public void refresh(TableCell cell) {
TableColumn tc = cell.getTableColumn();
if (tc instanceof ColumnDateSizer) {
DownloadHistory dl = (DownloadHistory) cell.getDataSource();
((ColumnDateSizer) tc).refresh(cell, dl.getAddTime());
}
}
use of com.biglybt.ui.swt.views.tableitems.ColumnDateSizer in project BiglyBT by BiglySoftware.
the class ColumnDLHistoryCompleteDate method refresh.
@Override
public void refresh(TableCell cell) {
TableColumn tc = cell.getTableColumn();
if (tc instanceof ColumnDateSizer) {
DownloadHistory dl = (DownloadHistory) cell.getDataSource();
long time = dl.getCompleteTime();
if (time <= 0) {
// incomplete - force sort to be above completed ones
time = Long.MAX_VALUE;
}
((ColumnDateSizer) tc).refresh(cell, time);
}
}
Aggregations