public abstract class ResizeElement<T>
extends java.lang.Object
SplitDockStation
.Constructor and Description |
---|
ResizeElement(ResizeElement<T> parent,
LockedResizeLayoutManager<T> layout)
Creates a new element.
|
Modifier and Type | Method and Description |
---|---|
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 ResizeRequest |
createRequest()
Creates the initial request of changed sizes.
|
protected abstract ResizeElement<T>[] |
getChildren()
Gets the children of this element.
|
LockedResizeLayoutManager<T> |
getLayout()
Gets the layout that created this element.
|
ResizeElement<T> |
getParent()
Gets the parent of this node
|
ResizeRequest |
getRequest()
Gets the initial request for the size change.
|
ResizeRoot<T> |
getResizeRoot()
Gets the root of this tree.
|
boolean |
isValid()
Checks whether this
ResizeElement is valid. |
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
ResizeRequest . |
public ResizeElement(ResizeElement<T> parent, LockedResizeLayoutManager<T> layout)
parent
- the parent of this
layout
- the origin of this elementpublic ResizeElement<T> getParent()
null
if this is a rootpublic LockedResizeLayoutManager<T> getLayout()
protected abstract ResizeRequest createRequest()
null
public ResizeRequest getRequest()
null
protected abstract ResizeElement<T>[] getChildren()
null
public void prepareResize()
ResizeRequest
.public void prepareRequests()
createRequest()
on this
and recursively
on all children. Stores the result for later analysis.public boolean isValid()
true
if this element can actually be usedpublic abstract void adapt(double deltaWidth, double deltaHeight)
deltaWidth
- the change of this elements widthdeltaHeight
- the change of this elements heightpublic ResizeRoot<T> getResizeRoot()