Search in sources :

Example 6 with GraphViewer

use of org.eclipse.zest.core.viewers.GraphViewer in project hale by halestudio.

the class TypeCellSelectionDialog method createViewer.

/**
 * @see eu.esdihumboldt.hale.ui.util.selector.AbstractViewerSelectionDialog#createViewer(org.eclipse.swt.widgets.Composite)
 */
@Override
protected GraphViewer createViewer(Composite parent) {
    GraphViewer viewer = new GraphViewer(parent, SWT.BORDER);
    // disable node movement
    viewer.getGraphControl().getLightweightSystem().setEventDispatcher(new SWTEventDispatcher() {

        /**
         * @see org.eclipse.draw2d.SWTEventDispatcher#dispatchMouseMoved(org.eclipse.swt.events.MouseEvent)
         */
        @Override
        public void dispatchMouseMoved(MouseEvent me) {
        // ignore
        }
    });
    return viewer;
}
Also used : GraphViewer(org.eclipse.zest.core.viewers.GraphViewer) MouseEvent(org.eclipse.swt.events.MouseEvent) SWTEventDispatcher(org.eclipse.draw2d.SWTEventDispatcher)

Aggregations

GraphViewer (org.eclipse.zest.core.viewers.GraphViewer)6 Display (org.eclipse.swt.widgets.Display)3 FunctionGraphContentProvider (eu.esdihumboldt.hale.ui.common.graph.content.FunctionGraphContentProvider)2 FunctionGraphLabelProvider (eu.esdihumboldt.hale.ui.common.graph.labels.FunctionGraphLabelProvider)2 OffscreenGraph (eu.esdihumboldt.hale.ui.util.graph.OffscreenGraph)2 Dimension (java.awt.Dimension)2 BufferedOutputStream (java.io.BufferedOutputStream)2 File (java.io.File)2 FileOutputStream (java.io.FileOutputStream)2 IOException (java.io.IOException)2 FillLayout (org.eclipse.swt.layout.FillLayout)2 Composite (org.eclipse.swt.widgets.Composite)2 Graph (org.eclipse.zest.core.widgets.Graph)2 LayoutAlgorithm (org.eclipse.zest.layouts.LayoutAlgorithm)2 TreeLayoutAlgorithm (org.eclipse.zest.layouts.algorithms.TreeLayoutAlgorithm)2 TinkerGraph (com.tinkerpop.blueprints.impls.tg.TinkerGraph)1 GraphMLReader (com.tinkerpop.blueprints.util.io.graphml.GraphMLReader)1 IOProviderConfigurationException (eu.esdihumboldt.hale.common.core.io.IOProviderConfigurationException)1 IOMessageImpl (eu.esdihumboldt.hale.common.core.io.report.impl.IOMessageImpl)1 CellGraphContentProvider (eu.esdihumboldt.hale.ui.common.graph.content.CellGraphContentProvider)1