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()
IEdgeDefaults
getLabelDefaults
in interface IEdgeDefaults
IEdgeDefaults.setLabelDefaults(ILabelDefaults)
public final IPortDefaults getPortDefaults()
IEdgeDefaults
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.
getPortDefaults
in interface IEdgeDefaults
IEdgeDefaults.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 IEdgeDefaults
IEdgeDefaults.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 IEdgeDefaults
clone
of
or the Style
property, if StyleInstanceSharingEnabled
is
enabled.public final boolean isStyleInstanceSharingEnabled()
IEdgeDefaults
Style
instance should be shared referentially or cloned
upon a call to IEdgeDefaults.getStyleInstance()
.isStyleInstanceSharingEnabled
in interface IEdgeDefaults
true
if the reference should be shared; false
otherwise.IEdgeDefaults.getStyleInstance()
,
IEdgeDefaults.getStyle()
,
IEdgeDefaults.setStyleInstanceSharingEnabled(boolean)
public final void setLabelDefaults(ILabelDefaults value)
IEdgeDefaults
setLabelDefaults
in interface IEdgeDefaults
value
- The label defaults.IEdgeDefaults.getLabelDefaults()
public final void setPortDefaults(IPortDefaults value)
IEdgeDefaults
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
in interface IEdgeDefaults
value
- 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 IEdgeDefaults
value
- The style to use as a template.IEdgeDefaults.isStyleInstanceSharingEnabled()
,
IEdgeDefaults.getStyle()
public final void setStyleInstanceSharingEnabled(boolean value)
IEdgeDefaults
Style
instance should be shared referentially or cloned
upon a call to IEdgeDefaults.getStyleInstance()
.setStyleInstanceSharingEnabled
in interface IEdgeDefaults
value
- true
if the reference should be shared; false
otherwise.IEdgeDefaults.getStyleInstance()
,
IEdgeDefaults.getStyle()
,
IEdgeDefaults.isStyleInstanceSharingEnabled()