bibliothek.gui.dock.station.split
Class SplitPlaceholderSet

java.lang.Object
  extended by bibliothek.gui.dock.station.split.SplitPlaceholderSet

@FrameworkOnly
public class SplitPlaceholderSet
extends Object

Keeps track of the various placeholders and Dockables of a SplitDockStation and makes sure that a placeholder is used by no more than one SplitNode.

Author:
Benjamin Sigg

Constructor Summary
SplitPlaceholderSet(SplitDockAccess access)
          Creates a new set.
 
Method Summary
 void removeDoublePlaceholders(SplitNode node, PlaceholderMap map)
          Removes any placeholder from placeholderMap that is stored in another node than node.
 void set(SplitNode node, Dockable dockable, SplitNode... protectedNodes)
          Ensures that node is associated with the placeholder for dockable.
 void set(SplitNode node, Path placeholder, SplitNode... protectedNodes)
          Ensures that node is associated with placeholder but no other node has placeholder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitPlaceholderSet

public SplitPlaceholderSet(SplitDockAccess access)
Creates a new set.

Parameters:
access - Access to the owner of this set, not null
Method Detail

set

public void set(SplitNode node,
                Dockable dockable,
                SplitNode... protectedNodes)
Ensures that node is associated with the placeholder for dockable.

Parameters:
node - the owner of dockable, can be null to indicate that noone must use the placeholder of dockable
dockable - the item whose placeholder is updated
protectedNodes - nodes that will not be removed even if they are no longer useful

set

public void set(SplitNode node,
                Path placeholder,
                SplitNode... protectedNodes)
Ensures that node is associated with placeholder but no other node has placeholder.

Parameters:
node - the node which must have placeholder, null to indicate that noone must use placeholder
placeholder - the placeholder to set or to move
protectedNodes - nodes that will not be removed even if they are no longer useful

removeDoublePlaceholders

public void removeDoublePlaceholders(SplitNode node,
                                     PlaceholderMap map)
Removes any placeholder from placeholderMap that is stored in another node than node.

Parameters:
node - the node which must not be searched, can be null
map - the map from which placeholders will be removed