/** * Creates a new {@link FlapDockStationSource}. * @param station the owner of this source * @param dockable the element for which this source is used * @param holdAction the action to show, can be <code>null</code> */ public FlapDockStationSource( FlapDockStation station, Dockable dockable, DockAction holdAction ){ super( new LocationHint( LocationHint.DIRECT_ACTION, LocationHint.LITTLE_LEFT )); this.station = station; this.dockable = dockable; this.holdAction = holdAction; }
/** * Creates a new {@link FlapDockStationSource}. * @param station the owner of this source * @param dockable the element for which this source is used * @param holdAction the action to show, can be <code>null</code> */ public FlapDockStationSource( FlapDockStation station, Dockable dockable, DockAction holdAction ){ super( new LocationHint( LocationHint.DIRECT_ACTION, LocationHint.LITTLE_LEFT )); this.station = station; this.dockable = dockable; this.holdAction = holdAction; }
public LocationHint getLocationHint() { return new LocationHint( LocationHint.ACTION_GUARD, LocationHint.RIGHT_OF_ALL ); }
public LocationHint getLocationHint(){ return new LocationHint( LocationHint.ACTION_GUARD, LocationHint.RIGHT ); }
public LocationHint getLocationHint() { return new LocationHint( LocationHint.ACTION_GUARD, LocationHint.RIGHT_OF_ALL ); }
public LocationHint getLocationHint(){ return new LocationHint( LocationHint.ACTION_GUARD, LocationHint.RIGHT ); }
public DockActionSource getSource( Dockable dockable ) { DockInfo info = getInfo( dockable ); if( info == null ){ return new DefaultDockActionSource( new LocationHint( LocationHint.ACTION_GUARD, LocationHint.RIGHT_OF_ALL ), this ); } else{ return info.getSource(); } }
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; } }
public DockActionSource getDirectActionOffers( Dockable dockable ) { if( fullscreenAction == null ) return null; else{ return createFullscreenSource( dockable, new LocationHint( LocationHint.DIRECT_ACTION, LocationHint.VERY_RIGHT )); } }
/** * Creates a new DockInfo. * @param dockable the element whose informations are stored * @param key the name of the element */ public DockInfo( Dockable dockable, String key ){ this.dockable = dockable; this.key = key; entryLayout = defaultEntryLayout; source = new DefaultDockActionSource( new LocationHint( LocationHint.ACTION_GUARD, LocationHint.RIGHT_OF_ALL )); hideActionVisible = false; setHideable( defaultHideable ); }
/** * Creates a new dockable * @param dockable the model of this element * @param sources action source which shows the close action */ public DefaultCommonDockable( CDockable dockable, DockActionSource... sources ){ this.dockable = dockable; this.sources = sources; actions = new CActionSource( new LocationHint( LocationHint.DOCKABLE, LocationHint.LEFT )); setActionOffers( actions ); dockable.addCDockablePropertyListener( new CDockableAdapter(){ @Override public void titleShownChanged( CDockable dockable ) { fireTitleExchanged(); } }); setFactoryID( CommonSingleDockableFactory.BACKUP_FACTORY_ID ); }
/** * Creates a new dockable * @param dockable the model of this element * @param sources action source which shows the close action */ public DefaultCommonDockable( CDockable dockable, DockActionSource... sources ){ this.dockable = dockable; this.sources = sources; actions = new CActionSource( new LocationHint( LocationHint.DOCKABLE, LocationHint.LEFT )); setActionOffers( actions ); dockable.addCDockablePropertyListener( new CDockableAdapter(){ @Override public void titleShownChanged( CDockable dockable ) { fireTitleExchanged(); } }); setFactoryID( CommonSingleDockableFactory.BACKUP_FACTORY_ID ); }
/** * Creates a new guard * @param controller The controller for which actions are created. */ public ReplaceActionGuard( DockController controller ){ if( controller == null ) throw new IllegalArgumentException( "Controller should not be null" ); action = new ReplaceAction( controller ); source = new DefaultDockActionSource(); source.setHint( new LocationHint( LocationHint.ACTION_GUARD, LocationHint.LEFT )); setVisible( true ); }
/** * Creates a new guard * @param controller The controller for which actions are created. */ public ReplaceActionGuard( DockController controller ){ if( controller == null ) throw new IllegalArgumentException( "Controller should not be null" ); action = new ReplaceAction( controller ); source = new DefaultDockActionSource(); source.setHint( new LocationHint( LocationHint.ACTION_GUARD, LocationHint.LEFT )); setVisible( true ); }
public DockActionSource getSource( Dockable dockable, DockActionSource source, DockActionSource[] guards, DockActionSource parent, DockActionSource[] parents ){ MultiDockActionSource multiSource = new MultiDockActionSource(); multiSource.setHint( new LocationHint( LocationHint.ACTION_OFFER, LocationHint.MIDDLE )); multiSource.setSeparateSources( isSeparators() );
public DockActionSource getIndirectActionOffers( Dockable dockable ) { if( fullscreenAction == null ) return null; DockStation parent = dockable.getDockParent(); if( parent == null ) return null; if( parent instanceof ScreenDockStation ) return null; dockable = parent.asDockable(); if( dockable == null ) return null; parent = dockable.getDockParent(); if( parent != this ) return null; return createFullscreenSource( dockable, new LocationHint( LocationHint.INDIRECT_ACTION, LocationHint.VERY_RIGHT )); }
public DockActionSource getIndirectActionOffers( Dockable dockable ){ if( fullScreenAction == null ) return null; DockStation parent = dockable.getDockParent(); if( parent == null ) return null; if( parent instanceof SplitDockStation ) return null; dockable = parent.asDockable(); if( dockable == null ) return null; parent = dockable.getDockParent(); if( parent != this ) return null; DefaultDockActionSource source = new DefaultDockActionSource(fullScreenAction); source.setHint(new LocationHint(LocationHint.INDIRECT_ACTION, LocationHint.VERY_RIGHT)); return source; }
public DockActionSource getIndirectActionOffers( Dockable dockable ){ if( fullScreenAction == null ) return null; DockStation parent = dockable.getDockParent(); if( parent == null ) return null; if( parent instanceof SplitDockStation ) return null; dockable = parent.asDockable(); if( dockable == null ) return null; parent = dockable.getDockParent(); if( parent != this ) return null; DefaultDockActionSource source = new DefaultDockActionSource(fullScreenAction); source.setHint(new LocationHint(LocationHint.INDIRECT_ACTION, LocationHint.VERY_RIGHT)); return source; }