org.eclipse.swt.events.MouseWheelListener Java Examples
The following examples show how to use
org.eclipse.swt.events.MouseWheelListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GeoMap.java From nebula with Eclipse Public License 2.0 | 6 votes |
/** * Removes listener from appropriate listener lists depending on the listener * interfaces that are implemented. * * @param listener * the listener */ public void removeMouseHandler(EventListener listener) { if (listener instanceof MouseListener) { removeMouseListener((MouseListener) listener); } if (listener instanceof MouseMoveListener) { removeMouseMoveListener((MouseMoveListener) listener); } if (listener instanceof MouseTrackListener) { removeMouseTrackListener((MouseTrackListener) listener); } if (listener instanceof MouseWheelListener) { removeMouseWheelListener((MouseWheelListener) listener); } if (listener instanceof PaintListener) { removePaintListener((PaintListener) listener); } }
Example #2
Source File: GeoMap.java From nebula with Eclipse Public License 2.0 | 6 votes |
/** * Adds listener to appropriate listener lists depending on the listener * interfaces that are implemented. * * @param listener * the listener */ public void addMouseHandler(EventListener listener) { if (listener instanceof MouseListener) { addMouseListener((MouseListener) listener); } if (listener instanceof MouseMoveListener) { addMouseMoveListener((MouseMoveListener) listener); } if (listener instanceof MouseTrackListener) { addMouseTrackListener((MouseTrackListener) listener); } if (listener instanceof MouseWheelListener) { addMouseWheelListener((MouseWheelListener) listener); } if (listener instanceof PaintListener) { addPaintListener((PaintListener) listener); } }
Example #3
Source File: BaseMouseProvider.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
/** * Method to register the provider to chart viewer. */ protected void register() { IPlotArea plotArea = getChart().getPlotArea(); Control control = plotArea.getControl(); if (this instanceof MouseListener) { control.addMouseListener((MouseListener) this); } if (this instanceof MouseMoveListener) { control.addMouseMoveListener((MouseMoveListener) this); } if (this instanceof MouseWheelListener) { control.addMouseWheelListener((MouseWheelListener) this); } if (this instanceof MouseTrackListener) { control.addMouseTrackListener((MouseTrackListener) this); } if (this instanceof ICustomPaintListener) { plotArea.addCustomPaintListener((ICustomPaintListener) this); } else if (this instanceof PaintListener) { control.addPaintListener((PaintListener) this); } TmfAbstractToolTipHandler tooltipHandler = getTooltipHandler(); if(tooltipHandler != null) { tooltipHandler.activateHoverHelp(control); } }
Example #4
Source File: BaseMouseProvider.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
/** * Method to deregister the provider from chart viewer. */ protected void deregister() { IPlotArea plotArea = getChart().getPlotArea(); if (plotArea == null) { return; } Control control = plotArea.getControl(); if (!control.isDisposed()) { if (this instanceof MouseListener) { control.removeMouseListener((MouseListener) this); } if (this instanceof MouseMoveListener) { control.removeMouseMoveListener((MouseMoveListener) this); } if (this instanceof MouseWheelListener) { control.removeMouseWheelListener((MouseWheelListener) this); } if (this instanceof MouseTrackListener) { control.removeMouseTrackListener((MouseTrackListener) this); } if (this instanceof ICustomPaintListener) { plotArea.removeCustomPaintListener((ICustomPaintListener) this); } else if (this instanceof PaintListener) { control.removePaintListener((PaintListener) this); } TmfAbstractToolTipHandler tooltipHandler = getTooltipHandler(); if(tooltipHandler != null) { tooltipHandler.deactivateHoverHelp(control); } } }
Example #5
Source File: TmfBaseProvider.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
/** * Method to deregister the provider from chart viewer. */ protected void deregister() { IPlotArea plotArea = getChart().getPlotArea(); if (plotArea == null) { return; } Control control = plotArea.getControl(); if (!control.isDisposed()) { if (this instanceof MouseListener) { control.removeMouseListener((MouseListener) this); } if (this instanceof MouseMoveListener) { control.removeMouseMoveListener((MouseMoveListener) this); } if (this instanceof MouseWheelListener) { control.removeMouseWheelListener((MouseWheelListener) this); } if (this instanceof MouseTrackListener) { control.removeMouseTrackListener((MouseTrackListener) this); } if (this instanceof ICustomPaintListener) { plotArea.removeCustomPaintListener((ICustomPaintListener) this); } else if (this instanceof PaintListener) { control.removePaintListener((PaintListener) this); } TmfAbstractToolTipHandler tooltipHandler = getTooltipHandler(); if(tooltipHandler != null) { tooltipHandler.deactivateHoverHelp(control); } } }
Example #6
Source File: ChartAreaRenderer.java From neoscada with Eclipse Public License 1.0 | 5 votes |
@Override public void removeMouseWheelListener ( final MouseWheelListener listener ) { if ( !this.control.isDisposed () ) { this.control.removeMouseWheelListener ( listener ); } }
Example #7
Source File: TmfBaseProvider.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
/** * Method to register the provider to chart viewer. */ protected void register() { IPlotArea plotArea = getChart().getPlotArea(); Control control = plotArea.getControl(); if (this instanceof MouseListener) { control.addMouseListener((MouseListener) this); } if (this instanceof MouseMoveListener) { control.addMouseMoveListener((MouseMoveListener) this); } if (this instanceof MouseWheelListener) { control.addMouseWheelListener((MouseWheelListener) this); } if (this instanceof MouseTrackListener) { control.addMouseTrackListener((MouseTrackListener) this); } if (this instanceof ICustomPaintListener) { plotArea.addCustomPaintListener((ICustomPaintListener) this); } else if (this instanceof PaintListener) { control.addPaintListener((PaintListener) this); } TmfAbstractToolTipHandler tooltipHandler = getTooltipHandler(); if(tooltipHandler != null) { tooltipHandler.activateHoverHelp(control); } }
Example #8
Source File: FXCanvasEx.java From gef with Eclipse Public License 2.0 | 5 votes |
@Override public void removeMouseWheelListener(MouseWheelListener listener) { // XXX: The workaround for JDK-8161282 requires, that the typed mouse // wheel listener, registered by the JavaSE-1.8 superclass, is ignored; // the JavaSE-1.8 workaround and the fix within the JavaSE-1.9 // superclass both use an untyped listener. if (JAVA_8) { if (!listener.getClass().getName() .startsWith(FXCanvas.class.getName() + "$")) { super.removeMouseWheelListener(listener); } } else { super.removeMouseWheelListener(listener); } }
Example #9
Source File: FXCanvasEx.java From gef with Eclipse Public License 2.0 | 5 votes |
@Override public void addMouseWheelListener(MouseWheelListener listener) { // XXX: The workaround for JDK-8161282 requires, that the typed mouse // wheel listener, registered by the JavaSE-1.8 superclass, is ignored; // the JavaSE-1.8 workaround and the fix within the JavaSE-1.9 // superclass both use an untyped listener. if (JAVA_8) { if (!listener.getClass().getName() .startsWith(FXCanvas.class.getName() + "$")) { super.addMouseWheelListener(listener); } } else { super.addMouseWheelListener(listener); } }
Example #10
Source File: TagCloudViewer.java From gef with Eclipse Public License 2.0 | 5 votes |
/** * Initialize the mouse wheel listener to support zooming in and out. */ protected void initMouseWheelListener() { cloud.addMouseWheelListener(new MouseWheelListener() { @Override public void mouseScrolled(MouseEvent e) { if (e.count > 0) { cloud.zoomIn(); } else { cloud.zoomOut(); } } }); }
Example #11
Source File: ChartComposite.java From astor with GNU General Public License v2.0 | 4 votes |
/** * Hook an SWT listener on the canvas where the chart is drawn. * The purpose of this method is to allow some degree of customization. * @param listener The SWT listener to attach to the canvas. */ public void addSWTListener(SWTEventListener listener) { if (listener instanceof ControlListener) { this.canvas.addControlListener((ControlListener) listener); } else if (listener instanceof DisposeListener) { this.canvas.addDisposeListener((DisposeListener) listener); } else if (listener instanceof DragDetectListener) { this.canvas.addDragDetectListener((DragDetectListener) listener); } else if (listener instanceof FocusListener) { this.canvas.addFocusListener((FocusListener) listener); } else if (listener instanceof HelpListener) { this.canvas.addHelpListener((HelpListener) listener); } else if (listener instanceof KeyListener) { this.canvas.addKeyListener((KeyListener) listener); } else if (listener instanceof MenuDetectListener) { this.canvas.addMenuDetectListener((MenuDetectListener) listener); } else if (listener instanceof MouseListener) { this.canvas.addMouseListener((MouseListener) listener); } else if (listener instanceof MouseMoveListener) { this.canvas.addMouseMoveListener((MouseMoveListener) listener); } else if (listener instanceof MouseTrackListener) { this.canvas.addMouseTrackListener((MouseTrackListener) listener); } else if (listener instanceof MouseWheelListener) { this.canvas.addMouseWheelListener((MouseWheelListener) listener); } else if (listener instanceof PaintListener) { this.canvas.addPaintListener((PaintListener) listener); } else if (listener instanceof TraverseListener) { this.canvas.addTraverseListener((TraverseListener) listener); } }
Example #12
Source File: ChartComposite.java From astor with GNU General Public License v2.0 | 4 votes |
/** * Hook an SWT listener on the canvas where the chart is drawn. * The purpose of this method is to allow some degree of customization. * * @param listener The SWT listener to attach to the canvas. */ public void addSWTListener(EventListener listener) { if (listener instanceof ControlListener) { this.canvas.addControlListener((ControlListener) listener); } else if (listener instanceof DisposeListener) { this.canvas.addDisposeListener((DisposeListener) listener); } else if (listener instanceof DragDetectListener) { this.canvas.addDragDetectListener((DragDetectListener) listener); } else if (listener instanceof FocusListener) { this.canvas.addFocusListener((FocusListener) listener); } else if (listener instanceof HelpListener) { this.canvas.addHelpListener((HelpListener) listener); } else if (listener instanceof KeyListener) { this.canvas.addKeyListener((KeyListener) listener); } else if (listener instanceof MenuDetectListener) { this.canvas.addMenuDetectListener((MenuDetectListener) listener); } else if (listener instanceof MouseListener) { this.canvas.addMouseListener((MouseListener) listener); } else if (listener instanceof MouseMoveListener) { this.canvas.addMouseMoveListener((MouseMoveListener) listener); } else if (listener instanceof MouseTrackListener) { this.canvas.addMouseTrackListener((MouseTrackListener) listener); } else if (listener instanceof MouseWheelListener) { this.canvas.addMouseWheelListener((MouseWheelListener) listener); } else if (listener instanceof PaintListener) { this.canvas.addPaintListener((PaintListener) listener); } else if (listener instanceof TraverseListener) { this.canvas.addTraverseListener((TraverseListener) listener); } }
Example #13
Source File: TagCloud.java From gef with Eclipse Public License 2.0 | 4 votes |
@Override public void removeMouseWheelListener(MouseWheelListener listener) { checkWidget(); mouseWheelListeners.remove(listener); }
Example #14
Source File: TagCloud.java From gef with Eclipse Public License 2.0 | 4 votes |
@Override public void addMouseWheelListener(MouseWheelListener listener) { checkWidget(); Assert.isLegal(listener != null); mouseWheelListeners.add(listener); }
Example #15
Source File: FigureRenderer.java From neoscada with Eclipse Public License 1.0 | 4 votes |
@Override public void removeMouseWheelListener ( final MouseWheelListener listener ) { }
Example #16
Source File: FigureRenderer.java From neoscada with Eclipse Public License 1.0 | 4 votes |
@Override public void addMouseWheelListener ( final MouseWheelListener listener ) { }
Example #17
Source File: ChartAreaRenderer.java From neoscada with Eclipse Public License 1.0 | 4 votes |
@Override public void addMouseWheelListener ( final MouseWheelListener listener ) { this.control.addMouseWheelListener ( listener ); }
Example #18
Source File: CalendarCombo.java From nebula with Eclipse Public License 2.0 | 4 votes |
public void removeMouseWheelListener(MouseWheelListener listener) { mComboControl.removeMouseWheelListener(listener); }
Example #19
Source File: CalendarCombo.java From nebula with Eclipse Public License 2.0 | 4 votes |
public void addMouseWheelListener(MouseWheelListener listener) { mComboControl.addMouseWheelListener(listener); }
Example #20
Source File: PasswordRevealer.java From nebula with Eclipse Public License 2.0 | 3 votes |
/** * Removes the listener from the collection of listeners who will * be notified when the mouse wheel is scrolled. * * @param listener the listener which should no longer be notified * * @exception IllegalArgumentException * <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException * <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see MouseWheelListener * @see #addMouseWheelListener * * @since 3.3 */ @Override public void removeMouseWheelListener(final MouseWheelListener listener) { super.removeMouseWheelListener(listener); comp.removeMouseWheelListener(listener); passwordField.removeMouseWheelListener(listener); }
Example #21
Source File: PasswordRevealer.java From nebula with Eclipse Public License 2.0 | 3 votes |
/** * Adds the listener to the collection of listeners who will * be notified when the mouse wheel is scrolled, by sending * it one of the messages defined in the * <code>MouseWheelListener</code> interface. * * @param listener the listener which should be notified * * @exception IllegalArgumentException * <ul> * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException * <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see MouseWheelListener * @see #removeMouseWheelListener * * @since 3.3 */ @Override public void addMouseWheelListener(final MouseWheelListener listener) { super.addMouseWheelListener(listener); comp.addMouseWheelListener(listener); passwordField.addMouseWheelListener(listener); }
Example #22
Source File: HistogramTextControl.java From tracecompass with Eclipse Public License 2.0 | 2 votes |
/** * Add a mouse wheel listener to the text control * @param listener the mouse wheel listener */ public void addMouseWheelListener(MouseWheelListener listener) { fTextValue.addMouseWheelListener(listener); }
Example #23
Source File: HistogramTextControl.java From tracecompass with Eclipse Public License 2.0 | 2 votes |
/** * Remove a mouse wheel listener from the text control * @param listener the mouse wheel listener */ public void removeMouseWheelListener(MouseWheelListener listener) { fTextValue.removeMouseWheelListener(listener); }
Example #24
Source File: Histogram.java From tracecompass with Eclipse Public License 2.0 | 2 votes |
/** * Add a mouse wheel listener to the histogram * * @param listener * the mouse wheel listener */ public void addMouseWheelListener(MouseWheelListener listener) { fCanvas.addMouseWheelListener(listener); }
Example #25
Source File: Histogram.java From tracecompass with Eclipse Public License 2.0 | 2 votes |
/** * Remove a mouse wheel listener from the histogram * * @param listener * the mouse wheel listener */ public void removeMouseWheelListener(MouseWheelListener listener) { fCanvas.removeMouseWheelListener(listener); }
Example #26
Source File: ChartRenderer.java From neoscada with Eclipse Public License 1.0 | votes |
public abstract void removeMouseWheelListener ( MouseWheelListener listener );
Example #27
Source File: ChartRenderer.java From neoscada with Eclipse Public License 1.0 | votes |
public abstract void addMouseWheelListener ( MouseWheelListener listener );