public class ControlNodeBuilder
extends java.lang.Object
Constructor and Description |
---|
ControlNodeBuilder()
Initializes a new instance of the ControlNodeBuilder class.
|
ControlNodeBuilder(ControlNode instance)
Initializes a new instance of the ControlNodeBuilder class.
|
Modifier and Type | Method and Description |
---|---|
ControlNodeBuilder |
allowIncomingLinks(boolean value)
Sets a value indicating whether users are allowed to draw links to this node.
|
ControlNodeBuilder |
allowOutgoingLinks(boolean value)
Sets a value indicating whether users are allowed to draw links from this node.
|
ControlNodeBuilder |
anchorPattern(AnchorPattern value)
Sets the anchor points to which link end points are aligned when
links connect to this node.
|
ControlNodeBuilder |
brush(Brush value)
Sets the brush used to fill the item's interior.
|
ControlNodeBuilder |
brush(java.awt.Color color) |
ControlNodeBuilder |
brush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
ControlNodeBuilder |
constraints(NodeConstraints value)
Sets constraints to the node size and movement direction.
|
ControlNodeBuilder |
control(java.awt.Component value)
Sets the Component that should be hosted inside this node.
|
ControlNode |
create()
Creates a new object with the attributes accumulated by this builder.
|
ControlNodeBuilder |
enabledHandles(java.util.EnumSet<NodeHandleType> value)
Sets a combination of
NodeHandleType members identifying which manipulation
handles are enabled for a node. |
ControlNodeBuilder |
expandable(boolean value)
Sets a value indicating whether users are allowed to expand or collapse
the tree branch that starts from this node.
|
ControlNodeBuilder |
expanded(boolean value)
Expands or collapses the tree branch that starts from a node.
|
ControlNodeBuilder |
font(java.awt.Font value)
Sets the font used to draw the text of an item.
|
ControlNodeBuilder |
font(java.lang.String fontName,
float fontSize) |
ControlNode |
get()
Returns an existing object passed for initialization to this builder.
|
ControlNodeBuilder |
handlesStyle(HandlesStyle value)
Sets the style of the box selection handles.
|
ControlNodeBuilder |
hyperLink(java.lang.String value)
Sets the hyperlink associated with an item.
|
ControlNodeBuilder |
id(java.lang.Object value)
Assigns user-defined identifier to this item.
|
ControlNodeBuilder |
ignoreLayout(boolean value)
Sets a value indicating whether an item should be ignored
by the automatic layout algorithms.
|
ControlNodeBuilder |
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.
|
ControlNodeBuilder |
locked(boolean value)
Sets a value indicating whether users are allowed to modify an item.
|
ControlNodeBuilder |
mouseInputMode(MouseInputMode value)
Sets whether mouse input is processed by the diagram or the hosted control.
|
ControlNodeBuilder |
obstacle(boolean value)
Sets a value indicating whether the link routing algorithm
should consider this node an obstacle.
|
ControlNodeBuilder |
pen(Pen value)
Sets the pen used to draw the item frame lines.
|
ControlNodeBuilder |
printable(boolean value)
Sets a value indicating whether an item will be printed.
|
ControlNodeBuilder |
rotationAngle(float value)
Sets the rotation angle of a node.
|
ControlNodeBuilder |
selected(boolean value)
Selects or deselects an item.
|
ControlNodeBuilder |
shadowBrush(Brush value)
Sets the color of the item's shadow.
|
ControlNodeBuilder |
shadowBrush(java.awt.Color color) |
ControlNodeBuilder |
shadowBrush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
ControlNodeBuilder |
shadowOffsetX(float value)
Sets the horizontal distance between a shadow and the item that casts it.
|
ControlNodeBuilder |
shadowOffsetY(float value)
Sets the vertical distance between a shadow and the item that casts it.
|
ControlNodeBuilder |
style(DiagramItemStyle value)
Sets the style associated with the item.
|
ControlNodeBuilder |
tag(java.lang.Object value)
Assigns user-defined data to an item.
|
ControlNodeBuilder |
textBrush(Brush value)
Sets the brush used to paint texts inside the item.
|
ControlNodeBuilder |
textBrush(java.awt.Color color) |
ControlNodeBuilder |
textBrush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
ControlNodeBuilder |
textPadding(Thickness value)
Sets the spacing between the item boundaries and its text.
|
ControlNodeBuilder |
toolTip(java.lang.String value)
Sets the tooltip text that should be displayed when the mouse
pointer rests over an item.
|
ControlNodeBuilder |
visible(boolean value)
Sets a value indicating whether the node is visible.
|
ControlNodeBuilder |
weight(float value)
Sets a weight value used in layout and path-finding algorithms.
|
ControlNodeBuilder |
zIndex(int value)
Sets the position of an item within the diagram's Z order.
|
public ControlNodeBuilder()
public ControlNodeBuilder(ControlNode instance)
public ControlNodeBuilder zIndex(int value)
value
- An integer value specifying the position of the item
within the diagram Z order.public ControlNodeBuilder allowIncomingLinks(boolean value)
value
- true
if incoming links can be drawn to this node,
otherwise false
.public ControlNodeBuilder allowOutgoingLinks(boolean value)
value
- true
if outgoing links can be drawn from
this node, otherwise false
.public ControlNodeBuilder anchorPattern(AnchorPattern value)
value
- An AnchorPattern
object that defines
the anchor points for this node.public ControlNodeBuilder brush(Brush value)
value
- A Brush
-derived object representing the item's brush.public ControlNodeBuilder brush(java.awt.Color color)
public ControlNodeBuilder brush(java.awt.Color color1, java.awt.Color color2, int angle)
public ControlNodeBuilder constraints(NodeConstraints value)
value
- A NodeConstraints
object.public ControlNodeBuilder control(java.awt.Component value)
value
- A Component instance.public ControlNodeBuilder enabledHandles(java.util.EnumSet<NodeHandleType> value)
NodeHandleType
members identifying which manipulation
handles are enabled for a node. This effectively controls what kind of
modifications users are allowed to perform on this node.value
- A set of NodeHandleType
members.public ControlNodeBuilder expandable(boolean value)
value
- true
if the tree branch that starts from this node
can be expanded or collapsed by users, otherwise false
.public ControlNodeBuilder expanded(boolean value)
value
- true
if the tree branch that starts from
this node should be expanded, otherwise false
.public ControlNodeBuilder font(java.awt.Font value)
value
- A Font
object representing the font
used to draw this item's text.public ControlNodeBuilder font(java.lang.String fontName, float fontSize)
public ControlNodeBuilder handlesStyle(HandlesStyle value)
value
- A member of the HandlesStyle
enumeration.public ControlNodeBuilder hyperLink(java.lang.String value)
value
- A String
containing the hyperlink.public ControlNodeBuilder id(java.lang.Object value)
DiagramListener.serializeTag(com.mindfusion.diagramming.SerializeTagEvent)
event.value
- An Object
containing custom data.public ControlNodeBuilder ignoreLayout(boolean value)
value
- true
if the item should be ignored by
automatic layout algorithms, otherwise false
.public ControlNodeBuilder layerIndex(int value)
value
- An integer value specifying the layer index.public ControlNodeBuilder locked(boolean value)
value
- true
if the item should not be modified,
otherwise false
.public ControlNodeBuilder mouseInputMode(MouseInputMode value)
value
- A member of the MouseInputMode
enumeration.public ControlNodeBuilder obstacle(boolean value)
value
- true
if auto-routed links should go around
this node, otherwise false
.public ControlNodeBuilder pen(Pen value)
value
- A Pen
object representing the item's pen.public ControlNodeBuilder printable(boolean value)
value
- true
if the item should be drawn
when printing the diagram, otherwise false
.public ControlNodeBuilder rotationAngle(float value)
value
- A float value specifying the node rotation angle.public ControlNodeBuilder selected(boolean value)
value
- true
if the item should be selected,
otherwise false
.public ControlNodeBuilder shadowBrush(Brush value)
value
- A Brush
object representing the brush of the
item's shadow.public ControlNodeBuilder shadowBrush(java.awt.Color color)
public ControlNodeBuilder shadowBrush(java.awt.Color color1, java.awt.Color color2, int angle)
public ControlNodeBuilder shadowOffsetX(float value)
value
- A float value representing the horizontal offset of the
item's shadow.public ControlNodeBuilder shadowOffsetY(float value)
value
- A float value representing the vertical offset of the
item's shadow.public ControlNodeBuilder style(DiagramItemStyle value)
public ControlNodeBuilder tag(java.lang.Object value)
DiagramListener.serializeTag(com.mindfusion.diagramming.SerializeTagEvent)
event.value
- An Object
containing custom data.public ControlNodeBuilder textBrush(Brush value)
public ControlNodeBuilder textBrush(java.awt.Color color)
public ControlNodeBuilder textBrush(java.awt.Color color1, java.awt.Color color2, int angle)
public ControlNodeBuilder textPadding(Thickness value)
value
- A Thickness
instance specifying the size of the padding space left around the text.public ControlNodeBuilder toolTip(java.lang.String value)
value
- A String
that contains the tooltip text.public ControlNodeBuilder visible(boolean value)
value
- true
if the node should be visible,
otherwise false
.public ControlNodeBuilder weight(float value)
value
- A float value representing the item's weight.public ControlNode create()
public ControlNode get()