public class WizardSpanStrategy extends Object
WizardSpanStrategy keeps track of the required Spans for a WizardSplitDockStation
and adds or removes Spans when necessary.| Constructor and Description |
|---|
WizardSpanStrategy(WizardSplitDockStation station) |
| Modifier and Type | Method and Description |
|---|---|
int |
getGap()
Gets the size of the currently selected
Span according to
setPut(PutInfo). |
int |
getGap(int column)
Gets the size of the gap left of
column. |
int |
getGap(int column,
int cell)
Gets the size of the gap between
cell and its predecessor. |
int |
getGap(Node node,
WizardNodeMap map)
Gets the size of the gap that is currently to be used by
node |
protected int |
getSize(Span span)
Gets the current size of
span. |
void |
reset()
Deletes and recreates all spans.
|
void |
setController(DockController controller)
Updates the current
SpanFactory if necessary. |
void |
setPut(PutInfo info)
Mutates the
Spans such that info shows up. |
void |
unsetPut()
Immediately resets all
Spans to have a size of 0. |
public WizardSpanStrategy(WizardSplitDockStation station)
public void setController(DockController controller)
SpanFactory if necessary.controller - the realm in which this strategy should workpublic void reset()
public void setPut(PutInfo info)
Spans such that info shows up.info - the current drop information or nullpublic void unsetPut()
Spans to have a size of 0.public int getGap()
Span according to
setPut(PutInfo). If there is no Span selected, then
this method returns the standard size of a gap.public int getGap(int column)
column.column - the column whose gap to its predecessor is requestedpublic int getGap(int column,
int cell)
cell and its predecessor.column - the column in which to searchcell - the cell to searchcellprotected int getSize(Span span)
span. May be overridden by subclasses to influence the
size of a span.span - the size of spanpublic int getGap(Node node, WizardNodeMap map)
nodenode - the node whose inner gap is requestedmap - detailed information about the layout of this stationCopyright © 2018. All rights reserved.