|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.LocalViewCreator y.view.LocalViewCreator.AbstractLocalViewCreator y.view.LocalViewCreator.EdgeGroup
public static class LocalViewCreator.EdgeGroup
Local view creator that tries to identify groups of edges according to shared source and/or target nodes or using ids provided that are bound to the model graph.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class y.view.LocalViewCreator |
---|
LocalViewCreator.AbstractLocalViewCreator, LocalViewCreator.AncestorGroups, LocalViewCreator.CommonParentGroup, LocalViewCreator.EdgeGroup, LocalViewCreator.FolderContents, LocalViewCreator.Neighborhood, LocalViewCreator.SourceAndTarget |
Field Summary | |
---|---|
static byte |
GROUP_BY_SOURCE
Grouping policy that specifies that an edge belongs to the same edge group as one of the focus edges if the corresponding source data matches. |
static byte |
GROUP_BY_SOURCE_AND_TARGET
Grouping policy that specifies that an edge belongs to the same edge group as one of the focus edges if both source data and target data match. |
static byte |
GROUP_BY_SOURCE_OR_TARGET
Grouping policy that specifies that an edge belongs to the same edge group as one of the focus edges if source data or target data matches. |
static byte |
GROUP_BY_TARGET
Grouping policy that specifies that an edge belongs to the same edge group as one of the focus edges if the corresponding target data matches. |
Fields inherited from class y.view.LocalViewCreator.AbstractLocalViewCreator |
---|
ELEMENT_TYPE_EDGE, ELEMENT_TYPE_NODE |
Constructor Summary | |
---|---|
LocalViewCreator.EdgeGroup(Graph2D model)
Creates a new EdgeGroup instance for the specified
model graph. |
|
LocalViewCreator.EdgeGroup(Graph2D model,
GraphCopier.CopyFactory factory)
Creates a new EdgeGroup instance for the specified
model graph and copy factory. |
|
LocalViewCreator.EdgeGroup(Graph2D model,
GraphCopier.CopyFactory factory,
Graph2D view)
Creates a new EdgeGroup instance for the specified
model graph, copy factory, and view graph. |
Method Summary | |
---|---|
protected void |
buildViewGraph()
Creates graph elements in the creator's view graph. |
byte |
getGroupByPolicy()
Returns the policy used for identifying edge groups. |
Graph2D |
getModel()
Returns the model graph for which the creator may create local views. |
Edge |
getModelEdge(Edge view)
Returns a edge in the creator's model graph that corresponds to the specified edge in the creator's view graph or null if
there is no corresponding edge. |
Node |
getModelNode(Node view)
Returns a node in the creator's model graph that corresponds to the specified node in the creator's view graph or null if there
is no corresponding node. |
java.lang.Object |
getSourceGroupidKey()
Returns the data provider key used to retrieve a DataProvider that contains source group IDs from the
creator's model graph. |
java.lang.Object |
getTargetGroupidKey()
Returns the data provider key used to retrieve a DataProvider that contains target group IDs from the
creator's model graph. |
Edge |
getViewEdge(Edge model)
Returns a edge in the creator's view graph that corresponds to the specified edge in the creator's model graph or null if
there is no corresponding edge. |
Graph2D |
getViewGraph()
Returns the view graph that is modified by the creator's updateViewGraph method. |
Node |
getViewNode(Node model)
Returns a node in the creator's view graph that corresponds to the specified node in the creator's model graph or null if
there is no corresponding node. |
boolean |
isGroupByIdEnabled()
Returns true if edge groups are identified using IDs that
are stored in DataProvider s bound to the creator's
model graph using the keys returned by getSourceGroupidKey
and getTargetGroupidKey and false if edge
groups are defined by shared source and/or target nodes. |
void |
setGroupByIdEnabled(boolean enabled)
Specifies whether edge groups are identified using IDs that are stored in DataProvider s bound to the creator's model graph
using the keys returned by getSourceGroupidKey and
getTargetGroupidKey or by shared source and/or target
nodes. |
void |
setGroupByPolicy(byte policy)
Specifies the policy used for identifying edge groups. |
void |
setSourceGroupidKey(java.lang.Object sourceGroupidKey)
Specifies the data provider key used to retrieve a DataProvider that contains source group IDs from the
creator's model graph. |
void |
setTargetGroupidKey(java.lang.Object targetGroupidKey)
Specifies the data provider key used to retrieve a DataProvider that contains target group IDs from the
creator's model graph. |
Methods inherited from class y.view.LocalViewCreator |
---|
createDefaultLayouter, getLayouter, layoutViewGraph, publishViewGraph, setLayouter, updateViewGraph |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte GROUP_BY_SOURCE
groupByIdEnabled
, sourceGroupidKey
, and
targetGroupidKey
properties.
public static final byte GROUP_BY_TARGET
groupByIdEnabled
, sourceGroupidKey
, and
targetGroupidKey
properties.
public static final byte GROUP_BY_SOURCE_OR_TARGET
groupByIdEnabled
, sourceGroupidKey
, and
targetGroupidKey
properties.
public static final byte GROUP_BY_SOURCE_AND_TARGET
groupByIdEnabled
, sourceGroupidKey
, and
targetGroupidKey
properties.
Constructor Detail |
---|
public LocalViewCreator.EdgeGroup(Graph2D model)
EdgeGroup
instance for the specified
model graph.
Invoking this constructor is equivalent to:
new EdgeGroup(model, model.getGraphCopyFactory(), (Graph2D) model.getGraphCopyFactory().createGraph());
model
- the graph for which local views are to be created.public LocalViewCreator.EdgeGroup(Graph2D model, GraphCopier.CopyFactory factory)
EdgeGroup
instance for the specified
model graph and copy factory.
Invoking this constructor is equivalent to:
new EdgeGroup(model, factory, (Graph2D) factory.createGraph());
Note: The graph instances created by the specified factory have to
be of type Graph2D
or subclasses thereof. Moreover,
the factory.
model
- the graph for which local views are to be created.factory
- that CopyFactory
that will be used to create
graph elements in the creator's view graph.public LocalViewCreator.EdgeGroup(Graph2D model, GraphCopier.CopyFactory factory, Graph2D view)
EdgeGroup
instance for the specified
model graph, copy factory, and view graph.
Note: The specified factory has to be able to create graph elements in the specified view graph.
model
- the graph for which local views are to be created.factory
- that CopyFactory
that will be used to create
graph elements in the creator's view graph.view
- the graph that will be modified by the creator.Method Detail |
---|
public boolean isGroupByIdEnabled()
true
if edge groups are identified using IDs that
are stored in DataProvider
s bound to the creator's
model graph using the keys returned by getSourceGroupidKey
and getTargetGroupidKey
and false
if edge
groups are defined by shared source and/or target nodes.
By default, this property is set to false
.
true
if edge groups are identified using IDs
and false
if edge groups are defined by shared source
and/or target nodes.setGroupByIdEnabled(boolean)
public void setGroupByIdEnabled(boolean enabled)
DataProvider
s bound to the creator's model graph
using the keys returned by getSourceGroupidKey
and
getTargetGroupidKey
or by shared source and/or target
nodes.
By default, this property is set to false
.
enabled
- if true
edge groups are identified using IDs
and false
if edge groups are defined by shared source and/or
target nodes.isGroupByIdEnabled()
public byte getGroupByPolicy()
getGroupByPolicy()
public void setGroupByPolicy(byte policy)
policy
- the policy used for identifying edge groups. One of
java.lang.IllegalArgumentException
- if the specified policy is not one
of the listed constants.getGroupByPolicy()
public java.lang.Object getSourceGroupidKey()
DataProvider
that contains source group IDs from the
creator's model graph.
Said DataProvider
is only used if
groupByIdEnabled
is set to true
.
Defaults to PortConstraintKeys.SOURCE_GROUPID_KEY
.
DataProvider
that contains source group IDs.setSourceGroupidKey(Object)
public void setSourceGroupidKey(java.lang.Object sourceGroupidKey)
DataProvider
that contains source group IDs from the
creator's model graph.
Said DataProvider
is only used if
groupByIdEnabled
is set to true
.
Defaults to PortConstraintKeys.SOURCE_GROUPID_KEY
.
sourceGroupidKey
- the data provider key used to retrieve
source group IDs from the creator's model graph.getSourceGroupidKey()
public java.lang.Object getTargetGroupidKey()
DataProvider
that contains target group IDs from the
creator's model graph.
Said DataProvider
is only used if
groupByIdEnabled
is set to true
.
Defaults to PortConstraintKeys.TARGET_GROUPID_KEY
.
DataProvider
that contains target group IDs.setTargetGroupidKey(Object)
public void setTargetGroupidKey(java.lang.Object targetGroupidKey)
DataProvider
that contains target group IDs from the
creator's model graph.
Said DataProvider
is only used if
groupByIdEnabled
is set to true
.
Defaults to PortConstraintKeys.TARGET_GROUPID_KEY
.
targetGroupidKey
- the data provider key used to retrieve
target group IDs from the creator's model graph.getTargetGroupidKey()
protected void buildViewGraph()
LocalViewCreator
buildViewGraph
in class LocalViewCreator
LocalViewCreator.updateViewGraph()
public Graph2D getModel()
LocalViewCreator
getModel
in class LocalViewCreator
public Graph2D getViewGraph()
LocalViewCreator
updateViewGraph
method.
getViewGraph
in class LocalViewCreator
updateViewGraph
method.LocalViewCreator.updateViewGraph()
public Node getModelNode(Node view)
LocalViewCreator
null
if there
is no corresponding node.
getModelNode
in class LocalViewCreator
view
- a node in the creator's view graph.
null
if there
is no corresponding node.public Node getViewNode(Node model)
LocalViewCreator
null
if
there is no corresponding node.
getViewNode
in class LocalViewCreator
model
- a node in the creator's model graph.
null
if
there is no corresponding node.public Edge getModelEdge(Edge view)
LocalViewCreator
null
if
there is no corresponding edge.
getModelEdge
in class LocalViewCreator
view
- a edge in the creator's view graph.
null
if
there is no corresponding edge.public Edge getViewEdge(Edge model)
LocalViewCreator
null
if
there is no corresponding edge.
getViewEdge
in class LocalViewCreator
model
- a edge in the creator's model graph.
null
if
there is no corresponding edge.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |