public interface IPortDefaults
IGraph
to declare and obtain the defaults for ports at nodes and edges.
Note that changing these defaults does not change properties of already created model items. Rather, only items created after the change are affected.
Modifier and Type | Method and Description |
---|---|
IPortLocationModelParameter |
getLocationParameter()
Gets the location model parameter to use for ports.
|
IPortLocationModelParameter |
getLocationParameterInstance(IPortOwner owner)
Factory method that returns a location model parameter instance for use with newly created ports.
|
IPortStyle |
getStyle()
Gets the style to use for ports.
|
IPortStyle |
getStyleInstance(IPortOwner owner)
Factory method that returns a style instance for use with newly created ports.
|
boolean |
isAutoCleanupEnabled()
Determines whether unused ports should automatically be removed from their owners as soon as no further edge is
connected to them.
|
boolean |
isLocationParameterInstanceSharingEnabled()
Gets a value indicating whether the
LocationParameter instance should be shared
referentially or cloned upon a call to
getLocationParameterInstance(IPortOwner) . |
boolean |
isStyleInstanceSharingEnabled()
Gets a value indicating whether the
Style instance should be shared referentially or cloned
upon a call to getStyleInstance(IPortOwner) . |
void |
setAutoCleanupEnabled(boolean value)
Determines whether unused ports should automatically be removed from their owners as soon as no further edge is
connected to them.
|
void |
setLocationParameter(IPortLocationModelParameter value)
Sets the location model parameter to use for ports.
|
void |
setLocationParameterInstanceSharingEnabled(boolean value)
Sets a value indicating whether the
LocationParameter instance should be shared
referentially or cloned upon a call to
getLocationParameterInstance(IPortOwner) . |
void |
setStyle(IPortStyle value)
Sets the style to use for ports.
|
void |
setStyleInstanceSharingEnabled(boolean value)
Sets a value indicating whether the
Style instance should be shared referentially or cloned
upon a call to getStyleInstance(IPortOwner) . |
IPortLocationModelParameter getLocationParameter()
Depending on the setting of
LocationParameterInstanceSharingEnabled
, the getLocationParameterInstance(IPortOwner)
method should return a clone
of this instance or the very same
instance.
isLocationParameterInstanceSharingEnabled()
,
getLocationParameterInstance(IPortOwner)
,
setLocationParameter(IPortLocationModelParameter)
IPortLocationModelParameter getLocationParameterInstance(IPortOwner owner)
Most implementations will yield either, a clone
of or the LocationParameter
property, if LocationParameterInstanceSharingEnabled
is enabled,
but they might use more complicated logic, too.
owner
- The owner of the port that will be created.clone
of or the LocationParameter
property, if LocationParameterInstanceSharingEnabled
is enabled.IPortStyle getStyle()
Depending on the setting of StyleInstanceSharingEnabled
, the getStyleInstance(IPortOwner)
method should return a clone
of this instance or the very same
instance.
isStyleInstanceSharingEnabled()
,
setStyle(IPortStyle)
IPortStyle getStyleInstance(IPortOwner owner)
Most implementations will yield either, a clone
of or the Style
property, if StyleInstanceSharingEnabled
is enabled, but they might use more
complicated logic, too.
owner
- The owner of the port that will be created.clone
of
or the Style
property, if StyleInstanceSharingEnabled
is
enabled.boolean isAutoCleanupEnabled()
IGraph.remove(com.yworks.yfiles.graph.IModelItem)
,
setAutoCleanupEnabled(boolean)
boolean isLocationParameterInstanceSharingEnabled()
LocationParameter
instance should be shared
referentially or cloned
upon a call to
getLocationParameterInstance(IPortOwner)
.true
if the reference should be shared; false
otherwise.getLocationParameterInstance(IPortOwner)
,
getLocationParameter()
,
setLocationParameterInstanceSharingEnabled(boolean)
boolean isStyleInstanceSharingEnabled()
Style
instance should be shared referentially or cloned
upon a call to getStyleInstance(IPortOwner)
.true
if the reference should be shared; false
otherwise.getStyleInstance(IPortOwner)
,
getStyle()
,
setStyleInstanceSharingEnabled(boolean)
void setAutoCleanupEnabled(boolean value)
value
- The AutoCleanupEnabled to set.IGraph.remove(com.yworks.yfiles.graph.IModelItem)
,
isAutoCleanupEnabled()
void setLocationParameter(IPortLocationModelParameter value)
Depending on the setting of
LocationParameterInstanceSharingEnabled
, the getLocationParameterInstance(IPortOwner)
method should return a clone
of this instance or the very same
instance.
value
- The parameter to use as a template.isLocationParameterInstanceSharingEnabled()
,
getLocationParameterInstance(IPortOwner)
,
getLocationParameter()
void setLocationParameterInstanceSharingEnabled(boolean value)
LocationParameter
instance should be shared
referentially or cloned
upon a call to
getLocationParameterInstance(IPortOwner)
.value
- true
if the reference should be shared; false
otherwise.getLocationParameterInstance(IPortOwner)
,
getLocationParameter()
,
isLocationParameterInstanceSharingEnabled()
void setStyle(IPortStyle value)
Depending on the setting of StyleInstanceSharingEnabled
, the getStyleInstance(IPortOwner)
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(IPortOwner)
.value
- true
if the reference should be shared; false
otherwise.getStyleInstance(IPortOwner)
,
getStyle()
,
isStyleInstanceSharingEnabled()