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
ConstructorsConstructorDescriptionMouseEventTranslator(org.loboevolution.img.ImageComponent ic) Constructor for MouseEventTranslator. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidFires a motion event based on the current cursor position.voidvoidvoidvoidvoidvoidvoidvoidprotected voidregister(org.loboevolution.img.ImageComponent ic) Sets up this translator.
-
Constructor Details
-
MouseEventTranslator
public MouseEventTranslator(org.loboevolution.img.ImageComponent ic) Constructor for MouseEventTranslator.
- Parameters:
ic- aImageComponentobject.
-
-
Method Details
-
register
protected void register(org.loboevolution.img.ImageComponent ic) Sets up this translator.- Parameters:
ic- aImageComponentobject.
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
propertyChange
- Specified by:
propertyChangein 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:
mousePressedin interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener
-