|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.yworks.yfiles.bpmn.view.CompositeMinimumSizeProvider
Restricts the minimum size of nodes by adding up minimum sizes from multiple
GenericNodeRealizer.GenericSizeConstraintProvider
implementations.
Minimum sizes are added up either by adding up all
height
values and calculating the maximum width
or by adding up all width
values and calculating the maximum
height
.
Constructor Summary | |
CompositeMinimumSizeProvider(boolean vertical)
Initializes a new CompositeMinimumSizeProvider instance. |
Method Summary | |
void |
addProvider(GenericNodeRealizer.GenericSizeConstraintProvider provider)
Adds a size constraint provider whose minimum size has to be included in this provider's minimum size calculation. |
protected YDimension |
getMargin(NodeRealizer context)
Returns a horizontal and vertical margin that is added to the width and height of the minimum size calculated by this size constraint provider. |
YDimension |
getMaximumSize(NodeRealizer context)
|
YDimension |
getMinimumSize(NodeRealizer context)
Calculates a minimum size for the specified node by adding up minimum sizes of all previously registered size constraint providers. |
double |
getOffset()
Returns the offset that is added in-between two consecutive minimum sizes. |
boolean |
isVertical()
Determines if minimum sizes are added up by width of by height. |
void |
removeProvider(GenericNodeRealizer.GenericSizeConstraintProvider provider)
Removes a size constraint provider that has previously been added. |
void |
setOffset(double offset)
Specifies the offset that is added in-between two consecutive minimum sizes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CompositeMinimumSizeProvider(boolean vertical)
CompositeMinimumSizeProvider
instance.
vertical
- if true
, minimum sizes are added up by height;
otherwise minimum sizes are added up by width.isVertical()
Method Detail |
public boolean isVertical()
height
values
and the maximum of all width
values.
If sizes are added up by width, the minimum size reported by this
size constraint provider is the sum of all width
values
and the maximum of all height
values.
true
if minimum sizes are added up by height;
false
if minimum sizes are added up by width.public double getOffset()
By default, the offset is 0
.
setOffset(double)
public void setOffset(double offset)
By default, the offset is 0
.
offset
- the offset that is added in-between two consecutive minimum
sizes.getOffset()
public void addProvider(GenericNodeRealizer.GenericSizeConstraintProvider provider)
provider
- the size constraint provider to include.addProvider(y.view.GenericNodeRealizer.GenericSizeConstraintProvider)
,
getMinimumSize(y.view.NodeRealizer)
public void removeProvider(GenericNodeRealizer.GenericSizeConstraintProvider provider)
provider
- the size constraint provider to remove.addProvider(y.view.GenericNodeRealizer.GenericSizeConstraintProvider)
,
getMinimumSize(y.view.NodeRealizer)
public YDimension getMaximumSize(NodeRealizer context)
getMaximumSize
in interface GenericNodeRealizer.GenericSizeConstraintProvider
public YDimension getMinimumSize(NodeRealizer context)
height
values and calculating the maximum width
or by adding up all width
values and calculating the maximum
height
.
getMinimumSize
in interface GenericNodeRealizer.GenericSizeConstraintProvider
context
- the visualization of the node whose minimum size has to be
determined.
addProvider(y.view.GenericNodeRealizer.GenericSizeConstraintProvider)
protected YDimension getMargin(NodeRealizer context)
getMinimumSize(y.view.NodeRealizer)
.
context
- the visualization of the node whose minimum size has to be
determined.
getMinimumSize(y.view.NodeRealizer)
,
addProvider(y.view.GenericNodeRealizer.GenericSizeConstraintProvider)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |