/** * Updates the {@link #getConfigurableDisplayerHints() current hints} * of this station. */ protected void updateConfigurableDisplayerHints(){ if( hints != null ) { if( getDockableCount() == 0 ) hints.setShowBorderHint(Boolean.TRUE); else hints.setShowBorderHint(Boolean.FALSE); } }
/** * Updates the {@link #getConfigurableDisplayerHints() current hints} * of this station. */ protected void updateConfigurableDisplayerHints(){ if( hints != null ) { if( getDockableCount() == 0 ) hints.setShowBorderHint(Boolean.TRUE); else hints.setShowBorderHint(Boolean.FALSE); } }
/** * Switches the child which is in fullscreen-mode. If there is no child, * nothing will happen. If there is only one child, it will be set to * fullscreen (if it is not already fullscreen). */ public void setNextFullScreen(){ if( dockables.size() > 0 ) { if( fullScreenDockable == null ) setFullScreen(getDockable(0)); else { int index = indexOfDockable(fullScreenDockable.getDockable()); index++; index %= getDockableCount(); setFullScreen(getDockable(index)); } } }
/** * Switches the child which is in fullscreen-mode. If there is no child, * nothing will happen. If there is only one child, it will be set to * fullscreen (if it is not already fullscreen). */ public void setNextFullScreen(){ if( dockables.size() > 0 ) { if( fullScreenDockable == null ) setFullScreen(getDockable(0)); else { int index = indexOfDockable(fullScreenDockable.getDockable()); index++; index %= getDockableCount(); setFullScreen(getDockable(index)); } } }
/** * Removes all children from this station.<br> * Note: clients may need to invoke {@link DockController#freezeLayout()} * and {@link DockController#meltLayout()} to ensure noone else adds or * removes <code>Dockable</code>s. */ public void removeAllDockables(){ DockController controller = getController(); try { access.arm(); DockUtilities.checkLayoutLocked(); if( controller != null ) controller.freezeLayout(); for( int i = getDockableCount() - 1; i >= 0; i-- ) removeDisplayer(i, null); root().setChild(null); } finally { if( controller != null ) controller.meltLayout(); access.fire(); } }
/** * Removes all children from this station.<br> * Note: clients may need to invoke {@link DockController#freezeLayout()} * and {@link DockController#meltLayout()} to ensure no-one else adds or * removes <code>Dockable</code>s. */ public void removeAllDockables(){ DockController controller = getController(); try { access.arm(); DockUtilities.checkLayoutLocked(); if( controller != null ) controller.freezeLayout(); for( int i = getDockableCount() - 1; i >= 0; i-- ) removeDisplayer(i, null); root().setChild(null); } finally { if( controller != null ) controller.meltLayout(); access.fire(); } }
/** * Removes this station from its parent and from the {@link CControl} if it no longer has any children, * and if the layout is not currently frozen. */ private void autoRemove(){ if( !autoRemove ){ return; } CControl control = getControl(); if( control != null ){ DockRegister register = control.getController().getRegister(); if( register.isStalled() ){ register.addDockRegisterListener( new DelayedAutoRemove() ); } else{ SplitDockStation station = getStation(); if( station.getDockableCount() == 0 ){ DockStation parent = station.getDockParent(); if( parent != null ){ parent.drag( station ); } control.removeDockable( this ); control.removeStation( this ); } } } }
/** * Removes this station from its parent and from the {@link CControl} if it no longer has any children, * and if the layout is not currently frozen. */ private void autoRemove(){ if( !autoRemove ){ return; } CControl control = getControl(); if( control != null ){ DockRegister register = control.getController().getRegister(); if( register.isStalled() ){ register.addDockRegisterListener( new DelayedAutoRemove() ); } else{ SplitDockStation station = getStation(); if( station.getDockableCount() == 0 ){ DockStation parent = station.getDockParent(); if( parent != null ){ parent.drag( station ); } control.removeDockable( this ); control.removeStation( this ); } } } }
public PutInfo prepareDrop( SplitDockStation station, StationDropItem item ){ if( station.isFullScreen() ) return null; if( station.getDockableCount() == 0 ){ PutInfo putInfo = new PutInfo( null, PutInfo.Put.CENTER, item.getDockable(), true ); putInfo = validatePutInfo( station, putInfo ); return putInfo; } else{ Point point = new Point( item.getMouseX(), item.getMouseY() ); SwingUtilities.convertPointFromScreen( point, station ); PutInfo putInfo = station.getRoot().getPut( point.x, point.y, item.getDockable() ); if( putInfo == null && station.isAllowSideSnap() ){ putInfo = calculateSideSnap( station, point.x, point.y, null, item.getDockable() ); putInfo = validatePutInfo( station, putInfo ); } if( putInfo != null ){ putInfo.setDockable( item.getDockable() ); calculateDivider( station, putInfo, null, item ); } return putInfo; } }
public PutInfo prepareDrop( SplitDockStation station, StationDropItem item ){ if( station.isFullScreen() ) return null; if( station.getDockableCount() == 0 ){ PutInfo putInfo = new PutInfo( null, PutInfo.Put.CENTER, item.getDockable(), true ); putInfo = validatePutInfo( station, putInfo ); return putInfo; } else{ Point point = new Point( item.getMouseX(), item.getMouseY() ); SwingUtilities.convertPointFromScreen( point, station ); PutInfo putInfo = station.getRoot().getPut( point.x, point.y, item.getDockable() ); if( putInfo == null && station.isAllowSideSnap() ){ putInfo = calculateSideSnap( station, point.x, point.y, null, item.getDockable() ); putInfo = validatePutInfo( station, putInfo ); } if( putInfo != null ){ putInfo.setDockable( item.getDockable() ); calculateDivider( station, putInfo, null, item ); } return putInfo; } }
if( station.getDockableCount() == 0 ) return null; if( station.getDockableCount() == 1 && station.getDockable( 0 ) == drop ) return null;
if( station.getDockableCount() == 0 ) return null; if( station.getDockableCount() == 1 && station.getDockable( 0 ) == drop ) return null;
access.arm(); DockUtilities.checkLayoutLocked(); if( getDockableCount() == 0 ) { if( !DockUtilities.acceptable( this, dockable ) ){ return false;
access.arm(); DockUtilities.checkLayoutLocked(); if( getDockableCount() == 0 ) { if( !DockUtilities.acceptable( this, dockable ) ){ return false;