public class CombinatoryAcceptance extends AbstractAcceptance
| Modifier and Type | Class and Description |
|---|---|
static class |
CombinatoryAcceptance.Combination |
| Constructor and Description |
|---|
CombinatoryAcceptance(CombinatoryAcceptance.Combination combination,
DockAcceptance first,
DockAcceptance second)
Constructor, sets up all fields of this acceptance
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DockStation parent,
Dockable child)
Tells whether or not
child is allowed to become a
real child of parent. |
boolean |
accept(DockStation parent,
Dockable child,
Dockable next)
Tells whether
child, which may be already a child of
parent, and next are allowed to be combined. |
protected boolean |
compare(boolean first,
boolean second)
Makes a logical operation with
first and
second according to the operation specified
as combination. |
CombinatoryAcceptance.Combination |
getCombination()
Gets how the combination is calculated
|
DockAcceptance |
getFirst()
Gets the "left" operand of the combination
|
DockAcceptance |
getSecond()
Gets the "right" operand of the combination
|
void |
setCombination(CombinatoryAcceptance.Combination combination)
Sets, how the two acceptances of this
CombinatoryAcceptance
have to be combined |
void |
setFirst(DockAcceptance first)
Sets the "left" operand of the combination
|
void |
setSecond(DockAcceptance second)
Sets the "right" operand of the combination
|
andAccept, equalAccept, impliedAccept, impliesAccept, orAccept, xorAcceptpublic CombinatoryAcceptance(CombinatoryAcceptance.Combination combination, DockAcceptance first, DockAcceptance second)
combination - How the two Acceptances first and
second will be combined.first - The acceptance at the "left" side of the operationsecond - The acceptance at the "right" side of the operationpublic boolean accept(DockStation parent, Dockable child)
DockAcceptancechild is allowed to become a
real child of parent.accept in interface DockAcceptanceaccept in class AbstractAcceptanceparent - the future parentchild - the future childchild and parent
are allowed to be combinedpublic boolean accept(DockStation parent, Dockable child, Dockable next)
DockAcceptancechild, which may be already a child of
parent, and next are allowed to be combined.
The result of this combination would replace child
on parent.accept in interface DockAcceptanceaccept in class AbstractAcceptanceparent - the future parent of the combinationchild - a Dockable which may be a child of parentnext - a new Dockableprotected boolean compare(boolean first,
boolean second)
first and
second according to the operation specified
as combination.first - The operand at the left sidesecond - The operand at the right sidepublic void setCombination(CombinatoryAcceptance.Combination combination)
CombinatoryAcceptance
have to be combinedcombination - How to calculate accept(DockStation, Dockable)
out of the results of first and
of secondIllegalArgumentException - if combination is nullpublic CombinatoryAcceptance.Combination getCombination()
setCombination(bibliothek.gui.dock.accept.CombinatoryAcceptance.Combination)public void setFirst(DockAcceptance first)
first - The first acceptance whose opinion for an
accept will be asked.IllegalArgumentException - if the argument is nullpublic DockAcceptance getFirst()
setFirst(DockAcceptance)public void setSecond(DockAcceptance second)
second - The second acceptance whose opinion for
accept(DockStation, Dockable) will be asked.IllegalArgumentException - if the argument is nullpublic DockAcceptance getSecond()
setSecond(DockAcceptance)Copyright © 2017 Docking Frames. All rights reserved.