public class PortDefaults extends Object implements IPortDefaults
IPortDefaults
interface.Constructor and Description |
---|
PortDefaults()
Initializes a new instance of the
PortDefaults class using a trivial location model parameter. |
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()
Factory method that returns a style instance for use with newly created 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
IPortDefaults.getLocationParameterInstance(IPortOwner) . |
boolean |
isStyleInstanceSharingEnabled()
Gets a value indicating whether the
Style instance should be shared referentially or cloned
upon a call to IPortDefaults.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
IPortDefaults.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 IPortDefaults.getStyleInstance(IPortOwner) . |
public PortDefaults()
PortDefaults
class using a trivial location model parameter.public final IPortLocationModelParameter getLocationParameter()
IPortDefaults
Depending on the setting of
LocationParameterInstanceSharingEnabled
, the IPortDefaults.getLocationParameterInstance(IPortOwner)
method should return a clone
of this instance or the very same
instance.
getLocationParameter
in interface IPortDefaults
IPortDefaults.isLocationParameterInstanceSharingEnabled()
,
IPortDefaults.getLocationParameterInstance(IPortOwner)
,
IPortDefaults.setLocationParameter(IPortLocationModelParameter)
public IPortLocationModelParameter getLocationParameterInstance(IPortOwner owner)
IPortDefaults
Most implementations will yield either, a clone
of or the LocationParameter
property, if LocationParameterInstanceSharingEnabled
is enabled,
but they might use more complicated logic, too.
getLocationParameterInstance
in interface IPortDefaults
owner
- The owner of the port that will be created.clone
of or the LocationParameter
property, if LocationParameterInstanceSharingEnabled
is enabled.public final IPortStyle getStyle()
IPortDefaults
Depending on the setting of StyleInstanceSharingEnabled
, the IPortDefaults.getStyleInstance(IPortOwner)
method should return a clone
of this instance or the very same
instance.
getStyle
in interface IPortDefaults
IPortDefaults.isStyleInstanceSharingEnabled()
,
IPortDefaults.setStyle(IPortStyle)
public IPortStyle 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.public IPortStyle getStyleInstance(IPortOwner owner)
IPortDefaults
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 IPortDefaults
owner
- The owner of the port that will be created.clone
of
or the Style
property, if StyleInstanceSharingEnabled
is
enabled.public final boolean isAutoCleanupEnabled()
IPortDefaults
isAutoCleanupEnabled
in interface IPortDefaults
IGraph.remove(com.yworks.yfiles.graph.IModelItem)
,
IPortDefaults.setAutoCleanupEnabled(boolean)
public final boolean isLocationParameterInstanceSharingEnabled()
IPortDefaults
LocationParameter
instance should be shared
referentially or cloned
upon a call to
IPortDefaults.getLocationParameterInstance(IPortOwner)
.isLocationParameterInstanceSharingEnabled
in interface IPortDefaults
true
if the reference should be shared; false
otherwise.IPortDefaults.getLocationParameterInstance(IPortOwner)
,
IPortDefaults.getLocationParameter()
,
IPortDefaults.setLocationParameterInstanceSharingEnabled(boolean)
public final boolean isStyleInstanceSharingEnabled()
IPortDefaults
Style
instance should be shared referentially or cloned
upon a call to IPortDefaults.getStyleInstance(IPortOwner)
.isStyleInstanceSharingEnabled
in interface IPortDefaults
true
if the reference should be shared; false
otherwise.IPortDefaults.getStyleInstance(IPortOwner)
,
IPortDefaults.getStyle()
,
IPortDefaults.setStyleInstanceSharingEnabled(boolean)
public final void setAutoCleanupEnabled(boolean value)
IPortDefaults
setAutoCleanupEnabled
in interface IPortDefaults
value
- The AutoCleanupEnabled to set.IGraph.remove(com.yworks.yfiles.graph.IModelItem)
,
IPortDefaults.isAutoCleanupEnabled()
public final void setLocationParameter(IPortLocationModelParameter value)
IPortDefaults
Depending on the setting of
LocationParameterInstanceSharingEnabled
, the IPortDefaults.getLocationParameterInstance(IPortOwner)
method should return a clone
of this instance or the very same
instance.
setLocationParameter
in interface IPortDefaults
value
- The parameter to use as a template.IPortDefaults.isLocationParameterInstanceSharingEnabled()
,
IPortDefaults.getLocationParameterInstance(IPortOwner)
,
IPortDefaults.getLocationParameter()
public final void setLocationParameterInstanceSharingEnabled(boolean value)
IPortDefaults
LocationParameter
instance should be shared
referentially or cloned
upon a call to
IPortDefaults.getLocationParameterInstance(IPortOwner)
.setLocationParameterInstanceSharingEnabled
in interface IPortDefaults
value
- true
if the reference should be shared; false
otherwise.IPortDefaults.getLocationParameterInstance(IPortOwner)
,
IPortDefaults.getLocationParameter()
,
IPortDefaults.isLocationParameterInstanceSharingEnabled()
public final void setStyle(IPortStyle value)
IPortDefaults
Depending on the setting of StyleInstanceSharingEnabled
, the IPortDefaults.getStyleInstance(IPortOwner)
method should return a clone
of this instance or the very same
instance.
setStyle
in interface IPortDefaults
value
- The style to use as a template.IPortDefaults.isStyleInstanceSharingEnabled()
,
IPortDefaults.getStyle()
public final void setStyleInstanceSharingEnabled(boolean value)
IPortDefaults
Style
instance should be shared referentially or cloned
upon a call to IPortDefaults.getStyleInstance(IPortOwner)
.setStyleInstanceSharingEnabled
in interface IPortDefaults
value
- true
if the reference should be shared; false
otherwise.IPortDefaults.getStyleInstance(IPortOwner)
,
IPortDefaults.getStyle()
,
IPortDefaults.isStyleInstanceSharingEnabled()