Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.common.graph.content
Class CellRelationshipContentProvider

java.lang.Object
  extended by org.eclipse.jface.viewers.ArrayContentProvider
      extended by eu.esdihumboldt.hale.ui.common.graph.content.CellRelationshipContentProvider
All Implemented Interfaces:
org.eclipse.jface.viewers.IContentProvider, org.eclipse.jface.viewers.IStructuredContentProvider, org.eclipse.zest.core.viewers.IGraphEntityRelationshipContentProvider
Direct Known Subclasses:
NestedCellRelationshipContentProvider

public class CellRelationshipContentProvider
extends org.eclipse.jface.viewers.ArrayContentProvider
implements org.eclipse.zest.core.viewers.IGraphEntityRelationshipContentProvider

Graph entity relationship content provider that models entities and cells as nodes. Supports an Alignment, a Cell or an Iterable of Cells as input.

Author:
Simon Templer

Constructor Summary
CellRelationshipContentProvider()
           
 
Method Summary
 Object[] getElements(Object input)
           
protected  Object[] getNodes(Iterable<?> cells)
          Get all nodes for the given cells.
 Object[] getRelationships(Object source, Object dest)
           
 
Methods inherited from class org.eclipse.jface.viewers.ArrayContentProvider
dispose, getInstance, inputChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.viewers.IContentProvider
dispose, inputChanged
 

Constructor Detail

CellRelationshipContentProvider

public CellRelationshipContentProvider()
Method Detail

getRelationships

public Object[] getRelationships(Object source,
                                 Object dest)
Specified by:
getRelationships in interface org.eclipse.zest.core.viewers.IGraphEntityRelationshipContentProvider
See Also:
IGraphEntityRelationshipContentProvider.getRelationships(Object, Object)

getElements

public Object[] getElements(Object input)
Specified by:
getElements in interface org.eclipse.jface.viewers.IStructuredContentProvider
Overrides:
getElements in class org.eclipse.jface.viewers.ArrayContentProvider
See Also:
IGraphContentProvider.getElements(Object)

getNodes

protected Object[] getNodes(Iterable<?> cells)
Get all nodes for the given cells.

Parameters:
cells - an iterable of Cells, other objects will be ignored
Returns:
the array of edges

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d