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


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

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

 Public Constructors

  Name Description

LinkLabel

Overloaded.  

 Public Methods

  Name Description

cancel

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

clone

Creates a clone of this label.

getAutoArrange

Gets a value indicating whether the label can be auto arranged.

getBrush

Gets the brush used to draw the label's background.

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).

getEnableWrap

Gets whether the text should wrap to multiple lines.

getFont

Gets the font of the link's label text.

getHorizontalAlign

Gets the horizontal alignment of the text within the label's layout rectangle.

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 the segment or control point this label is relative to.

getLengthFactor

Gets label's position along link's length when the RelativeTo property is set to LinkLength.

getLocked

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

getMargin

Gets the text margins size.

getMaxWidth

Gets the maximal width that when reached should cause text to wrap to a new line.

getRelativeTo

Gets the label's relative positioning.

getText

Gets the label's text.

getTextColor

Gets the color of the link's label text.

getTextToEdit

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

getVerticalAlign

Gets the vertical alignment of the text relatively to the label's position.

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.

setAutoArrange

Sets a value indicating whether the label can be auto arranged.

setBrush

Sets the brush used to draw the label's background.

setContentPadding

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

setControlPointPosition

Positions this label relatively to the specified control point.

setEditedText

Implements InplaceEditable.setEditedText. Assigns the edited text to the label after in-place edit operation completes successfully

setEnableWrap

Sets whether the text should wrap to multiple lines.

setFont

Sets the font of the link's label.

setHorizontalAlign

Sets the horizontal alignment of the text within the label's layout rectangle.

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 the segment or control point this label is relative to.

setLengthFactor

Sets label's position along link's length when the RelativeTo property is set to LinkLength.

setLinkLengthPosition

Positions this label relatively to the link length.

setLocked

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

setMargin

Sets the text margins size.

setMaxWidth

Sets the maximal width that when reached should cause text to wrap to a new line.

setMouseCursor

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

setRelativeTo

Sets the label's relative positioning.

setSegmentPosition

Positions this label relatively to the specified link segment.

setText

Sets the label's text.

setTextColor

Sets the color of the link's label.

setVerticalAlign

Sets the vertical alignment of the text relatively to the label's position.

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.

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.

getLink

Returns the DiagramLink that displays this label.

loadFromJson

Loads the label from a JSON object.

loadFromXml

Loads the label from the specified XML element.

pointAlongLength

Overloaded.  

saveToJson

Saves the label as a JSON object.

saveToXml

Saves the label into the specified XML element.

 See Also

LinkLabel Class
com.mindfusion.diagramming Namespace