public class EdgeDefaults extends Object implements IEdgeDefaults
IEdgeDefaults interface.| Constructor and Description |
|---|
EdgeDefaults()
Initializes a new instance of the
EdgeDefaults class with default edge style and label and port defaults. |
| 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 IEdgeDefaults.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 IEdgeDefaults.getStyleInstance(). |
public EdgeDefaults()
EdgeDefaults class with default edge style and label and port defaults.public final ILabelDefaults getLabelDefaults()
IEdgeDefaultsgetLabelDefaults in interface IEdgeDefaultsIEdgeDefaults.setLabelDefaults(ILabelDefaults)public final IPortDefaults getPortDefaults()
IEdgeDefaults
Note that these are not the SourcePorts or
TargetPorts, because conceptually they belong to the nodes
(and their
INodeDefaults), but rather for ports at edges to which other edges can connect.
getPortDefaults in interface IEdgeDefaultsIEdgeDefaults.setPortDefaults(IPortDefaults)public final IEdgeStyle getStyle()
IEdgeDefaults
Depending on the setting of StyleInstanceSharingEnabled, the IEdgeDefaults.getStyleInstance()
method should return a clone of this instance or the very same
instance.
getStyle in interface IEdgeDefaultsIEdgeDefaults.isStyleInstanceSharingEnabled(),
IEdgeDefaults.setStyle(IEdgeStyle)public IEdgeStyle getStyleInstance()
IEdgeDefaults
Most implementations will yield either, a clone of or the Style
property, if StyleInstanceSharingEnabled is enabled, but they might use more
complicated logic, too.
getStyleInstance in interface IEdgeDefaultsclone of
or the Style property, if StyleInstanceSharingEnabled is
enabled.public final boolean isStyleInstanceSharingEnabled()
IEdgeDefaultsStyle instance should be shared referentially or cloned
upon a call to IEdgeDefaults.getStyleInstance().isStyleInstanceSharingEnabled in interface IEdgeDefaultstrue if the reference should be shared; false otherwise.IEdgeDefaults.getStyleInstance(),
IEdgeDefaults.getStyle(),
IEdgeDefaults.setStyleInstanceSharingEnabled(boolean)public final void setLabelDefaults(ILabelDefaults value)
IEdgeDefaultssetLabelDefaults in interface IEdgeDefaultsvalue - The label defaults.IEdgeDefaults.getLabelDefaults()public final void setPortDefaults(IPortDefaults value)
IEdgeDefaults
Note that these are not the SourcePorts or
TargetPorts, because conceptually they belong to the nodes
(and their
INodeDefaults), but rather for ports at edges to which other edges can connect.
setPortDefaults in interface IEdgeDefaultsvalue - The port defaults.IEdgeDefaults.getPortDefaults()public final void setStyle(IEdgeStyle value)
IEdgeDefaults
Depending on the setting of StyleInstanceSharingEnabled, the IEdgeDefaults.getStyleInstance()
method should return a clone of this instance or the very same
instance.
setStyle in interface IEdgeDefaultsvalue - The style to use as a template.IEdgeDefaults.isStyleInstanceSharingEnabled(),
IEdgeDefaults.getStyle()public final void setStyleInstanceSharingEnabled(boolean value)
IEdgeDefaultsStyle instance should be shared referentially or cloned
upon a call to IEdgeDefaults.getStyleInstance().setStyleInstanceSharingEnabled in interface IEdgeDefaultsvalue - true if the reference should be shared; false otherwise.IEdgeDefaults.getStyleInstance(),
IEdgeDefaults.getStyle(),
IEdgeDefaults.isStyleInstanceSharingEnabled()