/** * Adds a separator at <code>position</code> * @param position the location where to add the separator */ public void addSeparator( int position ){ add( position, SeparatorAction.SEPARATOR ); }
/** * Adds a separator at the end of this source */ public void addSeparator(){ add( SeparatorAction.SEPARATOR ); }
public void insert( int index, DockAction... action ){ actions.add( index, action ); }
public void insert( int index, DockAction... action ){ actions.add( index, action ); }
public void insert( int index, DockAction action ){ actions.add( index, action ); }
public void add( DockAction action ){ actions.add( action ); }
public void insert( int index, DockAction action ){ actions.add( index, action ); }
public void add( DockAction action ){ actions.add( action ); }
/** * Adds all given actions to the end of this source. * @param action The actions to append */ public void add( DockAction...action ){ add( getDockActionCount(), action ); }
/** * Adds an action to the menu. * @param index the location of the action * @param action the new action */ public void insert( int index, CAction action ){ menu.add( index, action.intern() ); }
/** * Adds an action to the menu. * @param index the location of the action * @param action the new action */ public void insert( int index, CAction action ){ menu.add( index, action.intern() ); }
/** * Adds an action to this menu. * @param action the new action */ public void add( CAction action ){ menu.add( action.intern() ); }
/** * Adds an action to this menu. * @param action the new action */ public void add( CAction action ){ menu.add( action.intern() ); }
/** * Updates the visibility-state of the hide action */ public void updateHideAction(){ boolean shouldShow = hideable && showHideAction; if( shouldShow != hideActionVisible ){ hideActionVisible = shouldShow; if( shouldShow ){ source.add( hider ); } else{ source.remove( hider ); } } }
/** * Sets the action which must be triggered in order to activate this mode. This * action will be returned by {@link #getActions(Dockable, Mode, DockActionSource)} if the mode * is not <code>this</code>. Changes to this property are applied to all visible * {@link Dockable}. * @param selectModeAction the action or <code>null</code> */ public void setSelectModeAction( DockAction selectModeAction ){ if( this.selectModeAction != selectModeAction ){ if( this.selectModeAction != null ) selectModeSource.remove( this.selectModeAction ); this.selectModeAction = selectModeAction; if( this.selectModeAction != null ) selectModeSource.add( this.selectModeAction ); } }
/** * Sets the action which must be triggered in order to activate this mode. This * action will be returned by {@link #getActions(Dockable, Mode, DockActionSource)} if the mode * is not <code>this</code>. Changes to this property are applied to all visible * {@link Dockable}. * @param selectModeAction the action or <code>null</code> */ public void setSelectModeAction( DockAction selectModeAction ){ if( this.selectModeAction != selectModeAction ){ if( this.selectModeAction != null ) selectModeSource.remove( this.selectModeAction ); this.selectModeAction = selectModeAction; if( this.selectModeAction != null ) selectModeSource.add( this.selectModeAction ); } }
public DefaultDockActionSource getDirectActionOffers( Dockable dockable ){ if( fullScreenAction == null ) return null; else { DefaultDockActionSource source = new DefaultDockActionSource(new LocationHint(LocationHint.DIRECT_ACTION, LocationHint.VERY_RIGHT)); source.add(fullScreenAction); return source; } }
public DefaultDockActionSource getDirectActionOffers( Dockable dockable ){ if( fullScreenAction == null ) return null; else { DefaultDockActionSource source = new DefaultDockActionSource(new LocationHint(LocationHint.DIRECT_ACTION, LocationHint.VERY_RIGHT)); source.add(fullScreenAction); return source; } }
/** * Sets the visibility of the action. The visibility can be changed at any * time and has effect on all occurrences of the action. * @param visible the new state */ public void setVisible( boolean visible ){ if( visible != isVisible() ){ if( visible ) source.add( action ); else source.remove( 0, source.getDockActionCount() ); } }
/** * Sets the visibility of the action. The visibility can be changed at any * time and has effect on all occurrences of the action. * @param visible the new state */ public void setVisible( boolean visible ){ if( visible != isVisible() ){ if( visible ) source.add( action ); else source.remove( 0, source.getDockActionCount() ); } }