bibliothek.gui.dock.facile.station.split
Class LockedResizeLayoutManager.ResizeElement

java.lang.Object
  extended by bibliothek.gui.dock.facile.station.split.LockedResizeLayoutManager.ResizeElement
Direct Known Subclasses:
LockedResizeLayoutManager.ResizeLeaf, LockedResizeLayoutManager.ResizeNode, LockedResizeLayoutManager.ResizeRoot
Enclosing class:
LockedResizeLayoutManager<T>

protected abstract class LockedResizeLayoutManager.ResizeElement
extends Object

Represents one node of the tree which represents the split-tree of a SplitDockStation.

Author:
Benjamin Sigg

Constructor Summary
LockedResizeLayoutManager.ResizeElement(LockedResizeLayoutManager.ResizeElement parent)
          Creates a new element.
 
Method Summary
abstract  void adapt(double deltaWidth, double deltaHeight)
          Adapts the size of the children of this element given the size change the parent could provide.
protected abstract  LockedResizeLayoutManager.ResizeRequest createRequest()
          Creates the initial request of changed sizes.
protected abstract  LockedResizeLayoutManager.ResizeElement[] getChildren()
          Gets the children of this element.
 LockedResizeLayoutManager.ResizeElement getParent()
          Gets the parent of this node
 LockedResizeLayoutManager.ResizeRequest getRequest()
          Gets the initial request for the size change.
 LockedResizeLayoutManager.ResizeRoot getResizeRoot()
          Gets the root of this tree.
 void prepareRequests()
          Calls createRequest() on this and recursively on all children.
 void prepareResize()
          Called before the bounds of a tree are updated, can be used to store some properties that are later needed to create the LockedResizeLayoutManager.ResizeRequest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockedResizeLayoutManager.ResizeElement

public LockedResizeLayoutManager.ResizeElement(LockedResizeLayoutManager.ResizeElement parent)
Creates a new element.

Parameters:
parent - the parent of this
Method Detail

getParent

public LockedResizeLayoutManager.ResizeElement getParent()
Gets the parent of this node

Returns:
the parent or null if this is a root

createRequest

protected abstract LockedResizeLayoutManager.ResizeRequest createRequest()
Creates the initial request of changed sizes.

Returns:
the initial request or null

getRequest

public LockedResizeLayoutManager.ResizeRequest getRequest()
Gets the initial request for the size change.

Returns:
the initial request or null

getChildren

protected abstract LockedResizeLayoutManager.ResizeElement[] getChildren()
Gets the children of this element.

Returns:
the children or null

prepareResize

public void prepareResize()
Called before the bounds of a tree are updated, can be used to store some properties that are later needed to create the LockedResizeLayoutManager.ResizeRequest.


prepareRequests

public void prepareRequests()
Calls createRequest() on this and recursively on all children. Stores the result for later analysis.


adapt

public abstract void adapt(double deltaWidth,
                           double deltaHeight)
Adapts the size of the children of this element given the size change the parent could provide.

Parameters:
deltaWidth - the change of this elements width
deltaHeight - the change of this elements height

getResizeRoot

public LockedResizeLayoutManager.ResizeRoot getResizeRoot()
Gets the root of this tree.

Returns:
the root