Package org.eclipse.zest.core.viewers
Interface IGraphContentProvider
- All Superinterfaces:
IContentProvider
,IStructuredContentProvider
A graph content provider.
-
Method Summary
Modifier and TypeMethodDescriptiongetDestination
(Object rel) Gets the target Object for the given relationship.Object[]
getElements
(Object input) Returns all the relationships in the graph for the given input.Gets the source Object for the given relationship.Methods inherited from interface org.eclipse.jface.viewers.IContentProvider
dispose, inputChanged
-
Method Details
-
getSource
Gets the source Object for the given relationship. Note, at least one of the source or destination must not be null. If both are null, then nothing can be displayed in the graph (a relationship cannot exist without nodes to be connected to). However, if one of getSource() or getDestination() returns null, then the resulting graph will contain an unconnected node for the non-null object returned from the other method.- Parameters:
rel
- the relationship.- Returns:
- the source, or null for an unconnected destination.
-
getDestination
Gets the target Object for the given relationship. Note, at least one of the source or destination must not be null. If both are null, then nothing can be displayed in the graph (a relationship cannot exist without nodes to be connected to). However, if one of getSource() or getDestination() returns null, then the resulting graph will contain an unconnected node for the non-null object returned from the other method.- Parameters:
rel
- the relationship.- Returns:
- the destination, or null for an unconnected source.
-
getElements
Returns all the relationships in the graph for the given input.- Specified by:
getElements
in interfaceIStructuredContentProvider
- Parameters:
input
- the input model object.- Returns:
- all the relationships in the graph for the given input.
-