Package org.eclipse.gef.zest.fx.jface
Interface IGraphContentProvider
- All Superinterfaces:
IContentProvider
The
IGraphContentProvider
mediates between the
ZestContentViewer
and a content model. It provides content elements
which represent nodes, edges between nodes, and nested nodes.-
Method Summary
Modifier and TypeMethodDescriptionObject[]
getAdjacentNodes
(Object node) Returns all content elements which represent nodes that are adjacent to the node represented by the given content element, i.e. determines the targets of all edges that start at the given node.Object[]
getNestedGraphNodes
(Object node) Returns the content elements representing the nodes within the graph that is nested inside the node represented by the given content element.Object[]
getNodes()
Returns all content elements which represent nodes on the first level of the graph.boolean
hasNestedGraph
(Object node) Determines whether the node represented by the given content element has nested children.Methods inherited from interface org.eclipse.jface.viewers.IContentProvider
dispose, inputChanged
-
Method Details
-
getAdjacentNodes
Returns all content elements which represent nodes that are adjacent to the node represented by the given content element, i.e. determines the targets of all edges that start at the given node. If the given content element does not have any outgoing edges, then either an empty array ornull
is returned.- Parameters:
node
- A model object representing a graph node.- Returns:
- All model objects which represent nodes which are adjacent to the node represented by the given model object.
-
getNestedGraphNodes
Returns the content elements representing the nodes within the graph that is nested inside the node represented by the given content element. If the node does not contain a nested graph, either an empty array ornull
is returned.- Parameters:
node
- A content element that represents a node.- Returns:
- The content elements representing the nodes within the graph that is nested inside the node represented by the given content element.
-
getNodes
Object[] getNodes()Returns all content elements which represent nodes on the first level of the graph. If no nodes exist, either an empty array ornull
is returned.- Returns:
- All content elements which represent nodes on the first level of the graph.
-
hasNestedGraph
Determines whether the node represented by the given content element has nested children.- Parameters:
node
- A content element that represents a node, according to thegetNodes()
method.- Returns:
true
when the node represented by the given content element has nested children, otherwisefalse
.
-