public void move( Dockable dockable, DockableProperty property ) { DockUtilities.checkLayoutLocked(); if( property instanceof ScreenDockProperty ){ ScreenDockWindow window = getWindow( dockable ); if( window == null ) throw new IllegalArgumentException( "dockable not child of this station" ); ScreenDockProperty bounds = (ScreenDockProperty)property; window.setWindowBounds( new Rectangle( bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight() ) ); } }
/** * Creates a new location by creating the child location of <code>location</code> using * <code>property</code> for that step. * @param location the location to expand * @param property the property that is the source of the next location * @return the new location or <code>null</code> if no conversion is possible */ protected CLocation expand( CLocation location, ScreenDockProperty property ){ if( property.isFullscreen() ){ return new CMaximalExternalizedLocation( location, property.getX(), property.getY(), property.getWidth(), property.getHeight() ); } else{ return new CExternalizedLocation( location, property.getX(), property.getY(), property.getWidth(), property.getHeight() ); } }
/** * Creates a new location by creating the child location of <code>location</code> using * <code>property</code> for that step. * @param location the location to expand * @param property the property that is the source of the next location * @return the new location or <code>null</code> if no conversion is possible */ protected CLocation expand( CLocation location, ScreenDockProperty property ){ if( property.isFullscreen() ){ return new CMaximalExternalizedLocation( location, property.getX(), property.getY(), property.getWidth(), property.getHeight() ); } else{ return new CExternalizedLocation( location, property.getX(), property.getY(), property.getWidth(), property.getHeight() ); } }
private CLocation expand( DockableProperty property ){ if( property instanceof ScreenDockProperty ){ ScreenDockProperty screen = (ScreenDockProperty)property; CLocation result; if( screen.isFullscreen() ){ result = new CMaximalExternalizedLocation( screen.getX(), screen.getY(), screen.getWidth(), screen.getHeight() ); } else{ result = new CExternalizedLocation( screen.getX(), screen.getY(), screen.getWidth(), screen.getHeight() ); } if( property.getSuccessor() != null ){ return result.expandProperty( station.getStation().getController(), property.getSuccessor() ); } else{ return result; } } return null; }
private CLocation expand( DockableProperty property ){ if( property instanceof ScreenDockProperty ){ ScreenDockProperty screen = (ScreenDockProperty)property; CLocation result; if( screen.isFullscreen() ){ result = new CMaximalExternalizedLocation( screen.getX(), screen.getY(), screen.getWidth(), screen.getHeight() ); } else{ result = new CExternalizedLocation( screen.getX(), screen.getY(), screen.getWidth(), screen.getHeight() ); } if( property.getSuccessor() != null ){ return result.expandProperty( station.getStation().getController(), property.getSuccessor() ); } else{ return result; } } return null; }
int x = property.getX(); int y = property.getY(); int width = property.getWidth();
boolean accept = accept( dockable ) && dockable.accept( this ) && (acceptance == null || acceptance.accept( this, dockable )); if( accept ){ addDockable( dockable, new Rectangle( property.getX(), property.getY(), property.getWidth(), property.getHeight() ), property.getPlaceholder(), args.isBoundsIncludeWindow() ); done = true;