if ( _col instanceof TableColumnImpl ){
TableColumnManager.getInstance().addColumns(new TableColumnCore[] { (TableColumnCore) _col });
TableStructureEventDispatcher tsed = TableStructureEventDispatcher.getInstance(_col.getTableID());
tsed.tableStructureChanged(true, _col.getForDataSourceType());
}else{
throw(new UIRuntimeException("TableManager.addColumn(..) can only add columns created by createColumn(..)"));
}
break;
}
case UIManagerEvent.ET_REGISTER_COLUMN:{
Object[] params = (Object[])data;
TableColumnManager tcManager = TableColumnManager.getInstance();
Class dataSource = (Class)params[0];
String columnName = (String)params[1];
tcManager.registerColumn(dataSource, columnName, (TableColumnCreationListener)params[2]);
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
// datasource to derive affected tables somehow
TableStructureEventDispatcher tsed = TableStructureEventDispatcher.getInstance( tid );
tsed.tableStructureChanged(true, dataSource);
}
break;
}
case UIManagerEvent.ET_UNREGISTER_COLUMN:{