Package bibliothek.gui.dock.common.action

Examples of bibliothek.gui.dock.common.action.CAction


     * defined in {@link CDockable}
     * @param action the new action, can be <code>null</code> which might force
     * back a default action (that depends on the module that uses <code>key</code>)
     */
    public void putAction( String key, CAction action ){
        CAction old = actions.put( key, action );
        if( old != action ){
            listenerCollection.getCDockablePropertyListener().actionChanged( this, key, old, action );
        }
    }
View Full Code Here


  }
 
  @Override
  protected EclipseTabDockActionLocation getLocation( DockAction action, EclipseTabStateInfo tab ){
    if( action instanceof CommonDockAction ){
      CAction common = ((CommonDockAction)action).getAction();
      EclipseTabDockActionLocation location = getLocation( common, tab );
      if( location != null ){
        return location;
      }
    }
View Full Code Here

  private boolean hasAnnotation( DockAction action, Class<? extends Annotation> annotation ){
    if( action.getClass().getAnnotation( annotation ) != null ){
      return true;
    }
    if( action instanceof CommonDockAction ){
      CAction caction = ((CommonDockAction)action).getAction();
      if( caction.getClass().getAnnotation( annotation ) != null ){
        return true;
      }
    }
    return false;
  }
View Full Code Here

   */
  private DockAction currentAction(){
    if( !visible )
      return null;
   
    CAction result = dockable.getAction( key );
    if( result == null ){
      return defaultAction;
    }
   
    return result.intern();
  }
View Full Code Here

      return super.createHandle( dockable );
    }
  }
 
  private void update( DockableHandle handle, CDockable dockable ){
    CAction action = dockable.getAction( CDockable.ACTION_KEY_MINIMIZE_HOLD );
    if( action == null ){
      handle.resetHoldAction();
    }
    else{
      handle.getActions().setHoldAction( action.intern() );
    }
  }
View Full Code Here

    }
  }
 
  private CDecorateableAction<?> get( DockAction action ){
    if( action instanceof CommonDockAction ){
      CAction caction = ((CommonDockAction)action).getAction();
      if( caction instanceof CDecorateableAction<?> ){
        return (CDecorateableAction<?>)caction;
      }
    }
    return null;
View Full Code Here

*/
public class CActionImportanceOrder extends DefaultDockActionImportanceOrder{
  @Override
  protected double getImportance( DockAction action ){
    if( action instanceof CommonDockAction ){
      CAction caction = ((CommonDockAction)action).getAction();
      DockActionImportance importance = caction.getClass().getAnnotation( DockActionImportance.class );
      if( importance != null ){
        return importance.value();
      }
    }
    return super.getImportance( action );
View Full Code Here

   
    if( index == actions.size() ){
      add( action );
      return null;
    }
    CAction result = remove( index );
    insert( index, action );
    return result;
  }
View Full Code Here

   * Removes the action at <code>index</code>.
   * @param index the index of the action to remove
   * @return the removed action
   */
  public CAction remove( int index ){
    CAction action = actions.remove( index );
    fireRemoved( index, index );
    return action;
  }
View Full Code Here

     */
    protected void update(){
        DockAction next = null;
        if( control != null ){
            if( dockable.isCloseable() ){
                CAction cnext = dockable.getAction( CDockable.ACTION_KEY_CLOSE );
                if( cnext != null )
                    next = cnext.intern();
                else
                    next = control.createCloseAction( dockable );
            }
        }
       
View Full Code Here

TOP

Related Classes of bibliothek.gui.dock.common.action.CAction

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.