public int getDockActionCount(){ updateActionList( false ); return actions.size(); }
public Iterator<DockAction> iterator(){ updateActionList( false ); return new Iterator<DockAction>() { private Iterator<Tuple<Dockable, DockAction>> iterator = actions.iterator(); public boolean hasNext(){ return iterator.hasNext(); } public DockAction next(){ return iterator.next().getB(); } public void remove(){ throw new UnsupportedOperationException(); } }; }
public DockAction getDockAction( int index ){ updateActionList( false ); return actions.get( index ).getB(); }
@Override public void addDockActionSourceListener( DockActionSourceListener listener ){ if( this.listener == null ){ updateActionList( false ); } super.addDockActionSourceListener( listener ); if( this.listener == null ){ this.listener = new Listener(); this.listener.add( dockable ); } }