edu.jhu.tmaj.client.image.draw
Class LabelFocusMouseListener
java.lang.Object
java.awt.event.MouseAdapter
edu.jhu.tmaj.client.image.draw.LabelFocusMouseListener
- All Implemented Interfaces:
- java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener
public final class LabelFocusMouseListener
- extends java.awt.event.MouseAdapter
A MouseListener that is attached to a JLabel, and when the mouse is pressed the JLabel gets the
Focus. A component must have the keyboard focus to be notified of a KeyEvent. Typically a
component gets the focus when the user clicks on it. This is not the case for the JLabel. For
some of the classes (TextDrawable and DeleteShapeListener), the JLabel must be able to receive
KeyEvents.
Method Summary |
void |
mousePressed(java.awt.event.MouseEvent e)
Gives focus to JLabel |
Methods inherited from class java.awt.event.MouseAdapter |
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseReleased, mouseWheelMoved |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LabelFocusMouseListener
public LabelFocusMouseListener(javax.swing.JLabel l)
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Gives focus to JLabel
- Specified by:
mousePressed
in interface java.awt.event.MouseListener
- Overrides:
mousePressed
in class java.awt.event.MouseAdapter