bibliothek.gui.dock.station.split
Interface SplitDockAccess


public interface SplitDockAccess

Provides access to some internal methods and attributes of a SplitDockStation. An access is granted only to a few selected friend classes.

Author:
Benjamin Sigg

Method Summary
 void addHandle(StationChildHandle handle, DockHierarchyLock.Token token)
          Adds the new handle to the station and adds the displayer to the station.
 boolean drop(Dockable dockable, SplitDockProperty property, SplitNode root)
          Tries to add Dockable such that the boundaries given by property are full filled.
 StationChildHandle getFullScreenDockable()
          Gets the DockableDisplayer which is currently in fullscreen-mode.
 SplitDockStation getOwner()
          Gets the station to which this object grants access.
 SplitPlaceholderSet getPlaceholderSet()
          Gets the set which keeps track of all placeholders and makes sure that no placeholder is used twice.
 DockTitleVersion getTitleVersion()
          Gets the kind of title owner uses.
 boolean isTreeAutoCleanupEnabled()
          Tells whether nodes can currently be automatically removed from the tree.
 StationChildHandle newHandle(Dockable dockable)
          Creates a new handle but does not take any other action.
 void removeHandle(StationChildHandle handle, DockHierarchyLock.Token token)
          Removes an element from the station.
 void repositioned(SplitNode node)
          Invoked whenever a node changes its shape.
 long uniqueID()
          Creates a unique id for a SplitNode.
 double validateDivider(double divider, Node node)
          Tests whether the given value of the divider is a legal value or not.
 PutInfo validatePutInfo(PutInfo info)
          Checks whether info is valid or not.
 

Method Detail

getOwner

SplitDockStation getOwner()
Gets the station to which this object grants access.

Returns:
the owner

getTitleVersion

DockTitleVersion getTitleVersion()
Gets the kind of title owner uses.

Returns:
the kind of title, can be null

getFullScreenDockable

StationChildHandle getFullScreenDockable()
Gets the DockableDisplayer which is currently in fullscreen-mode.

Returns:
the displayer, may be null

validateDivider

double validateDivider(double divider,
                       Node node)
Tests whether the given value of the divider is a legal value or not.

Parameters:
divider - The value of the divider
node - the node for which the divider is validated
Returns:
a legal value, as near as possible to divider.

newHandle

StationChildHandle newHandle(Dockable dockable)
Creates a new handle but does not take any other action.

Parameters:
dockable - the target for the new handle
Returns:
the new handle

addHandle

void addHandle(StationChildHandle handle,
               DockHierarchyLock.Token token)
Adds the new handle to the station and adds the displayer to the station. Binds the dockable.

Parameters:
handle - the new handle
token - if null, then a token will be acquired by this method and this method will fire events, otherwise this methods is executed silently

removeHandle

void removeHandle(StationChildHandle handle,
                  DockHierarchyLock.Token token)
Removes an element from the station.

Parameters:
handle - the element to remove
token - if null, then a token will be acquired by this method and this method will fire events, otherwise this methods is executed silently

drop

boolean drop(Dockable dockable,
             SplitDockProperty property,
             SplitNode root)
Tries to add Dockable such that the boundaries given by property are full filled.

Parameters:
dockable - a new child of this station
property - the preferred location of the child
root - the root of all possible parents where the child could be inserted
Returns:
true if the child could be added, false if no location could be found

repositioned

void repositioned(SplitNode node)
Invoked whenever a node changes its shape. Leads to a call to DockStationListener.dockablesRepositioned(bibliothek.gui.DockStation, Dockable[]) for all Dockables that are in node or children of node.

Parameters:
node - the source of the event

validatePutInfo

PutInfo validatePutInfo(PutInfo info)
Checks whether info is valid or not.

Parameters:
info - the preferred drop location
Returns:
info if it is valid, null otherwise

uniqueID

long uniqueID()
Creates a unique id for a SplitNode.

Returns:
the new unique id

isTreeAutoCleanupEnabled

boolean isTreeAutoCleanupEnabled()
Tells whether nodes can currently be automatically removed from the tree.

Returns:
true if auto-removal is enabled

getPlaceholderSet

SplitPlaceholderSet getPlaceholderSet()
Gets the set which keeps track of all placeholders and makes sure that no placeholder is used twice.

Returns:
the placeholder set