public interface IDiagramGraphic
Base interface of all graphical elements that are related to an IElement
model.
A IDiagramGraphic may be a node (IDiagramNode
) or a link (IDiagramLink
).
The element might not exist any longer (IDiagramGraphic#getElement returns null
), meaning the graphical element is a "ghost".
Therefore, the only information still available are the Name of the ghost element, and its ObRef.
Modifier and Type | Method and Description |
---|---|
IElement |
getElement()
Get the element this
IDiagramGraphic is related to. |
List<IDiagramLink> |
getFromLinks()
Return the links that are starting (ie outgoing links) from this node.
|
List<String> |
getLocalPropertyNames()
Get the list of all properties which values have been changed from their default "style" value.
|
String |
getName()
Return the name of this graphic.
|
String |
getProperty(String property)
Get a style property.
|
ObRef |
getRef()
Return the ObRef of this graphic.
|
IStyleHandle |
getStyle()
Get the graphical element style.
|
List<IDiagramLink> |
getToLinks()
Return the links that are ending (ie incoming links) at this node.
|
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 |
normalizeLocalProperties()
Normalizing an element's style consists in removing from its local definitions the values that are currently the same as the value in cascaded style.
|
void |
resetLocalProperties()
Removes all local property redefinitions.
|
void |
setProperty(String property,
String value)
Sets the local property value of this graphic element for 'property'.
|
void |
setStyle(IStyleHandle style)
Set the style used to get a property value when it is not defined locally.
|
IElement getElement()
IDiagramGraphic
is related to.
Note: May return null if the element is not resolved.
List<IDiagramLink> getFromLinks()
List<String> getLocalPropertyNames()
null
.String getName()
String getProperty(String property)
null
if the corresponding style key isn't defined.property
- The property nameObRef getRef()
IStyleHandle getStyle()
The style contains many properties such has the foreground and background color, the font and some display options. These properties are displayed and editable in the symbol view.
List<IDiagramLink> getToLinks()
boolean isPrimarySelected()
true
if the graphical element is the primary selection of the diagram.boolean isSelected()
true
if the graphical element is selected in the diagram.void mask()
void normalizeLocalProperties()
void resetLocalProperties()
void setProperty(String property, String value)
property
- The property namevalue
- The property valuevoid setStyle(IStyleHandle style)
style
- The new style.