Java Code Examples for processing.event.MouseEvent#getCount()
The following examples show how to use
processing.event.MouseEvent#getCount() .
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: MapLayer.java From constellation with Apache License 2.0 | 5 votes |
public void mouseWheel(final MouseEvent event) { if (!mouseIsDragging && event.getCount() != 0) { layer = null; mouseIsScrolling = true; scrollTime = renderer.millis(); } }
Example 2
Source File: SideScroller.java From Project-16x16 with GNU General Public License v3.0 | 5 votes |
/** * Handles scrolling events. */ @Override public void mouseWheel(MouseEvent event) { game.mouseWheel(event); if(game.isZoomable()) { if (event.getCount() == -1) { // for development camera.zoomIn(0.02f); } else { camera.zoomOut(0.02f); } } }
Example 3
Source File: ScrollBarVertical.java From Project-16x16 with GNU General Public License v3.0 | 4 votes |
public void mouseWheel(MouseEvent event) { barLocation += event.getCount() * (container.localHeight * 0.0005f); //0.1f barLocation = Utility.clamp(barLocation, 0, 1); }
Example 4
Source File: ScrollBarHorizontal.java From Project-16x16 with GNU General Public License v3.0 | 4 votes |
public void mouseWheel(MouseEvent event) { barLocation += event.getCount() * 0.1f; barLocation = Utility.clamp(barLocation, 0, 1); }