Humboldt Alignment Editor 2.5.0

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

java.lang.Object
  extended by org.eclipse.jface.viewers.ArrayContentProvider
      extended by eu.esdihumboldt.hale.ui.common.graph.content.CellGraphContentProvider
All Implemented Interfaces:
org.eclipse.jface.viewers.IContentProvider, org.eclipse.jface.viewers.IStructuredContentProvider, org.eclipse.zest.core.viewers.IGraphContentProvider

public class CellGraphContentProvider
extends org.eclipse.jface.viewers.ArrayContentProvider
implements org.eclipse.zest.core.viewers.IGraphContentProvider

Graph 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
CellGraphContentProvider()
           
 
Method Summary
 Object getDestination(Object rel)
           
protected  Object[] getEdges(Iterable<?> cells)
          Get all edges for the given cells.
 Object[] getElements(Object input)
           
 Object getSource(Object rel)
           
 
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

CellGraphContentProvider

public CellGraphContentProvider()
Method Detail

getSource

public Object getSource(Object rel)
Specified by:
getSource in interface org.eclipse.zest.core.viewers.IGraphContentProvider
See Also:
IGraphContentProvider.getSource(Object)

getDestination

public Object getDestination(Object rel)
Specified by:
getDestination in interface org.eclipse.zest.core.viewers.IGraphContentProvider
See Also:
IGraphContentProvider.getDestination(Object)

getElements

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

getEdges

protected Object[] getEdges(Iterable<?> cells)
Get all edges 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