org.eclipse.gef.zest.fx.jface

## Interface IGraphContentProvider

All Superinterfaces:
  IContentProvider

    public interface IGraphContentProvider
    extends 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

All Methods Instance Methods Abstract Methods
`java.lang.Object[]` `getAdjacentNodes(java.lang.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.
`java.lang.Object[]` `getNestedGraphNodes(java.lang.Object node)` Returns the content elements representing the nodes within the graph that is nested inside the node represented by the given content element.
`java.lang.Object[]` `getNodes()` Returns all content elements which represent nodes on the first level of the graph.
`boolean` `hasNestedGraph(java.lang.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 Detail

#### getAdjacentNodes

    java.lang.Object[] getAdjacentNodes(java.lang.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. If the given content element does not have any outgoing edges, then either an empty array or `null` 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

    java.lang.Object[] getNestedGraphNodes(java.lang.Object node)

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 or `null` 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

    java.lang.Object[] getNodes()

Returns all content elements which represent nodes on the first level of the graph. If no nodes exist, either an empty array or `null` is returned.

Returns:
  All content elements which represent nodes on the first level of the graph.

#### hasNestedGraph

    boolean hasNestedGraph(java.lang.Object node)

Determines whether the node represented by the given content element has nested children.

Parameters:
  `node` - A content element that represents a node, according to the `getNodes()` method.
Returns:
  `true` when the node represented by the given content element has nested children, otherwise `false`.