public class NodeSizeConstraintProvider extends Object implements INodeSizeConstraintProvider
INodeSizeConstraintProvider
.Constructor and Description |
---|
NodeSizeConstraintProvider(ISize minimumSize,
ISize maximumSize)
Creates a new instance using the provided size instances as the initial values.
|
NodeSizeConstraintProvider(ISize minimumSize,
ISize maximumSize,
IRectangle minimumEnclosedArea)
Creates a new instance using the provided size instances as the initial values.
|
Modifier and Type | Method and Description |
---|---|
ISize |
getMaximumSize()
Gets the instance to return by
getMaximumSize(INode) . |
SizeD |
getMaximumSize(INode node)
Returns the maximum size allowed for the given
node . |
IRectangle |
getMinimumEnclosedArea()
Gets the instance to return by
getMinimumEnclosedArea(INode) . |
RectD |
getMinimumEnclosedArea(INode node)
Returns the minimum area that needs to be enclosed by the given
node . |
ISize |
getMinimumSize()
Gets the instance to return by
getMinimumSize(INode) . |
SizeD |
getMinimumSize(INode node)
Returns the minimum size allowed for the given
node . |
void |
setMaximumSize(ISize value)
Sets the instance to return by
getMaximumSize(INode) . |
void |
setMinimumEnclosedArea(IRectangle value)
Sets the instance to return by
getMinimumEnclosedArea(INode) . |
void |
setMinimumSize(ISize value)
Sets the instance to return by
getMinimumSize(INode) . |
public NodeSizeConstraintProvider(ISize minimumSize, ISize maximumSize)
Not specifing the minimumEnclosedArea will set it to RectD.EMPTY
.
minimumSize
- The MinimumSize
.maximumSize
- The MaximumSize
.public NodeSizeConstraintProvider(ISize minimumSize, ISize maximumSize, IRectangle minimumEnclosedArea)
Not specifing the minimumEnclosedArea will set it to RectD.EMPTY
.
minimumSize
- The MinimumSize
.maximumSize
- The MaximumSize
.minimumEnclosedArea
- The MinimumEnclosedArea
.public final ISize getMaximumSize()
getMaximumSize(INode)
.setMaximumSize(ISize)
public SizeD getMaximumSize(INode node)
INodeSizeConstraintProvider
node
.getMaximumSize
in interface INodeSizeConstraintProvider
node
- The node to return the maximum size for.SizeD.INFINITE
if there is no constraint on the size.public final IRectangle getMinimumEnclosedArea()
getMinimumEnclosedArea(INode)
.setMinimumEnclosedArea(IRectangle)
public RectD getMinimumEnclosedArea(INode node)
INodeSizeConstraintProvider
node
.getMinimumEnclosedArea
in interface INodeSizeConstraintProvider
node
- The node to return the area for.RectD.EMPTY
if there is no constraint on the size due to an enclosed area.public final ISize getMinimumSize()
getMinimumSize(INode)
.setMinimumSize(ISize)
public SizeD getMinimumSize(INode node)
INodeSizeConstraintProvider
node
.getMinimumSize
in interface INodeSizeConstraintProvider
node
- The node to return the minimum size for.SizeD.EMPTY
if there is no constraint on the size.public final void setMaximumSize(ISize value)
getMaximumSize(INode)
.value
- The MaximumSize to set.getMaximumSize()
public final void setMinimumEnclosedArea(IRectangle value)
getMinimumEnclosedArea(INode)
.value
- The MinimumEnclosedArea to set.getMinimumEnclosedArea()
public final void setMinimumSize(ISize value)
getMinimumSize(INode)
.value
- The MinimumSize to set.getMinimumSize()