Package com.aelitis.azureus.ui.common.table

Examples of com.aelitis.azureus.ui.common.table.TableStructureEventDispatcher


       
        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:{
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.ui.common.table.TableStructureEventDispatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.