public abstract class AbstractFoldingEdgeConverter extends Object implements IFoldingEdgeConverter
IFoldingEdgeConverter
interface that may be derived from to create a
customized FoldingEdgeConverter
.
This class provides default mechanisms and callbacks that can be used to set another style for folding edges, for the
ports of folding edges, synchronizing the first label of a folding edge with the master edge, etc. Subclasses need to
implement the addFoldingEdge(IFoldingEdgeFactory, IFoldingView, IEdge, INode, boolean, INode, boolean)
method,
only.
DefaultFoldingEdgeConverter
,
FoldingManager
Constructor and Description |
---|
AbstractFoldingEdgeConverter() |
Modifier and Type | Method and Description |
---|---|
abstract IEdge |
addFoldingEdge(IFoldingEdgeFactory factory,
IFoldingView foldingView,
IEdge masterEdge,
INode source,
boolean sourceIsCollapsed,
INode target,
boolean targetIsCollapsed)
This method gets called by the
IFoldingView implementation to determine whether a given edge in the MasterGraph
should be represented by a folding edge in the given view. |
protected IEdgeStyle |
createEdgeStyle(IFoldingView foldingView,
IEdge foldingEdge,
List<IEdge> masterEdges)
Callback factory method that creates the
IEdgeStyle for use in
initializeFoldingEdgeStyle(FoldingEdgeState, IFoldingView, IEdge, List) . |
protected ILabelModelParameter |
createLabelLayoutParameter(IFoldingView foldingView,
ILabel localLabel,
ILabel masterLabel)
Callback factory method that creates the
ILabelModelParameter for use in
initializeFoldingEdgeLabels(FoldingEdgeState, IFoldingView, IEdge, List) . |
protected ILabelStyle |
createLabelStyle(IFoldingView foldingView,
ILabel localLabel,
ILabel masterLabel)
Callback factory method that creates the
ILabelStyle for use in
initializeFoldingEdgeLabels(FoldingEdgeState, IFoldingView, IEdge, List) . |
protected IPortLocationModelParameter |
createSourcePortLocationParameter(IFoldingView foldingView,
IEdge localEdge,
List<IEdge> masterEdges)
Callback factory method that creates the
IPortLocationModelParameter of the source port for use in
initializeFoldingEdgePorts(FoldingEdgeState, IFoldingView, IEdge, List) . |
protected IPortStyle |
createSourcePortStyle(IFoldingView foldingView,
IEdge localEdge,
List<IEdge> masterEdges)
Callback factory method that creates the
IPortStyle of the source port for use in
initializeFoldingEdgePorts(FoldingEdgeState, IFoldingView, IEdge, List) . |
protected IPortLocationModelParameter |
createTargetPortLocationParameter(IFoldingView foldingView,
IEdge localEdge,
List<IEdge> masterEdges)
Callback factory method that creates the
IPortLocationModelParameter of the target port for use in
initializeFoldingEdgePorts(FoldingEdgeState, IFoldingView, IEdge, List) . |
protected IPortStyle |
createTargetPortStyle(IFoldingView foldingView,
IEdge localEdge,
List<IEdge> masterEdges)
Callback factory method that creates the
IPortStyle of the target port for use in
initializeFoldingEdgePorts(FoldingEdgeState, IFoldingView, IEdge, List) . |
IEdgeStyle |
getFoldingEdgeStyle()
Gets the
IEdgeStyle to use for the folding edge. |
ILabelModelParameter |
getLabelLayoutParameter()
Gets the
ILabelModelParameter to use for the first label of the folding edge. |
ILabelStyle |
getLabelStyle()
Gets the
ILabelStyle to use for the first label of the folding edge. |
IPortLocationModelParameter |
getSourcePortLocationParameter()
Gets the
IPortLocationModelParameter to use for the source port of the folding edge. |
IPortStyle |
getSourcePortStyle()
Gets the
IPortStyle to use for the folding source port. |
IPortLocationModelParameter |
getTargetPortLocationParameter()
Gets the
IPortLocationModelParameter to use for the target port of the folding edge. |
IPortStyle |
getTargetPortStyle()
Gets the
IPortStyle to use for the folding target port. |
protected void |
initializeFoldingEdgeBends(FoldingEdgeState state,
IFoldingView foldingView,
IEdge foldingEdge,
List<IEdge> masterEdges)
Callback method that initializes the bends of the folding edge.
|
protected void |
initializeFoldingEdgeLabels(FoldingEdgeState state,
IFoldingView foldingView,
IEdge foldingEdge,
List<IEdge> masterEdges)
Callback method that initializes the initial labels of the folding edge.
|
protected void |
initializeFoldingEdgePorts(FoldingEdgeState state,
IFoldingView foldingView,
IEdge foldingEdge,
List<IEdge> masterEdges)
Callback method that initializes the ports of the folding edge.
|
void |
initializeFoldingEdgeState(FoldingEdgeState state,
IFoldingView foldingView,
IEdge foldingEdge,
List<IEdge> masterEdges)
Implements the
IFoldingEdgeConverter.initializeFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List)
method and initializes the folding edge appearance. |
protected void |
initializeFoldingEdgeStyle(FoldingEdgeState state,
IFoldingView foldingView,
IEdge foldingEdge,
List<IEdge> masterEdges)
Callback method that initializes the
style property of the folding edge. |
boolean |
isBendsResettingEnabled()
Gets a value indicating whether to reset and clear the bends of a folding edge initially.
|
boolean |
isCopyingFirstLabelEnabled()
Gets a value indicating whether the first label of the
master edge
should be recreated for the folding edge. |
boolean |
isEdgeStyleCloningEnabled()
Gets a value indicating whether the
FoldingEdgeStyle instance should be assigned as a
ICloneable.clone() clone or not. |
boolean |
isLabelLayoutParameterCloningEnabled()
Gets a value indicating whether the
LabelLayoutParameter instance should be assigned
as a ICloneable.clone() clone or not. |
boolean |
isLabelStyleCloningEnabled()
Gets a value indicating whether the
LabelStyle instance should be assigned as a
ICloneable.clone() clone or not. |
boolean |
isSourcePortLocationParameterCloningEnabled()
Gets a value indicating whether the
SourcePortLocationParameter instance
should be assigned as a ICloneable.clone() clone or not. |
boolean |
isSourcePortStyleCloningEnabled()
Gets a value indicating whether the
SourcePortStyle instance should be assigned as a clone
or not. |
boolean |
isTargetPortLocationParameterCloningEnabled()
Gets a value indicating whether the
TargetPortLocationParameter instance
should be assigned as a ICloneable.clone() clone or not. |
boolean |
isTargetPortStyleCloningEnabled()
Gets a value indicating whether the
TargetPortStyle instance should be assigned as a
ICloneable.clone() clone or not. |
void |
setBendsResettingEnabled(boolean value)
Sets a value indicating whether to reset and clear the bends of a folding edge initially.
|
void |
setCopyingFirstLabelEnabled(boolean value)
Sets a value indicating whether the first label of the
master edge
should be recreated for the folding edge. |
void |
setEdgeStyleCloningEnabled(boolean value)
Sets a value indicating whether the
FoldingEdgeStyle instance should be assigned as a
ICloneable.clone() clone or not. |
void |
setFoldingEdgeStyle(IEdgeStyle value)
Sets the
IEdgeStyle to use for the folding edge. |
void |
setLabelLayoutParameter(ILabelModelParameter value)
Sets the
ILabelModelParameter to use for the first label of the folding edge. |
void |
setLabelLayoutParameterCloningEnabled(boolean value)
Sets a value indicating whether the
LabelLayoutParameter instance should be assigned
as a ICloneable.clone() clone or not. |
void |
setLabelStyle(ILabelStyle value)
Sets the
ILabelStyle to use for the first label of the folding edge. |
void |
setLabelStyleCloningEnabled(boolean value)
Sets a value indicating whether the
LabelStyle instance should be assigned as a
ICloneable.clone() clone or not. |
void |
setSourcePortLocationParameter(IPortLocationModelParameter value)
Sets the
IPortLocationModelParameter to use for the source port of the folding edge. |
void |
setSourcePortLocationParameterCloningEnabled(boolean value)
Sets a value indicating whether the
SourcePortLocationParameter instance
should be assigned as a ICloneable.clone() clone or not. |
void |
setSourcePortStyle(IPortStyle value)
Sets the
IPortStyle to use for the folding source port. |
void |
setSourcePortStyleCloningEnabled(boolean value)
Sets a value indicating whether the
SourcePortStyle instance should be assigned as a clone
or not. |
void |
setTargetPortLocationParameter(IPortLocationModelParameter value)
Sets the
IPortLocationModelParameter to use for the target port of the folding edge. |
void |
setTargetPortLocationParameterCloningEnabled(boolean value)
Sets a value indicating whether the
TargetPortLocationParameter instance
should be assigned as a ICloneable.clone() clone or not. |
void |
setTargetPortStyle(IPortStyle value)
Sets the
IPortStyle to use for the folding target port. |
void |
setTargetPortStyleCloningEnabled(boolean value)
Sets a value indicating whether the
TargetPortStyle instance should be assigned as a
ICloneable.clone() clone or not. |
protected void |
synchronizeLabels(FoldingEdgeState state,
IFoldingView foldingView,
IEdge foldingEdge,
List<IEdge> masterEdges)
Called by
updateFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List) to synchronize the first label if
CopyingFirstLabelEnabled is enabled. |
void |
updateFoldingEdgeState(FoldingEdgeState state,
IFoldingView foldingView,
IEdge foldingEdge,
List<IEdge> masterEdges)
Implements the
IFoldingEdgeConverter.updateFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List) method
and changes the folding edge appearance. |
public abstract IEdge addFoldingEdge(IFoldingEdgeFactory factory, IFoldingView foldingView, IEdge masterEdge, INode source, boolean sourceIsCollapsed, INode target, boolean targetIsCollapsed)
IFoldingEdgeConverter
IFoldingView
implementation to determine whether a given edge in the MasterGraph
should be represented by a folding edge in the given view.
The implementation will be passed in a factory
object that implements the IFoldingEdgeFactory
interface,
which needs to be used by the implementation to communicate the result of the query. The implementation needs to either
call IFoldingEdgeFactory.addAsSeparateEdge(com.yworks.yfiles.graph.IPort, com.yworks.yfiles.graph.IPort)
,
IFoldingEdgeFactory.addToExistingFoldingEdge(IEdge)
, or IFoldingEdgeFactory.excludeFoldingEdge()
and
return the values that these implementation yields to the caller. The implementation can optionally query the existing folding edges
between the source and target node and decide whether to add the edge
to the existing folding edge
.
addFoldingEdge
in interface IFoldingEdgeConverter
factory
- The IFoldingEdgeFactory
implementation that needs to be called in order to communicate the results of this
query.foldingView
- The instance into which the folding edge is going to be inserted.masterEdge
- The edge from the MasterGraph
that needs to be
represented by a folding edge. Note that you may not return this instance.source
- The source node that belongs to the IFoldingView
graph that will act as the local view node of the actual source
node.sourceIsCollapsed
- Determines whether the source
is currently a folder node.target
- The target node that belongs to the IFoldingView
graph that will act as the local view node of the actual target
node.targetIsCollapsed
- Determines whether the target
is currently a folder node.IFoldingEdgeFactory.addAsSeparateEdge(com.yworks.yfiles.graph.IPort, com.yworks.yfiles.graph.IPort)
, or
IFoldingEdgeFactory.addToExistingFoldingEdge(IEdge)
, or null
if the edge will be excluded
from the view.protected IEdgeStyle createEdgeStyle(IFoldingView foldingView, IEdge foldingEdge, List<IEdge> masterEdges)
IEdgeStyle
for use in
initializeFoldingEdgeStyle(FoldingEdgeState, IFoldingView, IEdge, List)
.foldingView
- The folding view instance.foldingEdge
- The folding edge in the view whose Style
should be initialized.masterEdges
- The edges that are being represented by the folding edge.FoldingEdgeStyle
or a ICloneable.clone()
of it
depending on the EdgeStyleCloningEnabled
property. This method may return null
to indicate that the default style should not be changed.protected ILabelModelParameter createLabelLayoutParameter(IFoldingView foldingView, ILabel localLabel, ILabel masterLabel)
ILabelModelParameter
for use in
initializeFoldingEdgeLabels(FoldingEdgeState, IFoldingView, IEdge, List)
.foldingView
- The folding view instance.localLabel
- The local label in the view whose LayoutParameter
should be initialized. May be null
if the label layout parameter is requested for the label creation.masterLabel
- The label that is being represented by the folding label.LabelLayoutParameter
or a ICloneable.clone()
of
it depending on the LabelLayoutParameterCloningEnabled
property. This
method may return null
to indicate that the default label layout parameter should not be changed.protected ILabelStyle createLabelStyle(IFoldingView foldingView, ILabel localLabel, ILabel masterLabel)
ILabelStyle
for use in
initializeFoldingEdgeLabels(FoldingEdgeState, IFoldingView, IEdge, List)
.foldingView
- The folding view instance.localLabel
- The local label in the view whose Style
should be initialized. May be null
if the
label style is requested for the label creation.masterLabel
- The label that is being represented by the folding label.LabelStyle
or a ICloneable.clone()
of it depending on the LabelStyleCloningEnabled
property. This method may return null
to indicate that the default style should not be changed.protected IPortLocationModelParameter createSourcePortLocationParameter(IFoldingView foldingView, IEdge localEdge, List<IEdge> masterEdges)
IPortLocationModelParameter
of the source port for use in
initializeFoldingEdgePorts(FoldingEdgeState, IFoldingView, IEdge, List)
.foldingView
- The folding view instance.localEdge
- The local edge in the view whose source port's LocationParameter
should be initialized.masterEdges
- The master edges that the folding edge represents.SourcePortLocationParameter
or a ICloneable.clone()
of it depending on the SourcePortLocationParameterCloningEnabled
property. This method may return null
to indicate that the default port location parameter should not be
changed.protected IPortStyle createSourcePortStyle(IFoldingView foldingView, IEdge localEdge, List<IEdge> masterEdges)
IPortStyle
of the source port for use in
initializeFoldingEdgePorts(FoldingEdgeState, IFoldingView, IEdge, List)
.foldingView
- The folding view instance.localEdge
- The local edge in the view whose source port's Style
should be
initialized.masterEdges
- The master edges that the folding edge represents.SourcePortStyle
or a ICloneable.clone()
of it
depending on the SourcePortStyleCloningEnabled
property. This method may
return null
to indicate that the default style should not be changed.protected IPortLocationModelParameter createTargetPortLocationParameter(IFoldingView foldingView, IEdge localEdge, List<IEdge> masterEdges)
IPortLocationModelParameter
of the target port for use in
initializeFoldingEdgePorts(FoldingEdgeState, IFoldingView, IEdge, List)
.foldingView
- The folding view instance.localEdge
- The local edge in the view whose target port's LocationParameter
should be initialized.masterEdges
- The master edges that the folding edge represents.TargetPortLocationParameter
or a ICloneable.clone()
of it depending on the TargetPortLocationParameterCloningEnabled
property. This method may return null
to indicate that the default port location parameter should not be
changed.protected IPortStyle createTargetPortStyle(IFoldingView foldingView, IEdge localEdge, List<IEdge> masterEdges)
IPortStyle
of the target port for use in
initializeFoldingEdgePorts(FoldingEdgeState, IFoldingView, IEdge, List)
.foldingView
- The folding view instance.localEdge
- The local edge in the view whose target port's Style
should be
initialized.masterEdges
- The master edges that the folding edge represents.TargetPortStyle
or a ICloneable.clone()
of it
depending on the TargetPortStyleCloningEnabled
property. This method may
return null
to indicate that the default style should not be changed.public final IEdgeStyle getFoldingEdgeStyle()
IEdgeStyle
to use for the folding edge.
Depending on the EdgeStyleCloningEnabled
property this implementation will assign a
ICloneable.clone()
to the property or this instance.
A value of null
(the default) will leave the style property unmodified.
setFoldingEdgeStyle(IEdgeStyle)
public final ILabelModelParameter getLabelLayoutParameter()
ILabelModelParameter
to use for the first label of the folding edge.
This will only affect the folding edge if the CopyingFirstLabelEnabled
property is
set to true
.
A value of null
will leave the label model parameter property unmodified.
setLabelLayoutParameter(ILabelModelParameter)
public final ILabelStyle getLabelStyle()
ILabelStyle
to use for the first label of the folding edge.
This will only affect the folding edge if the CopyingFirstLabelEnabled
property is
set to true
.
A value of null
will leave the style property unmodified.
setLabelStyle(ILabelStyle)
public final IPortLocationModelParameter getSourcePortLocationParameter()
IPortLocationModelParameter
to use for the source port of the folding edge.
Since the appearance of the folding edge may totally differ from the appearance of the master edge, the location of the
source port may also be different. This property can be used to assign a different specific location parameter to the
source port if the edge is in folding state
. A
value of null
will leave the location parameter property unmodified. The default is null
createSourcePortLocationParameter(IFoldingView, IEdge, List)
,
setSourcePortLocationParameter(IPortLocationModelParameter)
public final IPortStyle getSourcePortStyle()
IPortStyle
to use for the folding source port.
A value of null
will leave the style property unmodified.
setSourcePortStyle(IPortStyle)
public final IPortLocationModelParameter getTargetPortLocationParameter()
IPortLocationModelParameter
to use for the target port of the folding edge.
Since the appearance of the folding edge may totally differ from the appearance of the master edge, the location of the
target port may also be different. This property can be used to assign a different specific location parameter to the
target port if the edge is in folding state
. A
value of null
will leave the location parameter property unmodified. The default is null
createTargetPortLocationParameter(IFoldingView, IEdge, List)
,
setTargetPortLocationParameter(IPortLocationModelParameter)
public final IPortStyle getTargetPortStyle()
IPortStyle
to use for the folding target port.
A value of null
will leave the style property unmodified.
setTargetPortStyle(IPortStyle)
protected void initializeFoldingEdgeBends(FoldingEdgeState state, IFoldingView foldingView, IEdge foldingEdge, List<IEdge> masterEdges)
This will call the FoldingEdgeState.clearBends()
callback if BendsResettingEnabled
is enabled.
state
- The viewstate to change.foldingView
- The folding view instance that has triggered the initializeFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List)
call.foldingEdge
- The folding edge in the view that may be changed using the state
.masterEdges
- The master edges that the folding edge represents.protected void initializeFoldingEdgeLabels(FoldingEdgeState state, IFoldingView foldingView, IEdge foldingEdge, List<IEdge> masterEdges)
This will first clear all the labels
and then try
to copy the first label of the single master edge if CopyingFirstLabelEnabled
is
enabled. It will call createLabelStyle(IFoldingView, ILabel, ILabel)
and createLabelLayoutParameter(IFoldingView, ILabel, ILabel)
and use the returned style and layout parameter if they are non-null
when adding the label
on the folding edge.
state
- The viewstate to change.foldingView
- The folding view instance that has triggered the initializeFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List)
call.foldingEdge
- The folding edge in the view that may be changed using the state
.masterEdges
- The master edges that the folding edge represents.getLabelStyle()
,
getLabelLayoutParameter()
protected void initializeFoldingEdgePorts(FoldingEdgeState state, IFoldingView foldingView, IEdge foldingEdge, List<IEdge> masterEdges)
If the source port of the foldingEdge
is in folding state
, this implementation
calls createSourcePortStyle(IFoldingView, IEdge, List)
and createSourcePortLocationParameter(IFoldingView, IEdge, List)
and assigns the style
and location parameter
to the folding source port if non-null
values have been returned. The same holds true for the target port where
the createTargetPortStyle(IFoldingView, IEdge, List)
and createTargetPortLocationParameter(IFoldingView, IEdge, List)
callbacks are used.
state
- The viewState to change.foldingView
- The folding view instance that has triggered the initializeFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List)
call.foldingEdge
- The folding edge in the view that may be changed using the state
.masterEdges
- The master edges that the folding edge represents.getSourcePortStyle()
,
getTargetPortStyle()
,
getSourcePortLocationParameter()
,
getTargetPortLocationParameter()
,
createSourcePortStyle(IFoldingView, IEdge, List)
,
createTargetPortStyle(IFoldingView, IEdge, List)
,
createSourcePortLocationParameter(IFoldingView, IEdge, List)
,
createTargetPortLocationParameter(IFoldingView, IEdge, List)
public void initializeFoldingEdgeState(FoldingEdgeState state, IFoldingView foldingView, IEdge foldingEdge, List<IEdge> masterEdges)
IFoldingEdgeConverter.initializeFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List)
method and initializes the folding edge appearance.
This method calls initializeFoldingEdgeStyle(FoldingEdgeState, IFoldingView, IEdge, List)
,
initializeFoldingEdgePorts(FoldingEdgeState, IFoldingView, IEdge, List)
,
initializeFoldingEdgeBends(FoldingEdgeState, IFoldingView, IEdge, List)
,
initializeFoldingEdgeLabels(FoldingEdgeState, IFoldingView, IEdge, List)
.
initializeFoldingEdgeState
in interface IFoldingEdgeConverter
state
- The FoldingEdgeState
of the edge to change.foldingView
- The graph to which the folding edge belongs.foldingEdge
- The folding edge for which the appearance shall be determined.masterEdges
- The list of master edges
, that the folding edge initially represents.IFoldingEdgeConverter.updateFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List)
protected void initializeFoldingEdgeStyle(FoldingEdgeState state, IFoldingView foldingView, IEdge foldingEdge, List<IEdge> masterEdges)
style property
of the folding edge.
This implementation calls createEdgeStyle(IFoldingView, IEdge, List)
and assigns
the style to the folding edge if a non-null
value has been returned.
state
- The viewstate to change.foldingView
- The folding view instance that has triggered the initializeFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List)
call.foldingEdge
- The folding edge in the view that may be changed using the state
.masterEdges
- The master edges that the folding edge represents.public final boolean isBendsResettingEnabled()
true
if the folding edge should initially not contain any bends; false
otherwise, which is the default.setBendsResettingEnabled(boolean)
public final boolean isCopyingFirstLabelEnabled()
master edge
should be recreated for the folding edge.
This setting can be used to initially create a copy of the first label of the master edge (if any) and subsequently
synchronize the Text
property with the master's edge label text.
true
if the first label should be copied; false
otherwise.getLabelStyle()
,
getLabelLayoutParameter()
,
setCopyingFirstLabelEnabled(boolean)
public final boolean isEdgeStyleCloningEnabled()
FoldingEdgeStyle
instance should be assigned as a
ICloneable.clone()
clone or not.true
if the folding edge style should be cloned; false
otherwise.setEdgeStyleCloningEnabled(boolean)
public final boolean isLabelLayoutParameterCloningEnabled()
LabelLayoutParameter
instance should be assigned
as a ICloneable.clone()
clone or not.true
if the label layout parameter should be cloned; false
otherwise. The default is false
setLabelLayoutParameterCloningEnabled(boolean)
public final boolean isLabelStyleCloningEnabled()
LabelStyle
instance should be assigned as a
ICloneable.clone()
clone or not.true
if the label style should be cloned; false
otherwise. The default is false
setLabelStyleCloningEnabled(boolean)
public final boolean isSourcePortLocationParameterCloningEnabled()
SourcePortLocationParameter
instance
should be assigned as a ICloneable.clone()
clone or not.true
if the port location parameter should be cloned; false
otherwise. The default is false
setSourcePortLocationParameterCloningEnabled(boolean)
public final boolean isSourcePortStyleCloningEnabled()
SourcePortStyle
instance should be assigned as a clone
or not.true
if the port style should be cloned; false
otherwise. The default is false
setSourcePortStyleCloningEnabled(boolean)
public final boolean isTargetPortLocationParameterCloningEnabled()
TargetPortLocationParameter
instance
should be assigned as a ICloneable.clone()
clone or not.true
if the port location parameter should be cloned; false
otherwise. The default is false
setTargetPortLocationParameterCloningEnabled(boolean)
public final boolean isTargetPortStyleCloningEnabled()
TargetPortStyle
instance should be assigned as a
ICloneable.clone()
clone or not.true
if the port style should be cloned; false
otherwise. The default is false
setTargetPortStyleCloningEnabled(boolean)
public final void setBendsResettingEnabled(boolean value)
value
- true
if the folding edge should initially not contain any bends; false
otherwise, which is the default.isBendsResettingEnabled()
public final void setCopyingFirstLabelEnabled(boolean value)
master edge
should be recreated for the folding edge.
This setting can be used to initially create a copy of the first label of the master edge (if any) and subsequently
synchronize the Text
property with the master's edge label text.
value
- true
if the first label should be copied; false
otherwise.getLabelStyle()
,
getLabelLayoutParameter()
,
isCopyingFirstLabelEnabled()
public final void setEdgeStyleCloningEnabled(boolean value)
FoldingEdgeStyle
instance should be assigned as a
ICloneable.clone()
clone or not.value
- true
if the folding edge style should be cloned; false
otherwise.isEdgeStyleCloningEnabled()
public final void setFoldingEdgeStyle(IEdgeStyle value)
IEdgeStyle
to use for the folding edge.
Depending on the EdgeStyleCloningEnabled
property this implementation will assign a
ICloneable.clone()
to the property or this instance.
A value of null
(the default) will leave the style property unmodified.
value
- The FoldingEdgeStyle to set.getFoldingEdgeStyle()
public final void setLabelLayoutParameter(ILabelModelParameter value)
ILabelModelParameter
to use for the first label of the folding edge.
This will only affect the folding edge if the CopyingFirstLabelEnabled
property is
set to true
.
A value of null
will leave the label model parameter property unmodified.
value
- The LabelLayoutParameter to set.getLabelLayoutParameter()
public final void setLabelLayoutParameterCloningEnabled(boolean value)
LabelLayoutParameter
instance should be assigned
as a ICloneable.clone()
clone or not.value
- true
if the label layout parameter should be cloned; false
otherwise. The default is false
isLabelLayoutParameterCloningEnabled()
public final void setLabelStyle(ILabelStyle value)
ILabelStyle
to use for the first label of the folding edge.
This will only affect the folding edge if the CopyingFirstLabelEnabled
property is
set to true
.
A value of null
will leave the style property unmodified.
value
- The LabelStyle to set.getLabelStyle()
public final void setLabelStyleCloningEnabled(boolean value)
LabelStyle
instance should be assigned as a
ICloneable.clone()
clone or not.value
- true
if the label style should be cloned; false
otherwise. The default is false
isLabelStyleCloningEnabled()
public final void setSourcePortLocationParameter(IPortLocationModelParameter value)
IPortLocationModelParameter
to use for the source port of the folding edge.
Since the appearance of the folding edge may totally differ from the appearance of the master edge, the location of the
source port may also be different. This property can be used to assign a different specific location parameter to the
source port if the edge is in folding state
. A
value of null
will leave the location parameter property unmodified. The default is null
value
- The SourcePortLocationParameter to set.createSourcePortLocationParameter(IFoldingView, IEdge, List)
,
getSourcePortLocationParameter()
public final void setSourcePortLocationParameterCloningEnabled(boolean value)
SourcePortLocationParameter
instance
should be assigned as a ICloneable.clone()
clone or not.value
- true
if the port location parameter should be cloned; false
otherwise. The default is false
isSourcePortLocationParameterCloningEnabled()
public final void setSourcePortStyle(IPortStyle value)
IPortStyle
to use for the folding source port.
A value of null
will leave the style property unmodified.
value
- The SourcePortStyle to set.getSourcePortStyle()
public final void setSourcePortStyleCloningEnabled(boolean value)
SourcePortStyle
instance should be assigned as a clone
or not.value
- true
if the port style should be cloned; false
otherwise. The default is false
isSourcePortStyleCloningEnabled()
public final void setTargetPortLocationParameter(IPortLocationModelParameter value)
IPortLocationModelParameter
to use for the target port of the folding edge.
Since the appearance of the folding edge may totally differ from the appearance of the master edge, the location of the
target port may also be different. This property can be used to assign a different specific location parameter to the
target port if the edge is in folding state
. A
value of null
will leave the location parameter property unmodified. The default is null
value
- The TargetPortLocationParameter to set.createTargetPortLocationParameter(IFoldingView, IEdge, List)
,
getTargetPortLocationParameter()
public final void setTargetPortLocationParameterCloningEnabled(boolean value)
TargetPortLocationParameter
instance
should be assigned as a ICloneable.clone()
clone or not.value
- true
if the port location parameter should be cloned; false
otherwise. The default is false
isTargetPortLocationParameterCloningEnabled()
public final void setTargetPortStyle(IPortStyle value)
IPortStyle
to use for the folding target port.
A value of null
will leave the style property unmodified.
value
- The TargetPortStyle to set.getTargetPortStyle()
public final void setTargetPortStyleCloningEnabled(boolean value)
TargetPortStyle
instance should be assigned as a
ICloneable.clone()
clone or not.value
- true
if the port style should be cloned; false
otherwise. The default is false
isTargetPortStyleCloningEnabled()
protected void synchronizeLabels(FoldingEdgeState state, IFoldingView foldingView, IEdge foldingEdge, List<IEdge> masterEdges)
updateFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List)
to synchronize the first label if
CopyingFirstLabelEnabled
is enabled.
This will adjust the label's text, preferred size and tag properties or remove the label if there is no master label or there is more than one master edge.
state
- The viewstate of the edge to change.foldingView
- The folding view.foldingEdge
- The folding edge.masterEdges
- The master edges.public void updateFoldingEdgeState(FoldingEdgeState state, IFoldingView foldingView, IEdge foldingEdge, List<IEdge> masterEdges)
IFoldingEdgeConverter.updateFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List)
method
and changes the folding edge appearance.
This method calls synchronizeLabels(FoldingEdgeState, IFoldingView, IEdge, List)
, only.
updateFoldingEdgeState
in interface IFoldingEdgeConverter
state
- The FoldingEdgeState
of the edge to change.foldingView
- The graph to which the folding edge belongs.foldingEdge
- The folding edge for which the appearance might need an update.masterEdges
- The list of master edges
, that the folding edge currently represents.IFoldingEdgeConverter.initializeFoldingEdgeState(FoldingEdgeState, IFoldingView, IEdge, List)