Search in sources :

Example 1 with SWTEventDispatcher

use of org.eclipse.draw2d.SWTEventDispatcher 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

SWTEventDispatcher (org.eclipse.draw2d.SWTEventDispatcher)1 MouseEvent (org.eclipse.swt.events.MouseEvent)1 GraphViewer (org.eclipse.zest.core.viewers.GraphViewer)1