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

java.lang.Object
  extended by bibliothek.gui.dock.facile.station.split.LockedResizeLayoutManager.ResizeElement
      extended by bibliothek.gui.dock.facile.station.split.LockedResizeLayoutManager.ResizeNode
Enclosing class:
LockedResizeLayoutManager<T>

protected class LockedResizeLayoutManager.ResizeNode
extends LockedResizeLayoutManager.ResizeElement

Represents a Node.

Author:
Benjamin Sigg

Constructor Summary
LockedResizeLayoutManager.ResizeNode(LockedResizeLayoutManager.ResizeElement parent, Node node)
          Creates a new node-element.
 
Method Summary
 void adapt(double deltaWidth, double deltaHeight)
          Adapts the size of the children of this element given the size change the parent could provide.
protected  LockedResizeLayoutManager.ResizeRequest createRequest()
          Creates the initial request of changed sizes.
protected  LockedResizeLayoutManager.ResizeElement[] getChildren()
          Gets the children of this element.
protected  double getDividerHeight()
          Gets the space that a divider needs in the height.
protected  double getDividerWidth()
          Gets the space that a divider needs in the width.
 LockedResizeLayoutManager.ResizeElement getLeft()
          Gets the left or top child of this node
 Node getNode()
          Gets the node that is represented by this element
 LockedResizeLayoutManager.ResizeElement getRight()
          Gets the right or bottom child of this node
 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 bibliothek.gui.dock.facile.station.split.LockedResizeLayoutManager.ResizeElement
getParent, getRequest, getResizeRoot, prepareRequests
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockedResizeLayoutManager.ResizeNode

public LockedResizeLayoutManager.ResizeNode(LockedResizeLayoutManager.ResizeElement parent,
                                            Node node)
Creates a new node-element.

Parameters:
parent - the parent of this node
node - the node that is represented by this node-element
Method Detail

getNode

public Node getNode()
Gets the node that is represented by this element

Returns:
the node

getLeft

public LockedResizeLayoutManager.ResizeElement getLeft()
Gets the left or top child of this node

Returns:
the left or top child

getRight

public LockedResizeLayoutManager.ResizeElement getRight()
Gets the right or bottom child of this node

Returns:
the left or bottom child

getChildren

protected LockedResizeLayoutManager.ResizeElement[] getChildren()
Description copied from class: LockedResizeLayoutManager.ResizeElement
Gets the children of this element.

Specified by:
getChildren in class LockedResizeLayoutManager.ResizeElement
Returns:
the children or null

prepareResize

public void prepareResize()
Description copied from class: LockedResizeLayoutManager.ResizeElement
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.

Overrides:
prepareResize in class LockedResizeLayoutManager.ResizeElement

getDividerWidth

protected double getDividerWidth()
Gets the space that a divider needs in the width.

Returns:
the width of a divider

getDividerHeight

protected double getDividerHeight()
Gets the space that a divider needs in the height.

Returns:
the height of a divider

createRequest

protected LockedResizeLayoutManager.ResizeRequest createRequest()
Description copied from class: LockedResizeLayoutManager.ResizeElement
Creates the initial request of changed sizes.

Specified by:
createRequest in class LockedResizeLayoutManager.ResizeElement
Returns:
the initial request or null

adapt

public void adapt(double deltaWidth,
                  double deltaHeight)
Description copied from class: LockedResizeLayoutManager.ResizeElement
Adapts the size of the children of this element given the size change the parent could provide.

Specified by:
adapt in class LockedResizeLayoutManager.ResizeElement
Parameters:
deltaWidth - the change of this elements width
deltaHeight - the change of this elements height