List of usage examples for java.awt.event MouseWheelEvent getButton
public int getButton()
From source file:net.sf.mzmine.chartbasics.gui.swing.ChartGestureMouseAdapter.java
@Override public void mouseWheelMoved(MouseWheelEvent e) { if (gestureHandlers == null || gestureHandlers.isEmpty() || !listensFor(Event.MOUSE_WHEEL)) return;// w w w . j av a 2 s .c o m if (e.getComponent() instanceof ChartPanel) { ChartPanel chartPanel = (ChartPanel) e.getComponent(); ChartEntity entity = findChartEntity(chartPanel, e); ChartGesture.Entity gestureEntity = ChartGesture.getGestureEntity(entity); Button button = Button.getButton(e.getButton()); // handle event handleEvent(new ChartGestureEvent(chartPanel, e, entity, new ChartGesture(gestureEntity, Event.MOUSE_WHEEL, button))); } }