public class DiagramLinkBuilder
extends java.lang.Object
Constructor and Description |
---|
DiagramLinkBuilder()
Initializes a new instance of the DiagramLinkBuilder class.
|
DiagramLinkBuilder(DiagramLink instance)
Initializes a new instance of the DiagramLinkBuilder class.
|
Modifier and Type | Method and Description |
---|---|
DiagramLinkBuilder |
allowMoveEnd(boolean value)
Sets a value indicating whether users are allowed
to move the last control point of a link.
|
DiagramLinkBuilder |
allowMoveStart(boolean value)
Sets a value indicating whether users are allowed
to move the first control point of a link.
|
DiagramLinkBuilder |
autoRoute(boolean value)
Sets a value indicating whether a link should automatically find
its way between nodes so that it will not cross other nodes.
|
DiagramLinkBuilder |
autoSnapToNode(boolean value)
Sets a value indicating whether the end points of a link should be
automatically aligned to node borders while a user modifies the link.
|
DiagramLinkBuilder |
baseBrush(Brush value)
Sets a brush used to fill the arrowhead drawn at the link base.
|
DiagramLinkBuilder |
baseBrush(java.awt.Color color) |
DiagramLinkBuilder |
baseBrush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
DiagramLinkBuilder |
baseShape(Shape value)
Sets the shape that is displayed at the origin of a link.
|
DiagramLinkBuilder |
baseShapeSize(float value)
Sets the size of the shape displayed at the origin of a link.
|
DiagramLinkBuilder |
brush(Brush value)
Sets the brush used to fill the item's interior.
|
DiagramLinkBuilder |
brush(java.awt.Color color) |
DiagramLinkBuilder |
brush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
DiagramLinkBuilder |
cascadeOrientation(Orientation value)
Sets the orientation of the first segment of a cascading link.
|
DiagramLink |
create()
Creates a new object with the attributes accumulated by this builder.
|
DiagramLinkBuilder |
customDraw(CustomDraw value)
Gets the type of custom drawing performed on this link.
|
DiagramLinkBuilder |
destination(DiagramNode value)
Sets the destination node of a link.
|
DiagramLinkBuilder |
destinationAnchor(int value)
sets the anchor point to which a link is connected at its destination.
|
DiagramLinkBuilder |
destinationIndex(int value)
Sets the row of a table or the anchor point of a box
to which a link is connected.
|
DiagramLinkBuilder |
dynamic(boolean value)
Sets whether a link should automatically update the position
of its end points while a node related to the link is moved, so that
the link end segments always point to the center of the link's nodes.
|
DiagramLinkBuilder |
endPoint(java.awt.geom.Point2D.Float value)
Sets the position of the last control point of this link.
|
DiagramLinkBuilder |
font(java.awt.Font value)
Sets the font used to draw the text of an item.
|
DiagramLinkBuilder |
font(java.lang.String fontName,
float fontSize) |
DiagramLink |
get()
Returns an existing object passed for initialization to this builder.
|
DiagramLinkBuilder |
handlesStyle(HandlesStyle value)
Sets the style of the link selection handles.
|
DiagramLinkBuilder |
headBrush(Brush value)
Sets a brush used to fill the arrowhead drawn at the link's destination.
|
DiagramLinkBuilder |
headBrush(java.awt.Color color) |
DiagramLinkBuilder |
headBrush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
DiagramLinkBuilder |
headPen(Pen value)
Sets the pen used to draw the arrowhead shapes outlines.
|
DiagramLinkBuilder |
headShape(Shape value)
Sets the shape of the arrowhead.
|
DiagramLinkBuilder |
headShapeSize(float value)
Sets the size of the arrowhead shape.
|
DiagramLinkBuilder |
hyperLink(java.lang.String value)
Sets the hyperlink associated with an item.
|
DiagramLinkBuilder |
id(java.lang.Object value)
Assigns user-defined identifier to this item.
|
DiagramLinkBuilder |
ignoreLayout(boolean value)
Sets a value indicating whether an item should be ignored
by the automatic layout algorithms.
|
DiagramLinkBuilder |
intermediateBrush(Brush value)
Sets a brush used to fill the arrowheads drawn at the middle of link segments.
|
DiagramLinkBuilder |
intermediateBrush(java.awt.Color color) |
DiagramLinkBuilder |
intermediateBrush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
DiagramLinkBuilder |
intermediateShape(Shape value)
Sets the shape that is displayed at the middle of each segment of a link.
|
DiagramLinkBuilder |
intermediateShapeSize(float value)
Sets the size of the shape displayed at
the middle of each segment of a link.
|
DiagramLinkBuilder |
layerIndex(int value)
Sets the zero-based index of the layer this item is associated
with, or -1, if the item is not associated with any layer.
|
DiagramLinkBuilder |
locked(boolean value)
Sets a value indicating whether users are allowed to modify an item.
|
DiagramLinkBuilder |
origin(DiagramNode value)
Sets the origin node of a link.
|
DiagramLinkBuilder |
originAnchor(int value)
Sets the anchor point to which a link is connected at its origin.
|
DiagramLinkBuilder |
originIndex(int value)
Sets the row of a table or the anchor point of a box
to which a link is connected.
|
DiagramLinkBuilder |
pen(Pen value)
Sets the pen used to draw the item frame lines.
|
DiagramLinkBuilder |
printable(boolean value)
Sets a value indicating whether an item will be printed.
|
DiagramLinkBuilder |
retainForm(boolean value)
Sets a value indicating whether a link should preserve its original
shape while the nodes related to that link are moved around.
|
DiagramLinkBuilder |
segmentCount(int value)
Sets the number of segments of this link.
|
DiagramLinkBuilder |
selected(boolean value)
Selects or deselects an item.
|
DiagramLinkBuilder |
shadowBrush(Brush value)
Sets the color of the item's shadow.
|
DiagramLinkBuilder |
shadowBrush(java.awt.Color color) |
DiagramLinkBuilder |
shadowBrush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
DiagramLinkBuilder |
shadowOffsetX(float value)
Sets the horizontal distance between a shadow and the item that casts it.
|
DiagramLinkBuilder |
shadowOffsetY(float value)
Sets the vertical distance between a shadow and the item that casts it.
|
DiagramLinkBuilder |
shape(LinkShape value)
Sets the shape of a link.
|
DiagramLinkBuilder |
startPoint(java.awt.geom.Point2D.Float value)
Sets the position of the first control point of this link.
|
DiagramLinkBuilder |
style(DiagramItemStyle value)
Sets the style associated with the item.
|
DiagramLinkBuilder |
tag(java.lang.Object value)
Assigns user-defined data to an item.
|
DiagramLinkBuilder |
text(java.lang.String value)
Sets the text of the link's label.
|
DiagramLinkBuilder |
textBrush(Brush value)
Sets the brush used to paint texts inside the item.
|
DiagramLinkBuilder |
textBrush(java.awt.Color color) |
DiagramLinkBuilder |
textBrush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
DiagramLinkBuilder |
textPadding(Thickness value)
Sets the spacing between the item boundaries and its text.
|
DiagramLinkBuilder |
textStyle(LinkTextStyle value)
Sets the alignment of the link's label.
|
DiagramLinkBuilder |
toolTip(java.lang.String value)
Sets the tooltip text that should be displayed when the mouse
pointer rests over an item.
|
DiagramLinkBuilder |
visible(boolean value)
Specifies whether the link should be drawn on the screen.
|
DiagramLinkBuilder |
weight(float value)
Sets a weight value used in layout and path-finding algorithms.
|
DiagramLinkBuilder |
zIndex(int value)
Sets the position of an item within the diagram's Z order.
|
public DiagramLinkBuilder()
public DiagramLinkBuilder(DiagramLink instance)
public DiagramLinkBuilder zIndex(int value)
value
- An integer value specifying the position of the item
within the diagram Z order.public DiagramLinkBuilder allowMoveEnd(boolean value)
value
- true
if the last control point can be moved,
otherwise false
.public DiagramLinkBuilder allowMoveStart(boolean value)
value
- true
if the first control point can be moved,
otherwise false
.public DiagramLinkBuilder autoRoute(boolean value)
value
- true
if the link should be routed
automatically, otherwise false
.public DiagramLinkBuilder autoSnapToNode(boolean value)
value
- true
if the link ends should be aligned to
node borders, otherwise false
.public DiagramLinkBuilder baseBrush(Brush value)
value
- An instance of a Brush
-derived class. The default value is null.public DiagramLinkBuilder baseBrush(java.awt.Color color)
public DiagramLinkBuilder baseBrush(java.awt.Color color1, java.awt.Color color2, int angle)
public DiagramLinkBuilder baseShape(Shape value)
value
- One of the ArrowHeads
members.public DiagramLinkBuilder baseShapeSize(float value)
value
- A float value specifying the shape size.public DiagramLinkBuilder brush(Brush value)
value
- A Brush
-derived object representing the item's brush.public DiagramLinkBuilder brush(java.awt.Color color)
public DiagramLinkBuilder brush(java.awt.Color color1, java.awt.Color color2, int angle)
public DiagramLinkBuilder cascadeOrientation(Orientation value)
value
- One of the Orientation
constants.public DiagramLinkBuilder customDraw(CustomDraw value)
value
- A member of the CustomDraw
enumeration.public DiagramLinkBuilder destination(DiagramNode value)
value
- A DiagramNode
object representing the link destination.public DiagramLinkBuilder destinationAnchor(int value)
value
- An integer value specifying the index of the destination anchor point.public DiagramLinkBuilder destinationIndex(int value)
value
- An integer value specifying the index of the destination anchor point.public DiagramLinkBuilder dynamic(boolean value)
value
- true
if the link should update its end points
positions automatically, otherwise false
.public DiagramLinkBuilder endPoint(java.awt.geom.Point2D.Float value)
value
- A Point2D.Float instance.public DiagramLinkBuilder font(java.awt.Font value)
value
- A Font
object representing the font
used to draw this item's text.public DiagramLinkBuilder font(java.lang.String fontName, float fontSize)
public DiagramLinkBuilder handlesStyle(HandlesStyle value)
value
- A member of the HandlesStyle
enumeration.public DiagramLinkBuilder headBrush(Brush value)
value
- An instance of a Brush
-derived class. The default value is null.public DiagramLinkBuilder headBrush(java.awt.Color color)
public DiagramLinkBuilder headBrush(java.awt.Color color1, java.awt.Color color2, int angle)
public DiagramLinkBuilder headPen(Pen value)
value
- A Pen
object representing the arrowhead pen.public DiagramLinkBuilder headShape(Shape value)
value
- One of the ArrowHeads
members.public DiagramLinkBuilder headShapeSize(float value)
value
- A float value specifying the shape size.public DiagramLinkBuilder hyperLink(java.lang.String value)
value
- A String
containing the hyperlink.public DiagramLinkBuilder id(java.lang.Object value)
DiagramListener.serializeTag(com.mindfusion.diagramming.SerializeTagEvent)
event.value
- An Object
containing custom data.public DiagramLinkBuilder ignoreLayout(boolean value)
value
- true
if the item should be ignored by
automatic layout algorithms, otherwise false
.public DiagramLinkBuilder intermediateBrush(Brush value)
value
- An instance of a Brush
-derived class. The default value is null.public DiagramLinkBuilder intermediateBrush(java.awt.Color color)
public DiagramLinkBuilder intermediateBrush(java.awt.Color color1, java.awt.Color color2, int angle)
public DiagramLinkBuilder intermediateShape(Shape value)
value
- One of the ArrowHeads
constants.public DiagramLinkBuilder intermediateShapeSize(float value)
value
- A float value specifying the shape size.public DiagramLinkBuilder layerIndex(int value)
value
- An integer value specifying the layer index.public DiagramLinkBuilder locked(boolean value)
value
- true
if the item should not be modified,
otherwise false
.public DiagramLinkBuilder origin(DiagramNode value)
value
- A DiagramNode
object representing the link origin.public DiagramLinkBuilder originAnchor(int value)
value
- An integer value specifying the index of the origin anchor point.public DiagramLinkBuilder originIndex(int value)
value
- An integer value specifying the index of the origin anchor point.public DiagramLinkBuilder pen(Pen value)
value
- A Pen
object representing the item's pen.public DiagramLinkBuilder printable(boolean value)
value
- true
if the item should be drawn
when printing the diagram, otherwise false
.public DiagramLinkBuilder retainForm(boolean value)
value
- true
if the link should preserve its
shape, otherwise false
.public DiagramLinkBuilder segmentCount(int value)
value
- An integer value specifying the number of segments in the link.public DiagramLinkBuilder selected(boolean value)
value
- true
if the item should be selected,
otherwise false
.public DiagramLinkBuilder shadowBrush(Brush value)
value
- A Brush
object representing the brush of the
item's shadow.public DiagramLinkBuilder shadowBrush(java.awt.Color color)
public DiagramLinkBuilder shadowBrush(java.awt.Color color1, java.awt.Color color2, int angle)
public DiagramLinkBuilder shadowOffsetX(float value)
value
- A float value representing the horizontal offset of the
item's shadow.public DiagramLinkBuilder shadowOffsetY(float value)
value
- A float value representing the vertical offset of the
item's shadow.public DiagramLinkBuilder shape(LinkShape value)
value
- A member of the LinkShape
enumeration.public DiagramLinkBuilder startPoint(java.awt.geom.Point2D.Float value)
value
- A Point2D.Float instance.public DiagramLinkBuilder style(DiagramItemStyle value)
public DiagramLinkBuilder tag(java.lang.Object value)
DiagramListener.serializeTag(com.mindfusion.diagramming.SerializeTagEvent)
event.value
- An Object
containing custom data.public DiagramLinkBuilder text(java.lang.String value)
value
- A String
containing the label text.public DiagramLinkBuilder textBrush(Brush value)
public DiagramLinkBuilder textBrush(java.awt.Color color)
public DiagramLinkBuilder textBrush(java.awt.Color color1, java.awt.Color color2, int angle)
public DiagramLinkBuilder textPadding(Thickness value)
value
- A Thickness
instance specifying the size of the padding space left around the text.public DiagramLinkBuilder textStyle(LinkTextStyle value)
value
- A member of the LinkTextStyle
enumeration.public DiagramLinkBuilder toolTip(java.lang.String value)
value
- A String
that contains the tooltip text.public DiagramLinkBuilder visible(boolean value)
value
- true
if the link should be visible,
otherwise false
.public DiagramLinkBuilder weight(float value)
value
- A float value representing the item's weight.public DiagramLink create()
public DiagramLink get()