public class ShapeNodeBuilder
extends java.lang.Object
Constructor and Description |
---|
ShapeNodeBuilder()
Initializes a new instance of the ShapeNodeBuilder class.
|
ShapeNodeBuilder(ShapeNode instance)
Initializes a new instance of the ShapeNodeBuilder class.
|
Modifier and Type | Method and Description |
---|---|
ShapeNodeBuilder |
allowFlip(boolean value)
Sets a value indicating whether the node's shape flips when an edge is dragged over its opposite edge.
|
ShapeNodeBuilder |
allowIncomingLinks(boolean value)
Sets a value indicating whether users are allowed to draw links to this node.
|
ShapeNodeBuilder |
allowOutgoingLinks(boolean value)
Sets a value indicating whether users are allowed to draw links from this node.
|
ShapeNodeBuilder |
anchorPattern(AnchorPattern value)
Sets the anchor points to which link end points are aligned when
links connect to this node.
|
ShapeNodeBuilder |
brush(Brush value)
Sets the brush used to fill the item's interior.
|
ShapeNodeBuilder |
brush(java.awt.Color color) |
ShapeNodeBuilder |
brush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
ShapeNodeBuilder |
constraints(NodeConstraints value)
Sets constraints to the node size and movement direction.
|
ShapeNode |
create()
Creates a new object with the attributes accumulated by this builder.
|
ShapeNodeBuilder |
customDraw(CustomDraw value)
Sets a value indicating what type of custom drawing to perform on a node.
|
ShapeNodeBuilder |
enabledHandles(java.util.EnumSet<NodeHandleType> value)
Sets a combination of
NodeHandleType members identifying which manipulation
handles are enabled for a node. |
ShapeNodeBuilder |
enableStyledText(boolean value)
Sets a value indicating whether the text of a node contains formatting
tags which should be processed by JDiagram.
|
ShapeNodeBuilder |
expandable(boolean value)
Sets a value indicating whether users are allowed to expand or collapse
the tree branch that starts from this node.
|
ShapeNodeBuilder |
expanded(boolean value)
Expands or collapses the tree branch that starts from a node.
|
ShapeNodeBuilder |
flipX(boolean value)
Sets a value indicating whether the node's shape is flipped horizontally.
|
ShapeNodeBuilder |
flipY(boolean value)
Sets a value indicating whether the node's shape is flipped vertically.
|
ShapeNodeBuilder |
font(java.awt.Font value)
Sets the font used to draw the text label of a node.
|
ShapeNodeBuilder |
font(java.lang.String fontName,
float fontSize) |
ShapeNode |
get()
Returns an existing object passed for initialization to this builder.
|
ShapeNodeBuilder |
handlesStyle(HandlesStyle value)
Sets the style of the box selection handles.
|
ShapeNodeBuilder |
hyperLink(java.lang.String value)
Sets the hyperlink associated with an item.
|
ShapeNodeBuilder |
id(java.lang.Object value)
Assigns user-defined identifier to this item.
|
ShapeNodeBuilder |
ignoreLayout(boolean value)
Sets a value indicating whether an item should be ignored
by the automatic layout algorithms.
|
ShapeNodeBuilder |
image(java.awt.Image value)
Sets the image that should be displayed inside the node.
|
ShapeNodeBuilder |
imageAlign(ImageAlign value)
Sets the alignment of the node's image.
|
ShapeNodeBuilder |
imageUrl(java.lang.String value)
Sets the image URL that should be displayed inside the node.
|
ShapeNodeBuilder |
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.
|
ShapeNodeBuilder |
locked(boolean value)
Sets a value indicating whether users are allowed to modify an item.
|
ShapeNodeBuilder |
obstacle(boolean value)
Sets a value indicating whether the link routing algorithm
should consider this node an obstacle.
|
ShapeNodeBuilder |
pen(Pen value)
Sets the pen used to draw the item frame lines.
|
ShapeNodeBuilder |
printable(boolean value)
Sets a value indicating whether an item will be printed.
|
ShapeNodeBuilder |
rotateImage(boolean value)
Sets a value indicating whether the image displayed inside a node
should rotate together with the node.
|
ShapeNodeBuilder |
rotateText(boolean value)
Sets a value indicating whether the text displayed inside a node
should rotate together with the node.
|
ShapeNodeBuilder |
rotationAngle(float value)
Sets the rotation angle of a node.
|
ShapeNodeBuilder |
selected(boolean value)
Selects or deselects an item.
|
ShapeNodeBuilder |
shadowBrush(Brush value)
Sets the color of the item's shadow.
|
ShapeNodeBuilder |
shadowBrush(java.awt.Color color) |
ShapeNodeBuilder |
shadowBrush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
ShapeNodeBuilder |
shadowOffsetX(float value)
Sets the horizontal distance between a shadow and the item that casts it.
|
ShapeNodeBuilder |
shadowOffsetY(float value)
Sets the vertical distance between a shadow and the item that casts it.
|
ShapeNodeBuilder |
shape(Shape value)
Sets the shape of a node to the specified
Shape instance. |
ShapeNodeBuilder |
shapeOrientation(float value)
Sets an orientation angle applied to the shape definition before
the shape points are mapped to the node's bounding rectangle.
|
ShapeNodeBuilder |
style(DiagramItemStyle value)
Sets the style associated with the item.
|
ShapeNodeBuilder |
tag(java.lang.Object value)
Assigns user-defined data to an item.
|
ShapeNodeBuilder |
text(java.lang.String value)
Sets the text label displayed inside this node.
|
ShapeNodeBuilder |
textBrush(Brush value)
Sets the brush used to paint texts inside the item.
|
ShapeNodeBuilder |
textBrush(java.awt.Color color) |
ShapeNodeBuilder |
textBrush(java.awt.Color color1,
java.awt.Color color2,
int angle) |
ShapeNodeBuilder |
textFormat(TextFormat value)
Sets a
TextFormat object specifying how to format and align the text of this node. |
ShapeNodeBuilder |
textPadding(Thickness value)
Sets the spacing between the item boundaries and its text.
|
ShapeNodeBuilder |
toolTip(java.lang.String value)
Sets the tooltip text that should be displayed when the mouse
pointer rests over an item.
|
ShapeNodeBuilder |
transparent(boolean value)
Sets a value indicating whether only the text and image of a node
should be drawn on the screen.
|
ShapeNodeBuilder |
visible(boolean value)
Sets a value indicating whether an item is visible.
|
ShapeNodeBuilder |
weight(float value)
Sets a weight value used in layout and path-finding algorithms.
|
ShapeNodeBuilder |
zIndex(int value)
Sets the position of an item within the diagram's Z order.
|
public ShapeNodeBuilder()
public ShapeNodeBuilder(ShapeNode instance)
public ShapeNodeBuilder zIndex(int value)
value
- An integer value specifying the position of the item
within the diagram Z order.public ShapeNodeBuilder allowFlip(boolean value)
value
- true to let users flip the shape, or false otherwise. The default value is false.public ShapeNodeBuilder allowIncomingLinks(boolean value)
value
- true
if incoming links can be drawn to this node,
otherwise false
.public ShapeNodeBuilder allowOutgoingLinks(boolean value)
value
- true
if outgoing links can be drawn from
this node, otherwise false
.public ShapeNodeBuilder anchorPattern(AnchorPattern value)
value
- An AnchorPattern
object that defines
the anchor points for this node.public ShapeNodeBuilder brush(Brush value)
value
- A Brush
-derived object representing the item's brush.public ShapeNodeBuilder brush(java.awt.Color color)
public ShapeNodeBuilder brush(java.awt.Color color1, java.awt.Color color2, int angle)
public ShapeNodeBuilder constraints(NodeConstraints value)
value
- A NodeConstraints
object.public ShapeNodeBuilder customDraw(CustomDraw value)
value
- A member of the CustomDraw
enumeration.public ShapeNodeBuilder enableStyledText(boolean value)
value
- true
if JDiagram should process formatting tags
when rendering the node label, otherwise false
.public ShapeNodeBuilder 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 ShapeNodeBuilder expandable(boolean value)
value
- true
if the tree branch that starts from this node
can be expanded or collapsed by users, otherwise false
.public ShapeNodeBuilder expanded(boolean value)
value
- true
if the tree branch that starts from
this node should be expanded, otherwise false
.public ShapeNodeBuilder flipX(boolean value)
value
- true if the shape is flipped horizontally, or false otherwise.public ShapeNodeBuilder flipY(boolean value)
value
- true if the shape is flipped vertically, or false otherwise.public ShapeNodeBuilder font(java.awt.Font value)
value
- A Font
object representing the label font.public ShapeNodeBuilder font(java.lang.String fontName, float fontSize)
public ShapeNodeBuilder handlesStyle(HandlesStyle value)
value
- A member of the HandlesStyle
enumeration.public ShapeNodeBuilder hyperLink(java.lang.String value)
value
- A String
containing the hyperlink.public ShapeNodeBuilder id(java.lang.Object value)
DiagramListener.serializeTag(com.mindfusion.diagramming.SerializeTagEvent)
event.value
- An Object
containing custom data.public ShapeNodeBuilder ignoreLayout(boolean value)
value
- true
if the item should be ignored by
automatic layout algorithms, otherwise false
.public ShapeNodeBuilder image(java.awt.Image value)
value
- A Image
object.public ShapeNodeBuilder imageAlign(ImageAlign value)
value
- A member of the ImageAlign
enumeration.public ShapeNodeBuilder imageUrl(java.lang.String value)
value
- A String
object.public ShapeNodeBuilder layerIndex(int value)
value
- An integer value specifying the layer index.public ShapeNodeBuilder locked(boolean value)
value
- true
if the item should not be modified,
otherwise false
.public ShapeNodeBuilder obstacle(boolean value)
value
- true
if auto-routed links should go around
this node, otherwise false
.public ShapeNodeBuilder pen(Pen value)
value
- A Pen
object representing the item's pen.public ShapeNodeBuilder printable(boolean value)
value
- true
if the item should be drawn
when printing the diagram, otherwise false
.public ShapeNodeBuilder rotateImage(boolean value)
value
- true
to rotate the node image when
the node is rotated, otherwise false
.public ShapeNodeBuilder rotateText(boolean value)
value
- true
to rotate the node text when
the node is rotated, otherwise false
.public ShapeNodeBuilder rotationAngle(float value)
value
- A float value specifying the node rotation angle.public ShapeNodeBuilder selected(boolean value)
value
- true
if the item should be selected,
otherwise false
.public ShapeNodeBuilder shadowBrush(Brush value)
value
- A Brush
object representing the brush of the item's shadow.public ShapeNodeBuilder shadowBrush(java.awt.Color color)
public ShapeNodeBuilder shadowBrush(java.awt.Color color1, java.awt.Color color2, int angle)
public ShapeNodeBuilder shadowOffsetX(float value)
value
- A float value representing the horizontal offset of the item's shadow.public ShapeNodeBuilder shadowOffsetY(float value)
value
- A float value representing the vertical offset of the item's shadow.public ShapeNodeBuilder shape(Shape value)
Shape
instance. The
initial shape of a node is the one set via the
Diagram.setDefaultShape(com.mindfusion.diagramming.Shape)
method.value
- A Shape
object representing the node's shape.public ShapeNodeBuilder shapeOrientation(float value)
value
- A float value specifying the shape definition orientation.public ShapeNodeBuilder style(DiagramItemStyle value)
public ShapeNodeBuilder tag(java.lang.Object value)
DiagramListener.serializeTag(com.mindfusion.diagramming.SerializeTagEvent)
event.value
- An Object
containing custom data.public ShapeNodeBuilder text(java.lang.String value)
value
- A String
containing the label text.public ShapeNodeBuilder textBrush(Brush value)
public ShapeNodeBuilder textBrush(java.awt.Color color)
public ShapeNodeBuilder textBrush(java.awt.Color color1, java.awt.Color color2, int angle)
public ShapeNodeBuilder textFormat(TextFormat value)
TextFormat
object specifying how to format and align the text of this node.value
- A TextFormat
object specifying the text format and alignment.public ShapeNodeBuilder textPadding(Thickness value)
value
- A Thickness
instance specifying the size of the padding space left around the text.public ShapeNodeBuilder toolTip(java.lang.String value)
value
- A String
that contains the tooltip text.public ShapeNodeBuilder transparent(boolean value)
value
- true
to display only the node text and image,
otherwise false
.public ShapeNodeBuilder visible(boolean value)
value
- true
if the item should be visible,
otherwise false
.public ShapeNodeBuilder weight(float value)
value
- A float value representing the item's weight.public ShapeNode create()
public ShapeNode get()