Class ResizeNode<T>
java.lang.Object
bibliothek.gui.dock.facile.station.split.ResizeElement<T>
bibliothek.gui.dock.facile.station.split.ResizeNode<T>
Represents a
Node.- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionResizeNode(LockedResizeLayoutManager<T> layout, ResizeElement<T> parent, Node node) Creates a new node-element. -
Method Summary
Modifier and TypeMethodDescriptionvoidadapt(double deltaWidth, double deltaHeight) Adapts the size of the children of this element given the size change the parent could provide.protected ResizeRequestCreates the initial request of changed sizes.protected ResizeElement<T>[]Gets the children of this element.doubleGets the space that a divider needs in the height.doubleGets the space that a divider needs in the width.getLeft()Gets the left or top child of this nodedoubleGets the space the divider needs right now.getNode()Gets the node that is represented by this elementdoubleGets the space the divider needed before the resize.getRight()Gets the right or bottom child of this nodevoidCalled before the bounds of a tree are updated, can be used to store some properties that are later needed to create theResizeRequest.Methods inherited from class bibliothek.gui.dock.facile.station.split.ResizeElement
getLayout, getParent, getRequest, getResizeRoot, isValid, prepareRequests
-
Constructor Details
-
ResizeNode
Creates a new node-element.- Parameters:
layout- the layout that uses this nodeparent- the parent of this nodenode- the node that is represented by this node-element
-
-
Method Details
-
getNode
Gets the node that is represented by this element- Returns:
- the node
-
getLeft
Gets the left or top child of this node- Returns:
- the left or top child
-
getRight
Gets the right or bottom child of this node- Returns:
- the left or bottom child
-
getChildren
Description copied from class:ResizeElementGets the children of this element.- Specified by:
getChildrenin classResizeElement<T>- Returns:
- the children or
null
-
prepareResize
public void prepareResize()Description copied from class:ResizeElementCalled before the bounds of a tree are updated, can be used to store some properties that are later needed to create theResizeRequest.- Overrides:
prepareResizein classResizeElement<T>
-
getDividerWidth
public double getDividerWidth()Gets the space that a divider needs in the width.- Returns:
- the width of a divider
-
getDividerHeight
public double getDividerHeight()Gets the space that a divider needs in the height.- Returns:
- the height of a divider
-
getNewDividerSize
public double getNewDividerSize()Gets the space the divider needs right now.- Returns:
- the space the divider occupies now
-
getOldDividerSize
public double getOldDividerSize()Gets the space the divider needed before the resize.- Returns:
- the old size needed by the divider
-
createRequest
Description copied from class:ResizeElementCreates the initial request of changed sizes.- Specified by:
createRequestin classResizeElement<T>- Returns:
- the initial request or
null
-
adapt
public void adapt(double deltaWidth, double deltaHeight) Description copied from class:ResizeElementAdapts the size of the children of this element given the size change the parent could provide.- Specified by:
adaptin classResizeElement<T>- Parameters:
deltaWidth- the change of this elements widthdeltaHeight- the change of this elements height
-