public class DefaultFoldingEdgeConverter extends AbstractFoldingEdgeConverter
IFoldingEdgeConverter
that is used by the FoldingManager
initially and
can be customized to suit the application's needs.Constructor and Description |
---|
DefaultFoldingEdgeConverter() |
Modifier and Type | Method and Description |
---|---|
IEdge |
addFoldingEdge(IFoldingEdgeFactory factory,
IFoldingView foldingView,
IEdge masterEdge,
INode source,
boolean sourceIsCollapsed,
INode target,
boolean targetIsCollapsed)
Actually adds the folding edge as a
separate edge
to the view, reusing existing view ports of the
original source and target port, if ReusingMasterPortsEnabled is enabled and that
is possible for the given edge. |
boolean |
isReusingFolderNodePortsEnabled()
Gets a property that determines whether this implementation should reuse the ports of
folder
nodes for the folding edges. |
boolean |
isReusingMasterPortsEnabled()
Gets a property that determines whether this implementation should reuse the ports of the
MasterGraph
at non-folder nodes for the folding edges. |
void |
setReusingFolderNodePortsEnabled(boolean value)
Sets a property that determines whether this implementation should reuse the ports of
folder
nodes for the folding edges. |
void |
setReusingMasterPortsEnabled(boolean value)
Sets a property that determines whether this implementation should reuse the ports of the
MasterGraph
at non-folder nodes for the folding edges. |
createEdgeStyle, createLabelLayoutParameter, createLabelStyle, createSourcePortLocationParameter, createSourcePortStyle, createTargetPortLocationParameter, createTargetPortStyle, getFoldingEdgeStyle, getLabelLayoutParameter, getLabelStyle, getSourcePortLocationParameter, getSourcePortStyle, getTargetPortLocationParameter, getTargetPortStyle, initializeFoldingEdgeBends, initializeFoldingEdgeLabels, initializeFoldingEdgePorts, initializeFoldingEdgeState, initializeFoldingEdgeStyle, isBendsResettingEnabled, isCopyingFirstLabelEnabled, isEdgeStyleCloningEnabled, isLabelLayoutParameterCloningEnabled, isLabelStyleCloningEnabled, isSourcePortLocationParameterCloningEnabled, isSourcePortStyleCloningEnabled, isTargetPortLocationParameterCloningEnabled, isTargetPortStyleCloningEnabled, setBendsResettingEnabled, setCopyingFirstLabelEnabled, setEdgeStyleCloningEnabled, setFoldingEdgeStyle, setLabelLayoutParameter, setLabelLayoutParameterCloningEnabled, setLabelStyle, setLabelStyleCloningEnabled, setSourcePortLocationParameter, setSourcePortLocationParameterCloningEnabled, setSourcePortStyle, setSourcePortStyleCloningEnabled, setTargetPortLocationParameter, setTargetPortLocationParameterCloningEnabled, setTargetPortStyle, setTargetPortStyleCloningEnabled, synchronizeLabels, updateFoldingEdgeState
public IEdge addFoldingEdge(IFoldingEdgeFactory factory, IFoldingView foldingView, IEdge masterEdge, INode source, boolean sourceIsCollapsed, INode target, boolean targetIsCollapsed)
separate edge
to the view, reusing existing view
ports of the
original source and target port, if ReusingMasterPortsEnabled
is enabled and that
is possible for the given edge.addFoldingEdge
in interface IFoldingEdgeConverter
addFoldingEdge
in class AbstractFoldingEdgeConverter
factory
- The IFoldingEdgeFactory
implementation.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.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)
.public final boolean isReusingFolderNodePortsEnabled()
folder
nodes for the folding edges.
The view
can be configured to use separate port instances for folding edges. This makes it possible
to assign different styles and locations to source and target ports of folding edges, which may be desirable if the
style and geometry of folding edges differs a lot from the style of the master edges. Folder nodes (collapsed
group nodes), will have all of their master's ports represented
in the view. This property can be used to make folding edges that connect to the master ports connect to these folding
port instances instead of creating extra folding ports for the edges. Note that ports can only be automatically reused
by folding edges if they still connect to the same nodes. Otherwise the view will have to create new folding ports to
let the edges connect to the representing adjacent nodes. This property can be set to true
, iff the graph model
used is port-centric, i.e. each edge connects to specific ports and even folding edges should still connect to those
specific port instances, if possible. The default value is false
.
isReusingMasterPortsEnabled()
,
setReusingFolderNodePortsEnabled(boolean)
public final boolean isReusingMasterPortsEnabled()
MasterGraph
at non-folder
nodes for the folding edges.
The view
can be configured to use separate port instances for folding edges. This makes it possible
to assign different styles and locations to source and target ports of folding edges, which may be desirable if the
style and geometry of folding edges differs a lot from the style of the master edges. Folding edges may of course still
connect to non-folder nodes at one of their ports. Setting this property to true
will make the folding edge
connect to the view
port instance. This property
can be set to true
, iff the graph model used is port-centric, i.e. each edge connects to specific ports and even
folding edges should still connect to those specific view ports. The default value is false
isReusingFolderNodePortsEnabled()
,
setReusingMasterPortsEnabled(boolean)
public final void setReusingFolderNodePortsEnabled(boolean value)
folder
nodes for the folding edges.
The view
can be configured to use separate port instances for folding edges. This makes it possible
to assign different styles and locations to source and target ports of folding edges, which may be desirable if the
style and geometry of folding edges differs a lot from the style of the master edges. Folder nodes (collapsed
group nodes), will have all of their master's ports represented
in the view. This property can be used to make folding edges that connect to the master ports connect to these folding
port instances instead of creating extra folding ports for the edges. Note that ports can only be automatically reused
by folding edges if they still connect to the same nodes. Otherwise the view will have to create new folding ports to
let the edges connect to the representing adjacent nodes. This property can be set to true
, iff the graph model
used is port-centric, i.e. each edge connects to specific ports and even folding edges should still connect to those
specific port instances, if possible. The default value is false
.
value
- The ReusingFolderNodePortsEnabled to set.isReusingMasterPortsEnabled()
,
isReusingFolderNodePortsEnabled()
public final void setReusingMasterPortsEnabled(boolean value)
MasterGraph
at non-folder
nodes for the folding edges.
The view
can be configured to use separate port instances for folding edges. This makes it possible
to assign different styles and locations to source and target ports of folding edges, which may be desirable if the
style and geometry of folding edges differs a lot from the style of the master edges. Folding edges may of course still
connect to non-folder nodes at one of their ports. Setting this property to true
will make the folding edge
connect to the view
port instance. This property
can be set to true
, iff the graph model used is port-centric, i.e. each edge connects to specific ports and even
folding edges should still connect to those specific view ports. The default value is false
value
- The ReusingMasterPortsEnabled to set.isReusingFolderNodePortsEnabled()
,
isReusingMasterPortsEnabled()