|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.facile.station.split.DefaultConflictResolver<RequestDimension> bibliothek.gui.dock.common.layout.FullLockConflictResolver
public class FullLockConflictResolver
This ConflictResolver
has a alternative strategy how to handle cases
where two requests collide and a satisfying solution is not possible: the
two affected trees are checked for their "fully locked state" and if one
is fully locked but not the other, then the request of the fully locked one
is answered. Fully locked means that each child of some node has a request.
Constructor Summary | |
---|---|
FullLockConflictResolver()
|
Method Summary | |
---|---|
protected boolean |
checkHorizontalFullLock(ResizeElement<RequestDimension> element)
Checks whether element is fully locked in its horizontal dimension. |
protected boolean |
checkVerticalFullLock(ResizeElement<RequestDimension> element)
Checks whether element is fully locked in its vertical dimension. |
double |
resolveHorizontal(ResizeNode<RequestDimension> node,
ResizeRequest left,
double deltaLeft,
ResizeRequest right,
double deltaRight)
Called whenever a node has to grant two resize requests at the same time. |
double |
resolveVertical(ResizeNode<RequestDimension> node,
ResizeRequest top,
double deltaTop,
ResizeRequest bottom,
double deltaBottom)
Called whenever a node has to grant two resize requests at the same time. |
Methods inherited from class bibliothek.gui.dock.facile.station.split.DefaultConflictResolver |
---|
requestHorizontal, requestVertical |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FullLockConflictResolver()
Method Detail |
---|
public double resolveHorizontal(ResizeNode<RequestDimension> node, ResizeRequest left, double deltaLeft, ResizeRequest right, double deltaRight)
ConflictResolver
resolveHorizontal
in interface ConflictResolver<RequestDimension>
resolveHorizontal
in class DefaultConflictResolver<RequestDimension>
node
- the node at which a conflict occurredleft
- the request from the left childdeltaLeft
- how much the left child would move the dividerright
- the request from the right childdeltaRight
- how much the right child would move the divider
public double resolveVertical(ResizeNode<RequestDimension> node, ResizeRequest top, double deltaTop, ResizeRequest bottom, double deltaBottom)
ConflictResolver
resolveVertical
in interface ConflictResolver<RequestDimension>
resolveVertical
in class DefaultConflictResolver<RequestDimension>
node
- the node at which a conflict occurredtop
- the request from the top childdeltaTop
- how much the top child would move the dividerbottom
- the request from the bottom childdeltaBottom
- how much the bottom child would move the divider
protected boolean checkHorizontalFullLock(ResizeElement<RequestDimension> element)
element
is fully locked in its horizontal dimension.
Fully locked means that: element
is a node: its children have both requests
for a change in width and its children are also
fully locked
element
is a leaf: it has a resize request for the widthtrue
element
- the element to check
true
if the horizontal dimension has very high
priority for this node, false
otherwiseprotected boolean checkVerticalFullLock(ResizeElement<RequestDimension> element)
element
is fully locked in its vertical dimension.
Fully locked means that: element
is a node: its children have both requests
for a change in height and its children are also
fully locked
element
is a leaf: it has a resize request for the heighttrue
element
- the element to check
true
if the vertical dimension has very high
priority for this node, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |