public final class AnchorPoint
extends java.lang.Object
implements java.lang.Cloneable, java.io.Externalizable
AnchorPattern class. Such a set can
be assigned to a node by calling the DiagramNode.setAnchorPattern(com.mindfusion.diagramming.AnchorPattern) method.| Constructor and Description |
|---|
AnchorPoint(float x,
float y)
Initializes a new AnchorPoint instance by setting its relative position
in nodes.
|
AnchorPoint(float x,
float y,
boolean allowIncoming,
boolean allowOutgoing)
Initializes a new AnchorPoint instance by setting its relative position
in nodes and specifying whether it will allow outgoing or incoming links.
|
AnchorPoint(float x,
float y,
boolean allowIncoming,
boolean allowOutgoing,
Color color,
short column)
Initializes a new AnchorPoint instance by setting its relative position
in nodes and specifying whether it will allow outgoing or incoming links.
|
AnchorPoint(float x,
float y,
boolean allowIncoming,
boolean allowOutgoing,
Color color,
short column,
java.lang.Object tag)
Initializes a new AnchorPoint instance by setting its relative position
in nodes and specifying whether it will allow outgoing or incoming links.
|
AnchorPoint(float x,
float y,
boolean allowIncoming,
boolean allowOutgoing,
MarkStyle markStyle)
Initializes a new AnchorPoint instance by setting its relative position
in nodes and specifying whether it will allow outgoing or incoming links.
|
AnchorPoint(float x,
float y,
boolean allowIncoming,
boolean allowOutgoing,
MarkStyle markStyle,
Color color)
Initializes a new AnchorPoint instance by setting its relative position
in nodes and specifying whether it will allow outgoing or incoming links.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a clone of the anchor point.
|
boolean |
getAllowIncoming()
Gets a value indicating whether this anchor point accepts
incoming links.
|
boolean |
getAllowOutgoing()
Gets a value indicating whether this anchor point accepts
outgoing links.
|
Color |
getColor()
Gets the color used to draw this anchor point.
|
short |
getColumn()
Gets the column to which this anchor point is related.
|
MarkStyle |
getMarkStyle()
Gets a value indicating what mark is drawn at the position of this
anchor point.
|
java.lang.Object |
getTag()
Gets a custom data object assigned to this anchor point.
|
float |
getX()
Gets the X position of the anchor point.
|
UnitType |
getXUnit()
Gets whether the point's X position is specified as percentage
of node's size or fixed offset from the node's left side.
|
float |
getY()
Gets the Y position of the anchor point.
|
UnitType |
getYUnit()
Gets whether the point's Y position is specified as percentage
of node's size or fixed offset from the node's top side.
|
void |
readExternal(java.io.ObjectInput in)
Implements Externalizable.
|
void |
setAllowIncoming(boolean value)
Sets a value indicating whether this anchor point accepts
incoming links.
|
void |
setAllowOutgoing(boolean value)
Sets a value indicating whether this anchor point accepts
outgoing links.
|
void |
setColor(Color value)
Sets the color used to draw this anchor point.
|
void |
setColumn(short value)
Sets the column to which this anchor point is related.
|
void |
setMarkStyle(MarkStyle value)
Sets a value indicating what mark is drawn at the position of this
anchor point.
|
void |
setTag(java.lang.Object tag)
Assigns a custom data object to this anchor point.
|
void |
setX(float value)
Sets the X position of the anchor point.
|
void |
setXUnit(UnitType value)
Sets whether the point's X position is specified as percentage
of node's size or fixed offset from the node's left side.
|
void |
setY(float value)
Sets the Y position of the anchor point.
|
void |
setYUnit(UnitType value)
Sets whether the point's Y position is specified as percentage
of node's size or fixed offset from the node's top side.
|
void |
writeExternal(java.io.ObjectOutput out)
Implements Externalizable.
|
public AnchorPoint(float x,
float y)
x - The horizontal position of the anchor point specified as
percents of the node width.y - The vertical position of the anchor point specified as
percents of the node height.public AnchorPoint(float x,
float y,
boolean allowIncoming,
boolean allowOutgoing)
x - The horizontal position of the anchor point specified as
percents of the node width.y - The vertical position of the anchor point specified as
percents of the node height.allowIncoming - true if this point should accept
incoming links, otherwise false.allowOutgoing - true if this point should accept
outgoing links, otherwise false.public AnchorPoint(float x,
float y,
boolean allowIncoming,
boolean allowOutgoing,
MarkStyle markStyle)
x - The horizontal position of the anchor point specified as
percents of the node width.y - The vertical position of the anchor point specified as
percents of the node height.allowIncoming - true if this point should accept
incoming links, otherwise false.allowOutgoing - true if this point should accept
outgoing links, otherwise false.markStyle - A member of the MarkStyle enumeration.public AnchorPoint(float x,
float y,
boolean allowIncoming,
boolean allowOutgoing,
MarkStyle markStyle,
Color color)
x - The horizontal position of the anchor point specified as
percents of the node width.y - The vertical position of the anchor point specified as
percents of the node height.allowIncoming - true if this point should accept
incoming links, otherwise false.allowOutgoing - true if this point should accept
outgoing links, otherwise false.markStyle - One of the MarkStyle constants.color - A Color object representing
the color of the anchor point mark.public AnchorPoint(float x,
float y,
boolean allowIncoming,
boolean allowOutgoing,
Color color,
short column)
x - The horizontal position of the anchor point specified as
percents of the node width.y - The vertical position of the anchor point specified as
percents of the node height.allowIncoming - true if this point should accept
incoming links, otherwise false.allowOutgoing - true if this point should accept
outgoing links, otherwise false.color - A Color object representing
the color of the anchor point mark.column - An index of a table column relatively to which the
anchor point x position should be calculated.public AnchorPoint(float x,
float y,
boolean allowIncoming,
boolean allowOutgoing,
Color color,
short column,
java.lang.Object tag)
x - The horizontal position of the anchor point specified as
percents of the node width.y - The vertical position of the anchor point specified as
percents of the node height.allowIncoming - true if this point should accept
incoming links, otherwise false.allowOutgoing - true if this point should accept
outgoing links, otherwise false.color - A Color object representing
the color of the anchor point mark.column - An index of a table column relatively to which the
anchor point x position should be calculated.tag - A custom data object associated with the anchor point.public java.lang.Object clone()
clone in class java.lang.ObjectAnchorPoint instance.public float getX()
public void setX(float value)
value - A float value specifying the point position as percents
of the node width.public float getY()
public void setY(float value)
value - A float value specifying the point position as percents
of the node height.public short getColumn()
public void setColumn(short value)
value - An integer value specifying the column index.public boolean getAllowIncoming()
true if incoming links can connect to this point,
or false otherwise.public void setAllowIncoming(boolean value)
true if incoming links can connect to
this point, or otherwise false.public boolean getAllowOutgoing()
true if outgoing links can connect to this point,
or false otherwise.public void setAllowOutgoing(boolean value)
true if outgoing links can connect to
this point, or otherwise false.public MarkStyle getMarkStyle()
MarkStyle enumeration.public void setMarkStyle(MarkStyle value)
value - A member of the MarkStyle enumeration.public Color getColor()
Color object representing the anchor point color.public void setColor(Color value)
value - A Color object representing the anchor point color.public java.lang.Object getTag()
Object containing custom data.public void setTag(java.lang.Object tag)
DiagramListener.serializeTag(com.mindfusion.diagramming.SerializeTagEvent) event.tag - An Object containing custom data.public UnitType getXUnit()
UnitType enumeration.public void setXUnit(UnitType value)
value - A member of the UnitType enumeration.public UnitType getYUnit()
UnitType enumeration.public void setYUnit(UnitType value)
value - A member of the UnitType enumeration.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundException