public interface IDiagramLink extends IDiagramGraphic
Modifier and Type | Interface and Description |
---|---|
static class |
IDiagramLink.ExtensionRole
Link extension roles for
getExtensions(ExtensionRole) and getFirstExtension(ExtensionRole) . |
static class |
IDiagramLink.LinkRouterKind
Available connection routers.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<IDiagramNode> |
getExtensions(IDiagramLink.ExtensionRole role)
Get the link extension nodes with the given role.
|
IDiagramNode |
getFirstExtension(IDiagramLink.ExtensionRole role)
Get the first link extension node with the given role.
|
java.lang.String |
getFont()
Get the current font, represented by font data.
|
IDiagramGraphic |
getFrom() |
java.lang.String |
getLineColor()
Get the current line color.
|
int |
getLinePattern()
Get the current line pattern.
- 0 : Line drawing style for solid lines - 1 : Line drawing style for dashed lines - 2 : Line drawing style for dotted lines - 3 : Line drawing style for alternating dash-dot lines - 4 : Line drawing style for dash-dot-dot lines |
int |
getLineRadius()
Get the current line radius.
|
int |
getLineWidth()
Get the current line width.
|
ILinkPath |
getPath()
Return the path of the current link.
|
IDiagramLink.LinkRouterKind |
getRouterKind()
Get the router referenced by the link.
|
java.lang.String |
getTextColor()
Get the current text color.
|
IDiagramGraphic |
getTo() |
boolean |
isDrawLineBridges()
Check whereas bridge are drawn on vertical line segments that cross an horizontal one.
|
boolean |
isPrimarySelected()
Returns the selected state of this graphical element.
|
boolean |
isSelected()
Returns the selected state of this graphical element.
|
void |
mask()
Mask the current representation.
|
void |
setDrawLineBridges(boolean value)
Indicates whereas bridge are drawn on vertical line segments that cross an horizontal one.
|
void |
setFont(java.lang.String value)
Modify the current font.
|
void |
setFrom(IDiagramGraphic source)
Change the link's source graphic.
|
void |
setLineColor(java.lang.String value)
Modify the current line color.
|
void |
setLinePattern(int value)
Modify the current line pattern.
- 0 : Line drawing style for solid lines - 1 : Line drawing style for dashed lines - 2 : Line drawing style for dotted lines - 3 : Line drawing style for alternating dash-dot lines - 4 : Line drawing style for dash-dot-dot lines |
void |
setLineRadius(int value)
Modify the current line radius.
|
void |
setLineWidth(int value)
Modify the current line width.
|
void |
setPath(java.util.Collection<Point> points)
Route the path of a link.
|
void |
setPath(ILinkPath linkPath)
This method tries to set the current link path.
|
void |
setRouterKind(IDiagramLink.LinkRouterKind routerKind)
Modify the router referenced by the link.
|
void |
setTextColor(java.lang.String value)
Modify the current text color.
|
void |
setTo(IDiagramGraphic target)
Change the link's target graphic.
|
getElement, getFromLinks, getHyperLink, getLayer, getLocalPropertyNames, getName, getProperty, getStyle, getToLinks, moveToLayer, normalizeLocalProperties, resetLocalProperties, setHyperLink, setProperty, setStyle
java.lang.String getFont()
A valid font data representation is a string of the form
where
is the name of a font,
is a font style (one of
"regular"
, "bold"
, "italic"
, or "bold italic"
) and
is an integer representing the font height. Example: Times New Roman-bold-36
.
null
if the corresponding style key isn't defined.IDiagramGraphic getFrom()
java.lang.String getLineColor()
null
if the corresponding style key isn't defined.int getLinePattern()
int getLineRadius()
int getLineWidth()
ILinkPath getPath()
The returned path is a snapshot of the current path and may freely be modified.
To apply changes, call setPath(ILinkPath)
with the modified path as parameter.
IDiagramLink.LinkRouterKind getRouterKind()
java.lang.String getTextColor()
null
if the corresponding style key isn't defined.IDiagramGraphic getTo()
boolean isDrawLineBridges()
boolean isPrimarySelected()
IDiagramGraphic
isPrimarySelected
in interface IDiagramGraphic
true
if the graphical element is the primary selection of the diagram.boolean isSelected()
IDiagramGraphic
isSelected
in interface IDiagramGraphic
true
if the graphical element is selected in the diagram.void mask()
IDiagramGraphic
mask
in interface IDiagramGraphic
void setDrawLineBridges(boolean value)
value
- The new value of the draw line bridge property.void setFont(java.lang.String value) throws DataFormatException
This method fails if the value does not represent font data.
A valid font data representation is a string of the form
where
is the name of a font,
is a font style (one of
"regular"
, "bold"
, "italic"
, or "bold italic"
) and
is an integer representing the font height.
Example: Times New Roman-bold-36
.
value
- The new font.DataFormatException
- if the given value does not represent a font datavoid setLineColor(java.lang.String value)
value
- The new line color.void setLinePattern(int value)
value
- The new line pattern.void setLineRadius(int value)
value
- The new line radius.void setLineWidth(int value)
value
- The new line width.void setPath(java.util.Collection<Point> points)
This method computes a path so that the link goes through the whole list of points. If the router referenced by the current Link is an orthogonal router the path will have orthogonal angles. If the router referenced by the current Link is a direct router this method is equivalent to the setPath method.
points
- A collection of points that must be on the link path.void setPath(ILinkPath linkPath) throws InvalidDestinationPointException, InvalidPointsPathException, InvalidSourcePointException
linkPath
- The new path to use for this link.InvalidSourcePointException
- If the source point is invalid.InvalidPointsPathException
- If the given path is invalid with the router type associated with the current link.InvalidDestinationPointException
- If the destination point is invalid.void setRouterKind(IDiagramLink.LinkRouterKind routerKind)
routerKind
- The new router kind for this link.void setTextColor(java.lang.String value)
value
- The new text color.java.util.Collection<IDiagramNode> getExtensions(IDiagramLink.ExtensionRole role)
role
- the node role on the linkIDiagramNode getFirstExtension(IDiagramLink.ExtensionRole role)
role
- the link extension role.void setFrom(IDiagramGraphic source)
source
- the new source for the link.java.lang.IllegalArgumentException
- if the given source is invalid.void setTo(IDiagramGraphic target)
target
- the new target for the link.java.lang.IllegalArgumentException
- if the given target is invalid.