MindFusion.Java Package Programmer's Guide
NodeLabel Members
Constructors Methods
 


Represents a label displayed by a DiagramNode. New labels can be added to a node by calling the addLabel method.

The following tables list the members exposed by the NodeLabel type.

 Public Constructors

  Name Description

NodeLabel

Overloaded. Initializes a new instance of the NodeLabel class.

 Public Methods

  Name Description

cancel

Called when drag operation is canceled. (Inherited from ItemLabel.)

clone

Creates a clone of this label.

getBrush

Gets the brush used to draw the label's background. (Inherited from ItemLabel.)

getContentPadding

Gets the distance between Image and Text when both are specified. (Inherited from ItemLabel.)

getEditRect

Implements InplaceEditable.getEditRect. Returns the rectangle where the in-place edit text box should appear (in document coordinates). (Inherited from ItemLabel.)

getEnableWrap

Gets whether the text should wrap to multiple lines. (Inherited from ItemLabel.)

getFont

Gets the font of the label's text. (Inherited from ItemLabel.)

getHorizontalAlign

Gets label's horizontal alignment relative to the pin point. (Inherited from ItemLabel.)

getHorizontalOffset

Gets label's horizontal offset from its pin point. (Inherited from ItemLabel.)

getImage

Gets the image displayed by this label. (Inherited from ItemLabel.)

getImageAlign

Gets the alignment of label's image relative to text. (Inherited from ItemLabel.)

getImageSize

Gets a size that overrides the native image size. (Inherited from ItemLabel.)

getImageUrl

Gets a URL used to load an image into this label. (Inherited from ItemLabel.)

getIndex

Gets the index of an edge or point this label is relative to. (Inherited from ItemLabel.)

getLocked

Gets a value indicating whether users are allowed to edit this label. (Inherited from ItemLabel.)

getMargin

Gets the text margins size. (Inherited from ItemLabel.)

getMaxWidth

Gets the maximal width that when reached should cause text to wrap to a new line. (Inherited from ItemLabel.)

getRelativeTo

Gets the label's relative positioning.

getText

Gets the label's text. (Inherited from ItemLabel.)

getTextColor

Gets the color of the label's text. (Inherited from ItemLabel.)

getTextToEdit

Implements InplaceEditable.getTextToEdit. Returns the text that should be displayed initially when this label is edited in-place. (Inherited from ItemLabel.)

getVerticalAlign

Gets label's vertical alignment relative to the pin point. (Inherited from ItemLabel.)

getVerticalOffset

Gets label's vertical offset from its pin point. (Inherited from ItemLabel.)

onPointerDown

Called when the left mouse button is pressed while the pointer is over this label. (Inherited from ItemLabel.)

onPointerMove

Called when the mouse is moved while this label tracks the mouse events. (Inherited from ItemLabel.)

onPointerUp

Called when the left mouse button is released while this label tracks the mouse events. (Inherited from ItemLabel.)

readExternal

Loads the label from the specified binary stream.

setBrush

Sets the brush used to draw the label's background. (Inherited from ItemLabel.)

setCenterPosition

Positions this label relatively to the node center.

setContentPadding

Sets the distance between Image and Text when both are specified. (Inherited from ItemLabel.)

setCornerPosition

Positions this label relatively to the specified corner point.

setEdgePosition

Positions this label relatively to the specified node edge.

setEditedText

Implements InplaceEditable.setEditedText. Assigns the edited text to the label after in-place edit operation completes successfully (Inherited from ItemLabel.)

setEnableWrap

Sets whether the text should wrap to multiple lines. (Inherited from ItemLabel.)

setFont

Sets the font of the label's text. (Inherited from ItemLabel.)

setHorizontalAlign

Sets label's horizontal alignment relative to the pin point. (Inherited from ItemLabel.)

setHorizontalOffset

Sets label's horizontal offset from its pin point. (Inherited from ItemLabel.)

setImage

Sets the image displayed by this label. (Inherited from ItemLabel.)

setImageAlign

Sets the alignment of label's image relative to text. (Inherited from ItemLabel.)

setImageSize

Sets a size that overrides the native image size. (Inherited from ItemLabel.)

setImageUrl

Sets a URL used to load an image into this label. (Inherited from ItemLabel.)

setIndex

Sets the index of an edge or point this label is relative to. (Inherited from ItemLabel.)

setLocked

Sets a value indicating whether users are allowed to edit this label. (Inherited from ItemLabel.)

setMargin

Sets the text margins size. (Inherited from ItemLabel.)

setMaxWidth

Sets the maximal width that when reached should cause text to wrap to a new line. (Inherited from ItemLabel.)

setMouseCursor

Indicates what cursor to display for interactive labels. (Inherited from ItemLabel.)

setRelativeTo

Sets the label's relative positioning.

setText

Sets the label's text. (Inherited from ItemLabel.)

setTextColor

Sets the color of the label's text. (Inherited from ItemLabel.)

setVerticalAlign

Sets label's vertical alignment relative to the pin point. (Inherited from ItemLabel.)

setVerticalOffset

Sets label's vertical offset from its pin point. (Inherited from ItemLabel.)

writeExternal

Saves the label into the specified binary stream.

 Protected Methods

  Name Description

draw

Draws this label on the specified Graphics2D surface. (Inherited from ItemLabel.)

getItem

Returns the DiagramItem that displays this label. (Inherited from ItemLabel.)

getLayoutRect

Gets the label's layout rectangle calculated from text length, font and alignment. (Inherited from ItemLabel.)

getNode

Returns the DiagramNode that displays this label.

loadFromJson

Loads the label from a JSON object.

loadFromXml

Loads the label from the specified XML element.

saveToJson

Saves the label as a JSON object.

saveToXml

Saves the label into the specified XML element.

 See Also

NodeLabel Class
com.mindfusion.diagramming Namespace