com.mindfusion.diagramming
Class NodeConstraints

java.lang.Object
  extended by com.mindfusion.diagramming.NodeConstraints
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class NodeConstraints
extends java.lang.Object
implements java.io.Externalizable

Represents the movement and size constraints that can be applied to a node.

See Also:
Serialized Form

Constructor Summary
NodeConstraints()
          Initializes a new NodeConstraints instance.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this NodeConstraints instance.
 boolean getDisableMirroring()
          Gets a value indicating whether the user can drag a side of the node past its opposite side, so that they switch positions.
 boolean getKeepInsideParent()
          Gets a value indicating whether a node must always stay in the boundaries of its group master node.
 boolean getKeepRatio()
          Gets a value indicating whether the initial width/height ratio of a node must be preserved.
 float getMaxHeight()
          Gets the largest allowed height for the node.
 float getMaxWidth()
          Gets the largest allowed width for the node.
 float getMinHeight()
          Gets the smallest allowed height for the node.
 float getMinWidth()
          Gets the smallest allowed width for the node.
 int getMoveDirection()
          Gets a value indicating the movement direction constraint.
 void readExternal(java.io.ObjectInput in)
          Implements Externalizable.
 void setDisableMirroring(boolean value)
          Sets a value indicating whether the user can drag a side of the node past its opposite side, so that they switch positions.
 void setKeepInsideParent(boolean value)
          Sets a value indicating whether a node must always stay in the boundaries of its group master node.
 void setKeepRatio(boolean value)
          Sets a value indicating whether the initial width/height ratio of a node must be preserved.
 void setMaxHeight(float value)
          Sets the largest allowed height for the node.
 void setMaxWidth(float value)
          Sets the largest allowed width for the node.
 void setMinHeight(float value)
          Sets the smallest allowed height for the node.
 void setMinWidth(float value)
          Sets the smallest allowed width for the node.
 void setMoveDirection(int value)
          Sets a value indicating the movement direction constraint.
 void writeExternal(java.io.ObjectOutput out)
          Implements Externalizable.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeConstraints

public NodeConstraints()
Initializes a new NodeConstraints instance.

Method Detail

clone

public java.lang.Object clone()
Creates a copy of this NodeConstraints instance.

Overrides:
clone in class java.lang.Object
Returns:
the new NodeConstraints object.

getMoveDirection

public int getMoveDirection()
Gets a value indicating the movement direction constraint.

Returns:
One of the DirectionConstraint constants.

setMoveDirection

public void setMoveDirection(int value)
Sets a value indicating the movement direction constraint.

Parameters:
value - One of the DirectionConstraint constants.

getMinWidth

public float getMinWidth()
Gets the smallest allowed width for the node.

Returns:
A float value specifying the minimal node width.

setMinWidth

public void setMinWidth(float value)
Sets the smallest allowed width for the node.

Parameters:
value - A float value specifying the minimal node width.

getMinHeight

public float getMinHeight()
Gets the smallest allowed height for the node.

Returns:
A float value specifying the minimal node height.

setMinHeight

public void setMinHeight(float value)
Sets the smallest allowed height for the node.

Parameters:
value - A float value specifying the minimal node height.

getMaxWidth

public float getMaxWidth()
Gets the largest allowed width for the node.

Returns:
A float value specifying the maximal node width.

setMaxWidth

public void setMaxWidth(float value)
Sets the largest allowed width for the node.

Parameters:
value - A float value specifying the maximal node width.

getMaxHeight

public float getMaxHeight()
Gets the largest allowed height for the node.

Returns:
A float value specifying the maximal node height.

setMaxHeight

public void setMaxHeight(float value)
Sets the largest allowed height for the node.

Parameters:
value - A float value specifying the maximal node height.

getKeepInsideParent

public boolean getKeepInsideParent()
Gets a value indicating whether a node must always stay in the boundaries of its group master node.

Returns:
A value indicating whether a node should always stay in the boundaries of its group master node.

setKeepInsideParent

public void setKeepInsideParent(boolean value)
Sets a value indicating whether a node must always stay in the boundaries of its group master node.

Parameters:
value - Indicates whether a node should always stay in the boundaries of its group master node.

getKeepRatio

public boolean getKeepRatio()
Gets a value indicating whether the initial width/height ratio of a node must be preserved.

Returns:
A value indicating whether the initial width/height ratio of a node should be preserved.

setKeepRatio

public void setKeepRatio(boolean value)
Sets a value indicating whether the initial width/height ratio of a node must be preserved.

Parameters:
value - Indicates whether the initial width/height ratio of a node should be preserved.

getDisableMirroring

public boolean getDisableMirroring()
Gets a value indicating whether the user can drag a side of the node past its opposite side, so that they switch positions.

Returns:
A value indicating whether the user can drag a side of the node past its opposite side, so that they switch positions.

setDisableMirroring

public void setDisableMirroring(boolean value)
Sets a value indicating whether the user can drag a side of the node past its opposite side, so that they switch positions.

Parameters:
value - Indicates whether the user can drag a side of the node past its opposite side, so that they switch positions.

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Implements Externalizable.

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Implements Externalizable.

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException