use of com.biglybt.pif.ui.tables.TableColumn 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.pif.ui.tables.TableColumn 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.pif.ui.tables.TableColumn in project BiglyBT by BiglySoftware.
the class ClientStatsView method initColumns.
private void initColumns(Core core) {
synchronized (ClientStatsView.class) {
if (columnsAdded) {
return;
}
columnsAdded = true;
}
UIManager uiManager = PluginInitializer.getDefaultInterface().getUIManager();
TableManager tableManager = uiManager.getTableManager();
tableManager.registerColumn(ClientStatsDataSource.class, ColumnCS_Name.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
new ColumnCS_Name(column);
}
});
tableManager.registerColumn(ClientStatsDataSource.class, ColumnCS_Count.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
new ColumnCS_Count(column);
}
});
tableManager.registerColumn(ClientStatsDataSource.class, ColumnCS_Discarded.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
new ColumnCS_Discarded(column);
}
});
tableManager.registerColumn(ClientStatsDataSource.class, ColumnCS_Received.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
new ColumnCS_Received(column);
}
});
tableManager.registerColumn(ClientStatsDataSource.class, ColumnCS_ReceivedPer.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
new ColumnCS_ReceivedPer(column);
}
});
tableManager.registerColumn(ClientStatsDataSource.class, ColumnCS_Sent.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
new ColumnCS_Sent(column);
}
});
tableManager.registerColumn(ClientStatsDataSource.class, ColumnCS_Pct.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
new ColumnCS_Pct(column);
}
});
for (final String network : AENetworkClassifier.AT_NETWORKS) {
tableManager.registerColumn(ClientStatsDataSource.class, network + "." + ColumnCS_Sent.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
column.setUserData("network", network);
new ColumnCS_Sent(column);
}
});
tableManager.registerColumn(ClientStatsDataSource.class, network + "." + ColumnCS_Discarded.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
column.setUserData("network", network);
new ColumnCS_Discarded(column);
}
});
tableManager.registerColumn(ClientStatsDataSource.class, network + "." + ColumnCS_Received.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
column.setUserData("network", network);
new ColumnCS_Received(column);
}
});
tableManager.registerColumn(ClientStatsDataSource.class, network + "." + ColumnCS_Count.COLUMN_ID, new TableColumnCreationListener() {
@Override
public void tableColumnCreated(TableColumn column) {
column.setUserData("network", network);
new ColumnCS_Count(column);
}
});
}
TableColumnManager tcManager = TableColumnManager.getInstance();
tcManager.setDefaultColumnNames(TABLEID, new String[] { ColumnCS_Name.COLUMN_ID, ColumnCS_Pct.COLUMN_ID, ColumnCS_Count.COLUMN_ID, ColumnCS_Received.COLUMN_ID, ColumnCS_Sent.COLUMN_ID, ColumnCS_Discarded.COLUMN_ID });
}
use of com.biglybt.pif.ui.tables.TableColumn 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.pif.ui.tables.TableColumn 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