Class LayeredPaneTransparentDemo.MousePressedListener

java.lang.Object
  extended byLayeredPaneTransparentDemo.MousePressedListener
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener
Enclosing class:
LayeredPaneTransparentDemo

public static class LayeredPaneTransparentDemo.MousePressedListener
extends java.lang.Object
implements java.awt.event.MouseListener

Class MousePressedListener implements a mouse listener for press events only, ignoring all other events. When the mouse is pressed, the location of the press event and the layer the press happnens on are written to stdout.


Constructor Summary
LayeredPaneTransparentDemo.MousePressedListener(int layerNum)
          Construct this with an integer indicating the layer position to which this is attached.
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent e)
          Ignore mouseClicked events.
 void mouseEntered(java.awt.event.MouseEvent e)
          Ignore mouseEntered events.
 void mouseExited(java.awt.event.MouseEvent e)
          Ignore mouseExited events.
 void mousePressed(java.awt.event.MouseEvent e)
          Report the position of a mouse pressed event and the layer it happens on to stdout.
 void mouseReleased(java.awt.event.MouseEvent e)
          Ignore mouseReleased events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayeredPaneTransparentDemo.MousePressedListener

public LayeredPaneTransparentDemo.MousePressedListener(int layerNum)
Construct this with an integer indicating the layer position to which this is attached.

Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Report the position of a mouse pressed event and the layer it happens on to stdout.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Ignore mouseReleased events.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Ignore mouseEntered events.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Ignore mouseExited events.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Ignore mouseClicked events.

Specified by:
mouseClicked in interface java.awt.event.MouseListener