@Override public DockableProperty findProperty( DockableProperty successor ) { if( successor == null ){ return new SplitDockProperty( 0, 0, 1, 1 ); } return successor; }
@Override public DockableProperty findProperty( DockableProperty successor ){ if( successor == null ){ return new SplitDockProperty( 0, 0, 1, 1 ); } return successor; }
@Override public DockableProperty findProperty( DockableProperty successor ){ if( successor == null ){ return new SplitDockProperty( 0, 0, 1, 1 ); } return successor; }
public DockableProperty createProperty() { return new SplitDockProperty(); } }
@Override public DockableProperty findProperty( DockableProperty successor ) { if( successor == null ){ return new SplitDockProperty( 0, 0, 1, 1 ); } return successor; }
public DockableProperty copy() { SplitDockProperty copy = new SplitDockProperty( x, y, width, height ); copy( copy ); return copy; }
@Override public DockableProperty findProperty( DockableProperty successor ) { if( successor == null ){ successor = new SplitDockProperty( 0, 0, 1, 1 ); } if( parent != null ){ return parent.findProperty( successor ); } return successor; }
@Override public DockableProperty findProperty( DockableProperty successor ) { if( successor == null ){ successor = new SplitDockProperty( 0, 0, 1, 1 ); } if( parent != null ){ return parent.findProperty( successor ); } return successor; }
@Override public DockableProperty findProperty( DockableProperty successor ){ SplitDockProperty split = new SplitDockProperty( x, y, width, height ); split.setSuccessor( successor ); if( parent != null ){ return parent.findProperty( split ); } return split; }
@Override public DockableProperty findProperty( DockableProperty successor ){ SplitDockProperty split = new SplitDockProperty( x, y, width, height ); split.setSuccessor( successor ); if( parent != null ){ return parent.findProperty( split ); } return split; }
public void load( DataInputStream in ) throws IOException{ placeholder = new Path( in.readUTF() ); switch( in.readByte() ){ case 0: backup = null; break; case 1: backup = new SplitDockProperty(); backup.load( in ); break; case 2: backup = new SplitDockPathProperty(); backup.load( in ); break; default: throw new IllegalArgumentException( "unknown type of backup property" ); } }
/** * Creates a {@link DockableProperty} for the location of <code>dockable</code>. * The location is encoded directly as the coordinates x,y,width and height * of the <code>dockable</code>. * @param dockable the element whose location is searched * @return the location */ public SplitDockProperty getDockableLocationProperty( Dockable dockable ){ Leaf leaf = getRoot().getLeaf(dockable); return new SplitDockProperty(leaf.getX(), leaf.getY(), leaf.getWidth(), leaf.getHeight()); }
/** * Creates a {@link DockableProperty} for the location of <code>dockable</code>. * The location is encoded directly as the coordinates x,y,width and height * of the <code>dockable</code>. * @param dockable the element whose location is searched * @return the location */ public SplitDockProperty getDockableLocationProperty( Dockable dockable ){ Leaf leaf = getRoot().getLeaf(dockable); return new SplitDockProperty(leaf.getX(), leaf.getY(), leaf.getWidth(), leaf.getHeight()); }
/** * Gets a {@link SplitDockProperty} that works as backup property * if the referenced placeholder is not found. * @param target the node that asks for this location * @return the location, not <code>null</code> */ public SplitDockProperty toSplitLocation( SplitNode target ){ if( backup instanceof SplitDockProperty ) return (SplitDockProperty)backup; if( backup instanceof SplitDockPathProperty ) return ((SplitDockPathProperty)backup).toLocation( target ); SplitDockProperty result = new SplitDockProperty( target.getX(), target.getY(), target.getWidth(), target.getHeight() ); result.setSuccessor( getSuccessor() ); return result; }
public void load( XElement element ){ placeholder = new Path( element.getElement( "placeholder" ).getString() ); backup = null; XElement xchild = element.getElement( "backup-path" ); if( xchild != null ){ backup = new SplitDockPathProperty(); backup.load( xchild ); } else{ xchild = element.getElement( "backup-location" );; if( xchild != null ){ backup = new SplitDockProperty(); backup.load( xchild ); } } } }
SplitDockProperty property = new SplitDockProperty( x, y, w, h ); property.setSuccessor( getSuccessor() ); return property;
result = new SplitDockProperty( onPath.getX(), onPath.getY(), onPath.getWidth(), onPath.getHeight() ); result = new SplitDockProperty( x, y, w, h );
SplitDockProperty selfLocation = new SplitDockProperty( getX(), getY(), getWidth(), getHeight() ); selfLocation.setSuccessor( property.getSuccessor() ); boolean done = getAccess().drop( dockable, selfLocation, this );