/** * Copies the fields of this property to <code>copy</code>. * @param copy the copy of <code>this</code> */ protected void copy( AbstractDockableProperty copy ){ if( successor != null ) copy.successor = successor.copy(); }
public SplitDockPlaceholderProperty copy(){ SplitDockPlaceholderProperty copy = new SplitDockPlaceholderProperty( placeholder, backup == null ? null : backup.copy() ); copy( copy ); return copy; }
/** * Creates a copy of <code>root</code> and sets <code>property</code> * as the successor of the very last element in the property chain beginning * at <code>root</code>. * @param root the root of the chain, can be <code>null</code> * @param property the new last element of the chain * @return the root of the new chain */ public static DockableProperty append( DockableProperty root, DockableProperty property ){ if( root == null ) return property; root = root.copy(); getLastProperty( root ).setSuccessor( property ); return root; }
@Override public DockableProperty copy(){ final ToolbarContainerProperty copy = new ToolbarContainerProperty( index, placeholder); final DockableProperty successor = getSuccessor(); if (successor != null){ copy.setSuccessor(successor.copy()); } return copy; }
@Override public DockableProperty copy(){ final ToolbarProperty copy = new ToolbarProperty(index, placeholder); final DockableProperty successor = getSuccessor(); if (successor != null){ copy.setSuccessor(successor.copy()); } return copy; }
public void finish( DockableProperty newParentLocation ){ if( valid ){ DockableProperty newLeafLocation = validLocation(); if( newLeafLocation == null && newParentLocation != null ){ newLeafLocation = newParentLocation.copy(); } if( newLeafLocation != null ){ newLeafLocation.setSuccessor( oldLocation ); composition.getLayout().setLocation( newLeafLocation ); } else{ invalidate(); } } }
private DockableProperty copyAndSetStackLocation( DockableProperty property, int delta ){ if( property == null ){ return null; } property = property.copy(); DockableProperty last = property; while( last.getSuccessor() != null ){ last = last.getSuccessor(); } if( last instanceof StackDockProperty ){ ((StackDockProperty)last).setIndex( ((StackDockProperty)last).getIndex() + delta ); } else{ StackDockProperty stack = new StackDockProperty( delta ); last.setSuccessor( stack ); } return property; } }
private DockableProperty copyAndSetStackLocation( DockableProperty property, int delta ){ if( property == null ){ return null; } property = property.copy(); DockableProperty last = property; while( last.getSuccessor() != null ){ last = last.getSuccessor(); } if( last instanceof StackDockProperty ){ ((StackDockProperty)last).setIndex( ((StackDockProperty)last).getIndex() + delta ); } else{ StackDockProperty stack = new StackDockProperty( delta ); last.setSuccessor( stack ); } return property; } }
location = ((SplitDockPlaceholderProperty)location).getBackup(); location = location.copy(); location.setSuccessor( null ); request.answer( location );
location = ((SplitDockPlaceholderProperty)location).getBackup(); location = location.copy(); location.setSuccessor( null ); request.answer( location );