/** * Makes sure that <code>placeholder</code> is not found anywhere * @param placeholder the element to remove * @param exception the entry that should not be modified */ private void clearPlaceholder( Path placeholder, Entry exception ){ clearPlaceholder( getRoot().getChild(), placeholder, exception ); }
/** * Makes sure that <code>placeholder</code> is not found anywhere * @param placeholder the element to remove * @param exception the entry that should not be modified */ private void clearPlaceholder( Path placeholder, Entry exception ){ clearPlaceholder( getRoot().getChild(), placeholder, exception ); }
/** * Adds a placeholder to <code>destination</code> and makes sure at the same time that * <code>placeholder</code> is not used by any other node. * @param destination a child of this perspective * @param placeholder the placeholder to insert */ public void addPlaceholder( Entry destination, Path placeholder ){ if( !destination.isAnchestor( getRoot() ) ){ throw new IllegalArgumentException( "destination is not child of this perspective" ); } clearPlaceholder( placeholder, destination ); destination.getPlaceholders().add( placeholder ); }
/** * Adds a placeholder to <code>destination</code> and makes sure at the same time that * <code>placeholder</code> is not used by any other node. * @param destination a child of this perspective * @param placeholder the placeholder to insert */ public void addPlaceholder( Entry destination, Path placeholder ){ if( !destination.isAnchestor( getRoot() ) ){ throw new IllegalArgumentException( "destination is not child of this perspective" ); } clearPlaceholder( placeholder, destination ); destination.getPlaceholders().add( placeholder ); }
private void clearPlaceholder( Entry parent, Path placeholder, Entry exception ){ if( parent != null && parent != exception ){ if( parent.getPlaceholderMap() != null ){ parent.getPlaceholderMap().removeAll( placeholder, true ); } parent.getPlaceholders().remove( placeholder ); } if( parent.asNode() != null ){ clearPlaceholder( parent.asNode().getChildA(), placeholder, exception ); clearPlaceholder( parent.asNode().getChildB(), placeholder, exception ); } }
private void clearPlaceholder( Entry parent, Path placeholder, Entry exception ){ if( parent != null && parent != exception ){ if( parent.getPlaceholderMap() != null ){ parent.getPlaceholderMap().removeAll( placeholder, true ); } parent.getPlaceholders().remove( placeholder ); } if( parent.asNode() != null ){ clearPlaceholder( parent.asNode().getChildA(), placeholder, exception ); clearPlaceholder( parent.asNode().getChildB(), placeholder, exception ); } }