controller.meltLayout(); access.fire();
controller.meltLayout(); access.fire();
access.fire();
access.fire();
access.fire();
access.fire();
/** * Tries to insert <code>dockable</code> at a location such that the path * to that location is the same as described in <code>property</code>. * @param dockable the element to insert * @param property the preferred path to the element * @return <code>true</code> if the element was successfully inserted */ public boolean drop( Dockable dockable, SplitDockPathProperty property ){ try{ access.arm(); DockUtilities.checkLayoutLocked(); // use the ids of the topmost nodes in the path to find a node of this station Tuple<Integer, SplitNode> startNode = getLowestNode( property ); int index = startNode.getA(); SplitNode start = startNode.getB(); updateBounds(); boolean done = start.insert(property, index, dockable); if( done ) revalidate(); return done; } finally{ access.fire(); } }
public void repositioned( SplitNode node ){ arm(); try{ node.visit( new SplitNodeVisitor(){ public void handleRoot( Root root ){ // ignore } public void handlePlaceholder( Placeholder placeholder ){ // ignore } public void handleNode( Node node ){ // ignore } public void handleLeaf( Leaf leaf ){ Dockable dockable = leaf.getDockable(); if( dockable != null ){ repositioned.add( dockable ); } } }); } finally{ fire(); } }
/** * Tries to insert <code>dockable</code> at a location such that the path * to that location is the same as described in <code>property</code>. * @param dockable the element to insert * @param property the preferred path to the element * @return <code>true</code> if the element was successfully inserted */ public boolean drop( Dockable dockable, SplitDockPathProperty property ){ try{ access.arm(); DockUtilities.checkLayoutLocked(); // use the ids of the topmost nodes in the path to find a node of this station Tuple<Integer, SplitNode> startNode = getLowestNode( property ); int index = startNode.getA(); SplitNode start = startNode.getB(); updateBounds(); boolean done = start.insert(property, index, dockable); if( done ) revalidate(); return done; } finally{ 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(); } }
public void repositioned( SplitNode node ){ arm(); try{ node.visit( new SplitNodeVisitor(){ public void handleRoot( Root root ){ // ignore } public void handlePlaceholder( Placeholder placeholder ){ // ignore } public void handleNode( Node node ){ // ignore } public void handleLeaf( Leaf leaf ){ Dockable dockable = leaf.getDockable(); if( dockable != null ){ repositioned.add( dockable ); } } }); } finally{ fire(); } }
/** * Removes <code>dockable</code> from this station. If * <code>dockable</code> is not a child of this station, nothing happens.<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. * @param dockable the child to remove */ public void removeDockable( Dockable dockable ){ try{ access.arm(); DockUtilities.checkLayoutLocked(); Leaf leaf = root().getLeaf(dockable); if( leaf != null ) { leaf.setDockable(null, null, true, dockable.asDockStation() != null); leaf.placehold(true); } } finally{ access.fire(); } }
/** * 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 <code>dockable</code> from this station. If * <code>dockable</code> is not a child of this station, nothing happens.<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. * @param dockable the child to remove */ public void removeDockable( Dockable dockable ){ try{ access.arm(); DockUtilities.checkLayoutLocked(); Leaf leaf = root().getLeaf(dockable); if( leaf != null ) { leaf.setDockable(null, null, true, dockable.asDockStation() != null); leaf.placehold(true); } } finally{ access.fire(); } }
/** * Drops <code>dockable</code> at the placeholder that is referenced by <code>property</code>. This * action removes the placeholder from the tree. * @param dockable the element to add * @param property the location of <code>dockable</code> * @return <code>true</code> if the the operation was a success, <code>false</code> if not */ public boolean drop( Dockable dockable, SplitDockPlaceholderProperty property ){ try{ access.arm(); DockUtilities.checkLayoutLocked(); validate(); return root().insert(property, dockable); } finally{ access.fire(); } }
/** * Drops <code>dockable</code> at the placeholder that is referenced by <code>property</code>. This * action removes the placeholder from the tree. * @param dockable the element to add * @param property the location of <code>dockable</code> * @return <code>true</code> if the the operation was a success, <code>false</code> if not */ public boolean drop( Dockable dockable, SplitDockPlaceholderProperty property ){ try{ access.arm(); DockUtilities.checkLayoutLocked(); validate(); return root().insert(property, dockable); } finally{ access.fire(); } }
public void dockableSelected( Dockable dockable ){ arm(); if( dockableSelected == null ){ dockableSelected = dockable; } fire(); }
public void dockableSelected( Dockable dockable ){ arm(); if( dockableSelected == null ){ dockableSelected = dockable; } fire(); }