use of com.biglybt.ui.common.table.TableStructureEventDispatcher in project BiglyBT by BiglySoftware.
the class TableManagerImpl method registerColumn.
@Override
public void registerColumn(final Class forDataSourceType, final String cellID, final TableColumnCreationListener listener) {
TableColumnManager tcManager = TableColumnManager.getInstance();
tcManager.registerColumn(forDataSourceType, cellID, listener);
String[] tables = tcManager.getTableIDs();
for (String tid : tables) {
// we don't know which tables are affected at this point to refresh all.
// if this proves to be a performance issue then we would have to use the
// forDataSourceType to derive affected tables somehow
TableStructureEventDispatcher tsed = TableStructureEventDispatcher.getInstance(tid);
tsed.tableStructureChanged(true, forDataSourceType);
}
}
use of com.biglybt.ui.common.table.TableStructureEventDispatcher in project BiglyBT by BiglySoftware.
the class TableColumnImpl method remove.
@Override
public void remove() {
removed = true;
TableColumnManager.getInstance().removeColumns(new TableColumnCore[] { this });
TableStructureEventDispatcher tsed = TableStructureEventDispatcher.getInstance(sTableID);
for (Class<?> cla : forPluginDataSourceTypes) {
tsed.tableStructureChanged(true, cla);
}
}
use of com.biglybt.ui.common.table.TableStructureEventDispatcher in project BiglyBT by BiglySoftware.
the class TableManagerImpl method addColumn.
@Override
public void addColumn(final TableColumn tableColumn) {
if (!(tableColumn instanceof TableColumnImpl))
throw (new UIRuntimeException("TableManager.addColumn(..) can only add columns created by createColumn(..)"));
TableColumnManager.getInstance().addColumns(new TableColumnCore[] { (TableColumnCore) tableColumn });
TableStructureEventDispatcher tsed = TableStructureEventDispatcher.getInstance(tableColumn.getTableID());
tsed.tableStructureChanged(true, tableColumn.getForDataSourceType());
}
use of com.biglybt.ui.common.table.TableStructureEventDispatcher in project BiglyBT by BiglySoftware.
the class TableColumnImpl method invalidateCells.
@Override
public void invalidateCells() {
TableStructureEventDispatcher tsed = TableStructureEventDispatcher.getInstance(sTableID);
tsed.columnInvalidate(this);
}
use of com.biglybt.ui.common.table.TableStructureEventDispatcher in project BiglyBT by BiglySoftware.
the class TableColumnImpl method triggerColumnSizeChange.
@Override
public void triggerColumnSizeChange(int diff) {
TableStructureEventDispatcher tsed = TableStructureEventDispatcher.getInstance(sTableID);
tsed.columnSizeChanged(this, diff);
if (iType == TYPE_GRAPHIC) {
invalidateCells();
}
}
Aggregations