public interface IDiagramLink extends IDiagramGraphic
Modifier and Type | Interface and Description |
---|---|
static class |
IDiagramLink.LinkRouterKind
Available connection routers.
|
Modifier and Type | Method and Description |
---|---|
IElement |
getElement()
Get the element this
IDiagramGraphic is related to. |
String |
getFont()
Get the current font, represented by font data.
|
IDiagramGraphic |
getFrom() |
String |
getLineColor()
Get the current line color.
|
int |
getLinePattern()
Get the current line pattern.
|
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.
|
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(String value)
Modify the current font.
|
void |
setLineColor(String value)
Modify the current line color.
|
void |
setLinePattern(int value)
Modify the current line pattern.
|
void |
setLineRadius(int value)
Modify the current line radius.
|
void |
setLineWidth(int value)
Modify the current line width.
|
void |
setPath(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(String value)
Modify the current text color.
|
getFromLinks, getLocalPropertyNames, getName, getProperty, getRef, getStyle, getToLinks, normalizeLocalProperties, resetLocalProperties, setProperty, setStyle
IElement getElement()
IDiagramGraphic
IDiagramGraphic
is related to.
Note: May return null if the element is not resolved.
getElement
in interface IDiagramGraphic
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()
String getLineColor()
null
if the corresponding style key isn't defined.int getLinePattern()
int getLineRadius()
int getLineWidth()
ILinkPath getPath()
IDiagramLink.LinkRouterKind getRouterKind()
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(String value) throws org.eclipse.jface.resource.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.org.eclipse.jface.resource.DataFormatException
- if the given value does not represent font datavoid setLineColor(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(Collection<Point> points)
points
- A collection of points that must be on the link path.void setPath(ILinkPath linkPath) throws InvalidSourcePointException, InvalidPointsPathException, InvalidDestinationPointException
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(String value)
value
- The new text color.