com.mindfusion.diagramming
Class AnchorPattern

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

public class AnchorPattern
extends java.lang.Object
implements java.lang.Cloneable, java.io.Externalizable

Represents a set of AnchorPoint objects, which can be assigned to a node via the DiagramNode.setAnchorPattern(com.mindfusion.diagramming.AnchorPattern) method.

See Also:
Serialized Form

Constructor Summary
AnchorPattern(AnchorPoint[] points, java.lang.String id)
          Creates an AnchorPattern for the specified points with the specified identifier.
AnchorPattern(AnchorPointList points, java.lang.String id)
          Creates an AnchorPattern for the specified points with the specified identifier.
AnchorPattern(java.lang.String id)
          Creates a new empty AnchorPattern with the specified identifier.
 
Method Summary
 java.lang.Object clone()
          Creates a clone of the anchor pattern.
static AnchorPattern fromId(java.lang.String id)
          Returns the AnchorPattern object that has the specified identifier.
 java.lang.String getId()
          Gets the identifier of this AnchorPattern.
 AnchorPointList getPoints()
          Gets a list of the points in this AnchorPattern.
 void readExternal(java.io.ObjectInput in)
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnchorPattern

public AnchorPattern(java.lang.String id)
Creates a new empty AnchorPattern with the specified identifier.

Parameters:
id - A string used to identify this AnchorPattern.

AnchorPattern

public AnchorPattern(AnchorPoint[] points,
                     java.lang.String id)
Creates an AnchorPattern for the specified points with the specified identifier.

Parameters:
points - An array of AnchorPoint objects representing the anchor points.
id - A string used to identify this AnchorPattern.

AnchorPattern

public AnchorPattern(AnchorPointList points,
                     java.lang.String id)
Creates an AnchorPattern for the specified points with the specified identifier.

Parameters:
points - An AnchorPointList containing the anchor points.
id - A string used to identify this AnchorPattern.
Method Detail

clone

public java.lang.Object clone()
Creates a clone of the anchor pattern.

Overrides:
clone in class java.lang.Object
Returns:
An AnchorPattern instance.

getPoints

public AnchorPointList getPoints()
Gets a list of the points in this AnchorPattern.

Returns:
An AnchorPointList instance.

fromId

public static AnchorPattern fromId(java.lang.String id)
Returns the AnchorPattern object that has the specified identifier.

Parameters:
id - An identifier of the looked-for AnchorPattern.
Returns:
An AnchorPattern identified by the specified string.

getId

public java.lang.String getId()
Gets the identifier of this AnchorPattern.

Returns:
A String identifier.

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
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
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException