DroidDiagram Programmer's Guide
DiagramLink Members
Constructors Fields Methods
 


Links between nodes in DroidDiagram diagrams are represented by instances of the DiagramLink class.

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

 Public Constructors

  Name Description

DiagramLink

Overloaded.  

 Protected Fields

  Name Description

brush

  (Inherited from DiagramItem.)

cycleDetected

  (Inherited from DiagramItem.)

cycleProtect

  (Inherited from DiagramItem.)

modifyDX

  (Inherited from DiagramItem.)

modifyDY

  (Inherited from DiagramItem.)

modifyHandle

  (Inherited from DiagramItem.)

modifying

  (Inherited from DiagramItem.)

pen

  (Inherited from DiagramItem.)

ptEnd

  (Inherited from DiagramItem.)

ptMdfLast

  (Inherited from DiagramItem.)

ptOrg

  (Inherited from DiagramItem.)

ptSavedEnd

  (Inherited from DiagramItem.)

ptSavedOrg

  (Inherited from DiagramItem.)

subordinateGroup

  (Inherited from DiagramItem.)

 Public Methods

  Name Description

addLabel

Overloaded. Adds a new label to this link.

applyRoute

 

clone

Creates a copy of this link.

containsPoint

Overloaded.  

createRouteDescriptor

 

drawArrowhead

Draws an arrowhead shape.

getAllowMoveEnd

Gets a value indicating whether users are allowed to move the last control point of a link.

getAllowMoveStart

Gets a value indicating whether users are allowed to move the first control point of a link.

getAutoRoute

Gets a value indicating whether a link should automatically find its way between nodes so that it will not cross other nodes.

getAutoSnapToNode

Gets a value indicating whether a link end point should automatically snap to the nearest diagram node while the user moves the point's adjustment handle.

getBaseBrush

Gets the brush used to fill the arrowhead drawn at the link base.

getBaseShape

Gets the shape that is displayed at the origin of a link.

getBaseShapeSize

Gets the size of the shape displayed at the origin of a link.

getBounds

Gets the smallest rectangle that bounds all points of a link.

getBrush

Gets the brush used to fill the item's interior. (Inherited from DiagramItem.)

getCascadeOrientation

Gets the orientation of the first segment of a cascading link.

getControlPoints

Gets the list of control points of a link.

getCustomDraw

Gets the type of custom drawing performed on this link.

getDestination

Gets the destination node of a link.

getDestinationAnchor

Gets the index of the anchor point to which a link is connected at its destination.

getDestinationIndex

Gets the index of the row of a table or the anchor point of a box to which a link is connected.

getDynamic

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

getEditRect

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

getEffectiveBrush

Gets the effective brush of the item. (Inherited from DiagramItem.)

getEffectiveFont

Gets the currently effective font of the item. This property returns getFont if it is not null, or a font with the DiagramItemStyle.getFontFamily, DiagramItemStyle.getFontSize, and DiagramItemStyle.getFontStyle properties of the item's style. (Inherited from DiagramItem.)

getEffectiveHeadPen

Creates a Pen object representing the currently effective head pen of the link. This method returns a pen corresponding to the link's DiagramLink.getHeadPen if it is not null, or a pen with the DiagramLinkStyle.getHeadStroke and DiagramLinkStyle.getHeadStrokeThickness properties of the link's style.

getEffectivePen

Gets the effective pen of the item. (Inherited from DiagramItem.)

getEffectiveShadowBrush

Creates a Brush object representing the currently effective shadow brush of the item. This method returns a system brush corresponding to the item's getShadowBrush if the item's getShadowBrush is not null, or a system brush corresponding to the DiagramItemStyle.getShadowBrush property of the item's style. (Inherited from DiagramItem.)

getEffectiveTextBrush

Gets the effective text brush of the item. (Inherited from DiagramItem.)

getEndPoint

Gets the position of the last control point of this link.

getFont

Gets the font used to draw the text of an item. (Inherited from DiagramItem.)

getHandlesStyle

Gets the appearance of the link's selection handles.

getHeadBrush

Gets the brush used to fill the arrowhead drawn at the link's destination.

getHeadPen

Gets the pen used to draw the arrowhead shapes outlines.

getHeadShape

Gets the shape of this link's arrowhead.

getHeadShapeSize

Gets the size of the arrowhead shape.

getHyperLink

Gets the hyperlink associated with an item. (Inherited from DiagramItem.)

getId

Gets user-defined identifier associated with this item. (Inherited from DiagramItem.)

getIgnoreLayout

Gets a value indicating whether an item should be ignored by the automatic layout algorithms. (Inherited from DiagramItem.)

getIntermediateBrush

Gets the brush used to fill the arrowheads drawn at the middle of link segments.

getIntermediateShape

Gets the shape that is displayed at the middle of each segment of a link.

getIntermediateShapeSize

Gets the size of the shape displayed at the middle of each segment of a link.

getLabels

Returns the list of all labels displayed by this link.

getLayerIndex

Gets the zero-based index of the layer this item is associated with, or -1, if the item is not associated with any layer. (Inherited from DiagramItem.)

getLayoutTraits

Returns a hashtable containing properties specific to layout algorithms. (Inherited from DiagramItem.)

getLength

Gets the length of this link.

getLocked

Gets a value indicating whether users are allowed to modify an item. (Inherited from DiagramItem.)

getLongestHSegment

Returns the index of the longest non-vertical segment of the link.

getMasterGroup

Gets the hierarchical group in which this item is a subordinate. (Inherited from DiagramItem.)

getOrigin

Gets the origin node of a link.

getOriginAnchor

Gets the index of the anchor point to which a link is connected at its origin.

getOriginIndex

Gets the index of the row of a table or the anchor point of a box to which a link is connected.

getParent

Gets the diagram that contains this item. (Inherited from DiagramItem.)

getPen

Gets the pen used to draw the item frame lines. (Inherited from DiagramItem.)

getPrintable

Gets a value indicating whether an item will be printed. (Inherited from DiagramItem.)

getRetainForm

Gets a value indicating whether a link should preserve its original shape while the nodes related to that link are moved around.

getRuntimeIndex

For internal use. (Inherited from DiagramItem.)

getSegmentCount

Gets the number of segments of this link.

getSelected

Gets a value indicating whether this item is selected. (Inherited from DiagramItem.)

getShadowBrush

Gets the brush used to paint the item's shadow. (Inherited from DiagramItem.)

getShadowOffsetX

Gets the horizontal distance between a shadow and the item that casts it. (Inherited from DiagramItem.)

getShadowOffsetY

Gets the vertical distance between a shadow and the item that casts it. (Inherited from DiagramItem.)

getShape

Gets the shape of a link.

getStartPoint

Gets the position of the first control point of this link.

getStyle

Gets the style associated with the item. (Inherited from DiagramItem.)

getSubordinateGroup

Gets the group of subordinated items attached to this one. (Inherited from DiagramItem.)

getTag

Gets user-defined data assigned to an item. (Inherited from DiagramItem.)

getText

Gets the text of the link's label.

getTextBrush

Gets the brush used to paint texts inside the item. (Inherited from DiagramItem.)

getTextPadding

Gets the spacing between the item boundaries and its text. (Inherited from DiagramItem.)

getTextStyle

Gets the link's text placement and orientation.

getTextToEdit

Implements InplaceEditable.getTextToEdit. Returns the string that should be displayed initially when the link's text is edited in-place.

getToolTip

Gets the tooltip text displayed when the pointer rests over this item. (Inherited from DiagramItem.)

getVisible

Gets a value indicating whether an item is visible. (Inherited from DiagramItem.)

getWeight

Gets a weight value used in layout and path-finding algorithms. (Inherited from DiagramItem.)

getZIndex

Gets the position of an item within the diagram's Z-order. (Inherited from DiagramItem.)

hasSubordinates

Checks whether there are any nodes attached to this item. (Inherited from DiagramItem.)

hitTest

Returns the diagram item that contains the specified point. (Inherited from DiagramItem.)

hitTestHandle

DiagramItem.hitTestHandle override.

init

Returns a DiagramLinkBuilder object used to configure this DiagramLink instance.

intersects

Overloaded.  

isConnected

Gets a value indicating whether a link is connected to any nodes.

labelFromPoint

Returns the label whose layout rectangle contains the specified point.

query

Returns the items that can be reached from this item by following the path specified in the given query expression. (Inherited from DiagramItem.)

readExternal

Implements Externalizable.

reassignAnchorPoints

Chooses new anchor points for a link.

removeLabel

Removes the specified label from this link.

route

Sets the link control points so that a link goes between its related nodes without crossing other nodes.

setAllowMoveEnd

Sets a value indicating whether users are allowed to move the last control point of a link.

setAllowMoveStart

Sets a value indicating whether users are allowed to move the first control point of a link.

setAutoRoute

Sets a value indicating whether a link should automatically find its way between nodes so that it will not cross other nodes.

setAutoSnapToNode

Sets a value indicating whether a link end point should automatically snap to the nearest diagram node while the user moves the point's adjustment handle.

setBaseBrush

Sets a brush used to fill the arrowhead drawn at the link base.

setBaseShape

Sets the shape that is displayed at the origin of a link.

setBaseShape

 

setBaseShapeSize

Sets the size of the shape displayed at the origin of a link.

setBrush

Sets the brush used to fill the item's interior. (Inherited from DiagramItem.)

setCascadeOrientation

Sets the orientation of the first segment of a cascading link.

setCustomDraw

Sets the type of custom drawing performed on this link.

setDestination

Sets the destination node of a link.

setDestinationAnchor

Sets the anchor point to which a link is connected at its destination.

setDestinationIndex

Sets the row of a table or the anchor point of a node to which a link is connected.

setDynamic

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.

setEditedText

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

setEndPoint

Sets the position of the last control point of this link.

setFont

Sets the font used to draw the text of an item. (Inherited from DiagramItem.)

setHandlesStyle

Sets the appearance of the link's selection handles.

setHeadBrush

Sets a brush used to fill the arrowhead drawn at the link's destination.

setHeadPen

Sets the pen used to draw the arrowhead shapes outlines.

setHeadShape

Sets the shape of the link's arrowhead.

setHeadShape

 

setHeadShapeSize

Sets the size of the arrowhead shape.

setHyperLink

Sets the hyperlink associated with an item. (Inherited from DiagramItem.)

setId

Assigns user-defined identifier to this item. (Inherited from DiagramItem.)

setIgnoreLayout

Sets a value indicating whether an item should be ignored by the automatic layout algorithms. (Inherited from DiagramItem.)

setIntermediateBrush

Sets a brush used to fill the arrowheads drawn at the middle of link segments.

setIntermediateShape

 

setIntermediateShape

Sets the shape that is displayed at the middle of each segment of a link.

setIntermediateShapeSize

Sets the size of the shape displayed at the middle of each segment of a link.

setLayerIndex

Sets the zero-based index of the layer this item is associated with, or -1, if the item is not associated with any layer. (Inherited from DiagramItem.)

setLocked

Sets a value indicating whether users are allowed to modify an item. (Inherited from DiagramItem.)

setOrigin

Sets the origin node of a link.

setOriginAnchor

Sets the anchor point to which a link is connected at its origin.

setOriginIndex

Sets the row of a table or the anchor point of a box to which a link is connected.

setPen

Sets the pen used to draw the item frame lines. (Inherited from DiagramItem.)

setPrintable

Sets a value indicating whether an item will be printed. (Inherited from DiagramItem.)

setRetainForm

Sets a value indicating whether a link should preserve its original shape while the nodes related to that link are moved around.

setSegmentCount

Sets the number of segments of this link.

setSelected

Selects or deselects an item. (Inherited from DiagramItem.)

setShadowBrush

Sets the brush used to paint the item's shadow. (Inherited from DiagramItem.)

setShadowOffsetX

Sets the horizontal distance between a shadow and the item that casts it. (Inherited from DiagramItem.)

setShadowOffsetY

Sets the vertical distance between a shadow and the item that casts it. (Inherited from DiagramItem.)

setShape

Sets the shape of a link.

setStartPoint

Sets the position of the first control point of this link.

setStyle

Sets the style associated with the item. (Inherited from DiagramItem.)

setTag

Assigns user-defined data to an item. If the tag object is serializable, it will be automatically saved when serializing the diagram into binary format. When serializing to XML, you can save the tag by handling the DiagramListener.serializeTag event. (Inherited from DiagramItem.)

setText

Sets the text of the link's label.

setTextBrush

Sets the brush used to paint texts inside the item. (Inherited from DiagramItem.)

setTextPadding

Sets the spacing between the item boundaries and its text. (Inherited from DiagramItem.)

setTextStyle

Sets the link's text placement and orientation.

setToolTip

Sets the tooltip text that should be displayed when the pointer rests over this item. (Inherited from DiagramItem.)

setVisible

Specifies whether the link should be drawn on the screen.

setWeight

Sets a weight value used in layout and path-finding algorithms. (Inherited from DiagramItem.)

setZIndex

Sets the position of an item within the diagram's Z-order. (Inherited from DiagramItem.)

updateFromPoints

Overloaded.  

with

Returns a DiagramLinkBuilder object used to configure and create new DiagramLink instances.

writeExternal

Implements Externalizable.

zBottom

Moves an item to the bottom of the Z order. (Inherited from DiagramItem.)

zLevelDown

Moves an item down in the Z order. (Inherited from DiagramItem.)

zLevelUp

Moves an item up in the Z order. (Inherited from DiagramItem.)

zTop

Moves an item to the top of the Z order. (Inherited from DiagramItem.)

 Protected Methods

  Name Description

allowCreate

DiagramItem.allowCreate override. Invoked while the user draws this item to test whether the operation can be completed in the current context.

allowModify

DiagramItem.allowModify override. Invoked during interactive modification of items to test whether the operation can be completed in the current context.

cancelModify

DiagramItem.cancelModify override. Invoked when the interactive modification of this link has been canceled.

completeCreate

DiagramItem.completeCreate override. Invoked when the user finishes drawing this item.

completeModify

DiagramItem.completeModify override.

createProperties

DiagramItem.createProperties override.

createState

DiagramItem.createState override.

draw

Draws the link on the specified Canvas surface.

drawShadow

DiagramItem.drawShadow override. Draws the link's shadow on the specified Canvas surface.

getMeasureUnit

  (Inherited from DiagramItem.)

getRepaintRect

DiagramItem.getRepaintRect override.

getValue

Gets the effective value of the style property with the specified name. (Inherited from DiagramItem.)

loadFromXml

Loads the link content from an XML element.

onAdd

Called when an item is added to a Diagram, either by the user, programmatically or by undo / redo. (Inherited from DiagramItem.)

onChangeFont

 

onChangeTextPadding

  (Inherited from DiagramItem.)

onChildModified

Called when a group child node has been modified. Override this method if you need to know when a node from the SubordinateGroup is modified. (Inherited from DiagramItem.)

onClick

Invoked when the user clicks this item. (Inherited from DiagramItem.)

onDoubleClick

Invoked when the user double-clicks this item. (Inherited from DiagramItem.)

onLoad

DiagramItem.onLoad override.

onMeasureUnitChanged

Called when the diagram's MeasureUnit changes. (Inherited from DiagramItem.)

onModify

Called when an item is modified

onRemove

Called when an item is removed from a Diagram, either by the user, programmatically or by undo / redo. (Inherited from DiagramItem.)

onStyleChanged

Invoked when the associated style or theme have changed. (Inherited from DiagramItem.)

onStyleFontChanged

Invoked when font property values of an associated style change. (Inherited from DiagramItem.)

putSelected

  (Inherited from DiagramItem.)

repaint

Overloaded.   (Inherited from DiagramItem.)

restoreProperties

DiagramItem.restoreProperties override.

restoreState

DiagramItem.restoreState override.

saveProperties

DiagramItem.saveProperties override.

saveState

DiagramItem.saveState override.

saveToXml

Saves the link content into an XML element.

setDiagramDirty

Marks the diagram as changed. (Inherited from DiagramItem.)

shouldRender

Determines whether the item is rendered in the current context. (Inherited from DiagramItem.)

startCreate

DiagramItem.startCreate override. Invoked once when the user starts drawing a new item interactively.

startModify

DiagramItem.startModify override. Invoked when the user starts modifying this link interactively.

updateCreate

DiagramItem.updateCreate override. Invoked during interactive creation of this item.

updateModify

DiagramItem.updateModify override. Invoked during interactive modification of this item.

 See Also

DiagramLink Class
com.mindfusion.diagramming Namespace