Package org.loboevolution.img
Class MouseEventTranslator
java.lang.Object
org.loboevolution.img.MouseEventTranslator
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,PropertyChangeListener
,EventListener
,MouseInputListener
public class MouseEventTranslator
extends Object
implements MouseInputListener, PropertyChangeListener
Helper class that generates ImageMouseEvents by translating normal mouse
events onto the image.
-
Constructor Summary
ConstructorDescriptionMouseEventTranslator
(org.loboevolution.img.ImageComponent ic) Constructor for MouseEventTranslator. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Fires a motion event based on the current cursor position.void
void
void
void
void
void
void
void
protected void
register
(org.loboevolution.img.ImageComponent ic) Sets up this translator.
-
Constructor Details
-
MouseEventTranslator
public MouseEventTranslator(org.loboevolution.img.ImageComponent ic) Constructor for MouseEventTranslator.
- Parameters:
ic
- aImageComponent
object.
-
-
Method Details
-
register
protected void register(org.loboevolution.img.ImageComponent ic) Sets up this translator.- Parameters:
ic
- aImageComponent
object.
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
correctionalFire
protected void correctionalFire()Fires a motion event based on the current cursor position. Use this method if something other than mouse motion changed where the cursor is relative to the image. -
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-