Class ResizeElement<T>
java.lang.Object
bibliothek.gui.dock.facile.station.split.ResizeElement<T>
- Direct Known Subclasses:
ResizeLeaf,ResizeNode,ResizeRoot
Represents one node of the tree which represents the split-tree of
a
SplitDockStation.- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionResizeElement(ResizeElement<T> parent, LockedResizeLayoutManager<T> layout) Creates a new element. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidadapt(double deltaWidth, double deltaHeight) Adapts the size of the children of this element given the size change the parent could provide.protected abstract ResizeRequestCreates the initial request of changed sizes.protected abstract ResizeElement<T>[]Gets the children of this element.Gets the layout that created this element.Gets the parent of this nodeGets the initial request for the size change.Gets the root of this tree.booleanisValid()Checks whether thisResizeElementis valid.voidCallscreateRequest()onthisand recursively on all children.voidCalled before the bounds of a tree are updated, can be used to store some properties that are later needed to create theResizeRequest.
-
Constructor Details
-
ResizeElement
Creates a new element.- Parameters:
parent- the parent ofthislayout- the origin of this element
-
-
Method Details
-
getParent
Gets the parent of this node- Returns:
- the parent or
nullif this is a root
-
getLayout
Gets the layout that created this element.- Returns:
- the origin of this element
-
createRequest
Creates the initial request of changed sizes.- Returns:
- the initial request or
null
-
getRequest
Gets the initial request for the size change.- Returns:
- the initial request or
null
-
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 theResizeRequest. -
prepareRequests
public void prepareRequests()CallscreateRequest()onthisand recursively on all children. Stores the result for later analysis. -
isValid
public boolean isValid()- Returns:
trueif this element can actually be used
-
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 widthdeltaHeight- the change of this elements height
-
getResizeRoot
Gets the root of this tree.- Returns:
- the root
-