Search in sources :

Example 1 with UIRuntimeException

use of com.biglybt.pif.ui.UIRuntimeException 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());
}
Also used : TableStructureEventDispatcher(com.biglybt.ui.common.table.TableStructureEventDispatcher) TableColumnImpl(com.biglybt.ui.common.table.impl.TableColumnImpl) UIRuntimeException(com.biglybt.pif.ui.UIRuntimeException)

Example 2 with UIRuntimeException

use of com.biglybt.pif.ui.UIRuntimeException in project BiglyBT by BiglySoftware.

the class TableColumnImpl method initialize.

@Override
public void initialize(int iAlignment, int iPosition, int iWidth) {
    if (bColumnAdded) {
        throw (new UIRuntimeException("Can't set properties. Column '" + sName + " already added"));
    }
    this.iAlignment = this.iDefaultAlignment = iAlignment;
    setPosition(iPosition);
    this.iWidth = this.iDefaultWidth = adjustPXForDPI(iWidth);
    this.iMinWidth = adjustPXForDPI(16);
}
Also used : UIRuntimeException(com.biglybt.pif.ui.UIRuntimeException)

Aggregations

UIRuntimeException (com.biglybt.pif.ui.UIRuntimeException)2 TableStructureEventDispatcher (com.biglybt.ui.common.table.TableStructureEventDispatcher)1 TableColumnImpl (com.biglybt.ui.common.table.impl.TableColumnImpl)1