public DockableDisplayer getOldDisplayer(){ SplitNode node = info.getNode(); if( node instanceof Leaf ){ return ((Leaf)node).getDisplayer(); } return null; }
public DockableDisplayer getOldDisplayer(){ SplitNode node = info.getNode(); if( node instanceof Leaf ){ return ((Leaf)node).getDisplayer(); } return null; }
if( preferredSize == null ) { if( node instanceof Leaf ) { DockableDisplayer displayer = ((Leaf) node).getDisplayer(); if( displayer != null ){ preferredSize = displayer.getComponent().getPreferredSize();
if( minimumSize == null ) { if( node instanceof Leaf ) { DockableDisplayer displayer = ((Leaf) node).getDisplayer(); if( displayer != null ){ minimumSize = displayer.getComponent().getMinimumSize();
/** * Tells whether the position of the mouse <code>x/y</code> would result in a drag and drop operation where * {@link Put#TITLE} is appropriate. * @param bounds the boundaries of the {@link Dockable}, this {@link Leaf} or any other representation of * the {@link Dockable} * @param x the x-coordinate of the mouse * @param y the y-coordinate of the mouse * @return whether the location of the mouse would allow a combination of the {@link Dockable}s */ protected boolean isTitlePut( Rectangle bounds, int x, int y ){ DockableDisplayer displayer = getDisplayer(); if( displayer.getTitle() != null ){ if( displayer.getTitleLocation() == DockableDisplayer.Location.TOP ){ return y <= bounds.y; } else if( displayer.getTitleLocation() == DockableDisplayer.Location.BOTTOM ){ return y >= bounds.y+bounds.height; } else if( displayer.getTitleLocation() == DockableDisplayer.Location.LEFT ){ return x <= bounds.x; } else if( displayer.getTitleLocation() == DockableDisplayer.Location.RIGHT ){ return x >= bounds.x + bounds.width; } } return false; }
DockableDisplayer displayer = getDisplayer(); bounds = new Rectangle( bounds );
/** * Resets the boundaries of the {@link DockableDisplayer} of this {@link Leaf}, using the current {@link Span}s * as well. */ public void resetDisplayerBounds(){ DockableDisplayer displayer = getDisplayer(); StationChildHandle fullscreen = getAccess().getFullScreenDockable(); if( displayer != null && (fullscreen == null || displayer != fullscreen.getDisplayer() )){ Rectangle bounds = getBounds(); bounds = getAccess().getSpanStrategy().modifyBounds( bounds, this ); Component component = displayer.getComponent(); component.setBounds( bounds ); if( component instanceof JComponent ){ ((JComponent)component).revalidate(); } } }
@Override public RequestDimension prepareResize( Leaf leaf ) { RequestDimension request = getAndClearResizeRequest( leaf.getDockable() ); if( request != null ){ Insets insets = leaf.getDisplayer().getDockableInsets(); if( request.isWidthSet() ) request.setWidth( request.getWidth() + insets.left + insets.right ); if( request.isHeightSet() ) request.setHeight( request.getHeight() + insets.top + insets.bottom ); return request; } return super.prepareResize( leaf ); } }
@Override public RequestDimension prepareResize( Leaf leaf ) { RequestDimension request = getAndClearResizeRequest( leaf.getDockable() ); if( request != null ){ Insets insets = leaf.getDisplayer().getDockableInsets(); if( request.isWidthSet() ) request.setWidth( request.getWidth() + insets.left + insets.right ); if( request.isHeightSet() ) request.setHeight( request.getHeight() + insets.top + insets.bottom ); return request; } return super.prepareResize( leaf ); } }
@Override public PutInfo getPut( int x, int y, double factorW, double factorH, Dockable drop ) { DockableDisplayer displayer = getDisplayer(); if( displayer == null ) return null;