Java Code Examples for processing.event.MouseEvent#CLICK

The following examples show how to use processing.event.MouseEvent#CLICK . 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: PScene.java    From Project-16x16 with GNU General Public License v3.0 6 votes vote down vote up
/**
 * This method is <b>Public</b> only to enable binding to a parent PApplet.
 * <p>
 * You can <b>ignore this method</b> since the parent sketch will call it
 * automatically when it detects a mouse event (provided register() has been
 * called).
 */
public final void mouseEvent(MouseEvent e) {
	switch (e.getAction()) {
		case MouseEvent.PRESS :
			mousePressed(e);
			break;
		case MouseEvent.RELEASE :
			mouseReleased(e);
			break;
		case MouseEvent.CLICK :
			mouseClicked(e);
			break;
		case MouseEvent.WHEEL :
			mouseWheel(e);
			break;
		case MouseEvent.DRAG :
			mouseDragged(e);
			break;
		default :
			break;
	}
}
 
Example 2
Source File: MouseShutdown.java    From haxademic with MIT License 6 votes vote down vote up
public void mouseEvent(MouseEvent event) {
  // int x = event.getX();
  // int y = event.getY();

  switch (event.getAction()) {
    case MouseEvent.PRESS:
      break;
    case MouseEvent.RELEASE:
      break;
    case MouseEvent.CLICK:
    	click();
      break;
    case MouseEvent.DRAG:
      break;
    case MouseEvent.MOVE:
      break;
  }
}