|
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.FolderContents
public static class LocalViewCreator.FolderContents
Local view creator that creates local views that display the content of all folder nodes in the creator's collection of focus nodes.
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 |
FOLDER_POLICY_ALWAYS
Folder inclusion policy specifier to always include a folder node representative in the created local views. |
static byte |
FOLDER_POLICY_AS_NEEDED
Folder inclusion policy specifier to include folder node representatives whenever the local view displays the contents of more than one folder node. |
static byte |
FOLDER_POLICY_NEVER
Folder inclusion policy specifier to never include folder node representatives in the created local views. |
Fields inherited from class y.view.LocalViewCreator.AbstractLocalViewCreator |
---|
ELEMENT_TYPE_EDGE, ELEMENT_TYPE_NODE |
Constructor Summary | |
---|---|
LocalViewCreator.FolderContents(Graph2D model)
Creates a new FolderContents instance for the specified
model graph. |
|
LocalViewCreator.FolderContents(Graph2D model,
GraphCopier.CopyFactory factory)
Creates a new FolderContents instance for the specified
model graph and copy factory. |
|
LocalViewCreator.FolderContents(Graph2D model,
GraphCopier.CopyFactory factory,
Graph2D view)
Creates a new FolderContents 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. |
protected Layouter |
createDefaultLayouter()
Creates a preconfigured instance of a layout algorithm that is used by default to lay out the contents of a newly created local view. |
protected NodeRealizer |
createViewRealizer(Node model,
Node view)
Creates and/or configures the realizer used to display folder node representatives in the creator's view graph. |
byte |
getFolderPolicy()
Returns the policy specifier that determines whether or not folder nodes should be included in the local view. |
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. |
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 |
isInnerGraphBindingAllowed()
Determines if bindings between view nodes/edges and nodes/edges that do not lie in the model graph but are part of its graph hierarchy are allowed. |
protected void |
layoutViewGraph()
Lays out the contents of the creator's view graph using the layout algorithm returned by LocalViewCreator.getLayouter() . |
void |
setFolderPolicy(byte policy)
Specifies the policy specifier that determines whether or not folder nodes should be included in the local view. |
void |
setInnerGraphBindingAllowed(boolean innerGraphBindingAllowed)
Enables/disables binding between nodes/edges in the view graph that do not lie in the model graph but are part of its graph hierarchy. |
Methods inherited from class y.view.LocalViewCreator |
---|
getLayouter, 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 FOLDER_POLICY_ALWAYS
getFolderPolicy()
,
setFolderPolicy(byte)
,
Constant Field Valuespublic static final byte FOLDER_POLICY_AS_NEEDED
getFolderPolicy()
,
setFolderPolicy(byte)
,
Constant Field Valuespublic static final byte FOLDER_POLICY_NEVER
getFolderPolicy()
,
setFolderPolicy(byte)
,
Constant Field ValuesConstructor Detail |
---|
public LocalViewCreator.FolderContents(Graph2D model)
FolderContents
instance for the specified
model graph.
Invoking this constructor is equivalent to:
new FolderContents(model, model.getGraphCopyFactory(), (Graph2D) model.getGraphCopyFactory().createGraph());
model
- the graph for which local views are to be created.public LocalViewCreator.FolderContents(Graph2D model, GraphCopier.CopyFactory factory)
FolderContents
instance for the specified
model graph and copy factory.
Invoking this constructor is equivalent to:
new FolderContents(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.FolderContents(Graph2D model, GraphCopier.CopyFactory factory, Graph2D view)
FolderContents
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 byte getFolderPolicy()
Defaults to FOLDER_POLICY_AS_NEEDED
.
setFolderPolicy(byte)
public void setFolderPolicy(byte policy)
Defaults to FOLDER_POLICY_AS_NEEDED
.
policy
- one of
java.lang.IllegalArgumentException
- if the specified policy is not one
of the listed constants.getFolderPolicy()
protected Layouter createDefaultLayouter()
ComponentLayouter
to keep the original layout of each
displayed folder's contents.
createDefaultLayouter
in class LocalViewCreator
ComponentLayouter
.IncrementalHierarchicLayouter.setConsiderNodeLabelsEnabled(boolean)
,
IncrementalHierarchicLayouter.setIntegratedEdgeLabelingEnabled(boolean)
,
IncrementalHierarchicLayouter.setOrthogonallyRouted(boolean)
protected void layoutViewGraph()
LocalViewCreator.getLayouter()
.
This implementation is specifically tailored to be used with
ComponentLayouter
to ensure that the contents of each
folder node constitute one graph component.
layoutViewGraph
in class LocalViewCreator
LocalViewCreator.updateViewGraph()
protected void buildViewGraph()
LocalViewCreator
buildViewGraph
in class LocalViewCreator
LocalViewCreator.updateViewGraph()
protected NodeRealizer createViewRealizer(Node model, Node view)
view
node to match the text set for the model
node's default label or removes all labels from the view
node's realizer if the model
node has no associated
labels.
Note: As the view graph displays a folder node's contents, representatives of folder nodes are group nodes in the creator's view graph.
model
- a folder node in creator's model graph.view
- a group node in the creator's view graph that is the
representative of the specified model
node and for which
a realizer should be created and/or configured.
view
node's realizer with adjusted node labels.public boolean isInnerGraphBindingAllowed()
By default, this property is set to false
.
true
if inner graph binding is allowed, false
otherwise.setInnerGraphBindingAllowed(boolean)
public void setInnerGraphBindingAllowed(boolean innerGraphBindingAllowed)
By default, this property is set to false
.
innerGraphBindingAllowed
- determines if inner graph binding is allowed.isInnerGraphBindingAllowed()
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 |