/** * Creates the handle that will represent <code>this</code> as {@link CNormalModeArea} and {@link CMaximizedModeArea}. * @param control the control in whose realm this area is used * @return the new handle, not <code>null</code> */ protected CSplitDockStationHandle createSplitDockStationHandle( CControl control ){ return new CSplitDockStationHandle( this, control.getLocationManager() ); }
@Override protected ExternalizedCSplitDockStationHandler createSplitDockStationHandle( CControl control ){ return new ExternalizedCSplitDockStationHandler( this, control.getLocationManager() ); }
/** * Creates the handle that will represent <code>this</code> as {@link CNormalModeArea} and {@link CMaximizedModeArea}. * @param control the control in whose realm this area is used * @return the new handle, not <code>null</code> */ protected CSplitDockStationHandle createSplitDockStationHandle( CControl control ){ return new CSplitDockStationHandle( this, control.getLocationManager() ); }
@Override protected ExternalizedCSplitDockStationHandler createSplitDockStationHandle( CControl control ){ return new ExternalizedCSplitDockStationHandler( this, control.getLocationManager() ); }
/** * Removes the {@link #getLastPlaceholder() last placeholder} everywhere. */ public void removePlaceholderEverywhere(){ Path lastPlaceholder = getLastPlaceholder(); for( CLocationMode mode : control.getLocationManager().modes() ){ for( String id : mode.getRepresentationIds() ){ DockStation station = mode.getRepresentation( id ); station.getPlaceholderMapping().removePlaceholder( lastPlaceholder ); } } } }
public void setLocationsAside( CDockable dockable ){ if( dockable == null ){ throw new IllegalArgumentException( "dockable must not be null" ); } if( dockable == this ){ throw new IllegalArgumentException( "dockable must not be the same object as this" ); } if( dockable.getControl() == null ){ throw new IllegalArgumentException( "dockable is not registered at a CControl" ); } if( dockable.getControl() != getControl() ){ throw new IllegalStateException( "dockable is registered at another CControl" ); } if( dockable.getWorkingArea() != getWorkingArea() ){ throw new IllegalArgumentException( "dockable has another working-area as this" ); } CLocationModeManager locationManager = getControl().getLocationManager(); locationManager.setLocationAside( intern(), dockable.intern() ); CLocationMode mode = locationManager.getCurrentMode( dockable.intern() ); if( mode != null ){ setLocation( new CExtendedModeLocation( mode.getExtendedMode() ) ); } }
public void setLocationsAside( CDockable dockable ){ if( dockable == null ){ throw new IllegalArgumentException( "dockable must not be null" ); } if( dockable == this ){ throw new IllegalArgumentException( "dockable must not be the same object as this" ); } if( dockable.getControl() == null ){ throw new IllegalArgumentException( "dockable is not registered at a CControl" ); } if( dockable.getControl() != getControl() ){ throw new IllegalStateException( "dockable is registered at another CControl" ); } if( dockable.getWorkingArea() != getWorkingArea() ){ throw new IllegalArgumentException( "dockable has another working-area as this" ); } CLocationModeManager locationManager = getControl().getLocationManager(); locationManager.setLocationAside( intern(), dockable.intern() ); CLocationMode mode = locationManager.getCurrentMode( dockable.intern() ); if( mode != null ){ setLocation( new CExtendedModeLocation( mode.getExtendedMode() ) ); } }
private void setNextPosition(ToolBarItem item,ToolBarItem itemNext) { if(!item.isVisible()) { item.setVisible(true); } // itemNext.setLocationsAside(item); CLocation location = commonControl.getLocationManager().getLocation(item.intern()); if(location!=null) { itemNext.setLocation(location.aside()); itemNext.setVisible(true); } } /**
@Override public void setFocusedDockable( FocusRequest request ){ if( request.getSource() != null ){ Dockable focusedDockable = request.getSource().getElement().asDockable(); CLocationModeManager states = owner.getLocationManager(); if( states != null && !states.isOnTransaction() && focusedDockable != null ){ states.ensureNotHidden( focusedDockable ); } } super.setFocusedDockable( request ); }
@Override public void setFocusedDockable( FocusRequest request ){ if( request.getSource() != null ){ Dockable focusedDockable = request.getSource().getElement().asDockable(); CLocationModeManager states = owner.getLocationManager(); if( states != null && !states.isOnTransaction() && focusedDockable != null ){ states.ensureNotHidden( focusedDockable ); } } super.setFocusedDockable( request ); }
/** * Removes the {@link #placeholder} from any {@link DockStation} that is not an ancestor of <code>dockable</code>, * but is associated with the current {@link ExtendedMode} of <code>dockable</code>. * @param dockable defines the mode to check, and defines that its parent stations are not to be touched */ private void removePlaceholderInMode( Dockable dockable ){ CLocationMode mode = control.getLocationManager().getCurrentMode( dockable ); if( mode == null ){ return; } for( String id : mode.getRepresentationIds() ){ DockStation station = mode.getRepresentation( id ); if( !DockUtilities.isAncestor( station, dockable )){ station.getPlaceholderMapping().removePlaceholder( placeholder ); } } }
List<Location> history = control.getLocationManager().getPropertyHistory( dockable ); for( int i = history.size()-1; i >= 0; i-- ){ String historyRoot = history.get( i ).getRoot();
List<Location> history = control.getLocationManager().getPropertyHistory( dockable ); for( int i = history.size()-1; i >= 0; i-- ){ String historyRoot = history.get( i ).getRoot();
/** * Sets whether this area is also used as maximizing area. If so then pressing * the "maximize"-button of a child of this area will have the effect that * the child is maximized only within this area. Otherwise it takes more * space. * @param maximize <code>true</code> if children should be maximized to this * area, <code>false</code> if not. */ public void setMaximizingArea( boolean maximize ){ if( maximize != maximizing ){ this.maximizing = maximize; CControl access = getControl(); if( access != null ){ CMaximizedMode mode = access.getLocationManager().getMaximizedMode(); if( maximizing ){ mode.add( modeManagerHandle.asMaximziedModeArea() ); } else{ mode.remove( modeManagerHandle.asMaximziedModeArea().getUniqueId() ); } } } }
/** * Sets whether this area is also used as maximizing area. If so then pressing * the "maximize"-button of a child of this area will have the effect that * the child is maximized only within this area. Otherwise it takes more * space. * @param maximize <code>true</code> if children should be maximized to this * area, <code>false</code> if not. */ public void setMaximizingArea( boolean maximize ){ if( maximize != maximizing ){ this.maximizing = maximize; CControl access = getControl(); if( access != null ){ CMaximizedMode mode = access.getLocationManager().getMaximizedMode(); if( maximizing ){ mode.add( modeManagerHandle.asMaximziedModeArea() ); } else{ mode.remove( modeManagerHandle.asMaximziedModeArea().getUniqueId() ); } } } }
List<Location> history = control.getLocationManager().getPropertyHistory( dockable ); for( int i = history.size()-1; i >= 0; i-- ){ String historyRoot = history.get( i ).getRoot();
List<Location> history = control.getLocationManager().getPropertyHistory( dockable ); for( int i = history.size()-1; i >= 0; i-- ){ String historyRoot = history.get( i ).getRoot();
private ExtendedMode getInitialMode( Dockable dockable, boolean validateMode ){ Path lastPlaceholder = getLastPlaceholder(); for( CLocationMode mode : control.getLocationManager().modes() ){ for( String id : mode.getRepresentationIds() ){ DockStation station = mode.getRepresentation( id ); if( station.getPlaceholderMapping().hasPlaceholder( lastPlaceholder )){ boolean valid = true; if( validateMode ){ Dockable child = station.getPlaceholderMapping().getDockableAt( lastPlaceholder ); if( child != null ){ valid = mode.isCurrentMode( child ); } } if( valid ){ return mode.getExtendedMode(); } } } } return null; }
ModeSettings<Location, Location> modes = control.getOwner().getLocationManager().createModeSettings( converter ); modes.read( in );
ModeSettings<Location, Location> modes = control.getOwner().getLocationManager().createModeSettings( converter ); modes.readXML( xmodes );