public interface IEdgeDefaults
IGraph
to declare and obtain the defaults for edges and their labels and ports.
Note that changing these defaults does not change properties of already created model items. Rather, only items created after the change are affected.
IGraph.getEdgeDefaults()
Modifier and Type | Method and Description |
---|---|
ILabelDefaults |
getLabelDefaults()
Gets the defaults for labels at edges.
|
IPortDefaults |
getPortDefaults()
Gets the defaults for ports at edges.
|
IEdgeStyle |
getStyle()
Gets the style to use for edges.
|
IEdgeStyle |
getStyleInstance()
Factory method that returns a style instance for use with newly created edges.
|
boolean |
isStyleInstanceSharingEnabled()
Gets a value indicating whether the
Style instance should be shared referentially or cloned
upon a call to getStyleInstance() . |
void |
setLabelDefaults(ILabelDefaults value)
Sets the defaults for labels at edges.
|
void |
setPortDefaults(IPortDefaults value)
Sets the defaults for ports at edges.
|
void |
setStyle(IEdgeStyle value)
Sets the style to use for edges.
|
void |
setStyleInstanceSharingEnabled(boolean value)
Sets a value indicating whether the
Style instance should be shared referentially or cloned
upon a call to getStyleInstance() . |
ILabelDefaults getLabelDefaults()
setLabelDefaults(ILabelDefaults)
IPortDefaults getPortDefaults()
Note that these are not the SourcePort
s or
TargetPort
s, because conceptually they belong to the nodes
(and their
INodeDefaults
), but rather for ports at edges to which other edges can connect.
setPortDefaults(IPortDefaults)
IEdgeStyle getStyle()
Depending on the setting of StyleInstanceSharingEnabled
, the getStyleInstance()
method should return a clone
of this instance or the very same
instance.
isStyleInstanceSharingEnabled()
,
setStyle(IEdgeStyle)
IEdgeStyle getStyleInstance()
Most implementations will yield either, a clone
of or the Style
property, if StyleInstanceSharingEnabled
is enabled, but they might use more
complicated logic, too.
clone
of
or the Style
property, if StyleInstanceSharingEnabled
is
enabled.boolean isStyleInstanceSharingEnabled()
Style
instance should be shared referentially or cloned
upon a call to getStyleInstance()
.true
if the reference should be shared; false
otherwise.getStyleInstance()
,
getStyle()
,
setStyleInstanceSharingEnabled(boolean)
void setLabelDefaults(ILabelDefaults value)
value
- The label defaults.getLabelDefaults()
void setPortDefaults(IPortDefaults value)
Note that these are not the SourcePort
s or
TargetPort
s, because conceptually they belong to the nodes
(and their
INodeDefaults
), but rather for ports at edges to which other edges can connect.
value
- The port defaults.getPortDefaults()
void setStyle(IEdgeStyle value)
Depending on the setting of StyleInstanceSharingEnabled
, the getStyleInstance()
method should return a clone
of this instance or the very same
instance.
value
- The style to use as a template.isStyleInstanceSharingEnabled()
,
getStyle()
void setStyleInstanceSharingEnabled(boolean value)
Style
instance should be shared referentially or cloned
upon a call to getStyleInstance()
.value
- true
if the reference should be shared; false
otherwise.getStyleInstance()
,
getStyle()
,
isStyleInstanceSharingEnabled()