public class MouseEventTranslator extends Object
Constructor and Description |
---|
MouseEventTranslator(Component target) |
Modifier and Type | Method and Description |
---|---|
AffineTransform |
getOriginToTargetTransform()
Gets the
AffineTransform that is used to transform a point relative
to the origin component into a point relative to the target component. |
void |
publishMouseEvent(Component underCursor,
int id,
long when,
int modifiers,
Point point,
int clickCount,
int button) |
void |
publishMouseEvent(int id,
long when,
int modifiers,
int clickCount,
int button,
Point clickedOnOrigin) |
MouseWheelEvent |
publishMouseWheelEvent(Component source,
int id,
long when,
int modifiers,
Point sourcePoint,
int clickCount,
int scrollType,
int scrollAmount,
int wheelRotation) |
MouseWheelEvent |
publishMouseWheelEvent(int id,
long when,
int modifiers,
int wheelRotation,
Point mouseOnOrigin) |
void |
setOriginToTargetTransform(AffineTransform xform)
Sets the
AffineTransform that is used to transform a point relative
to the origin component into a point relative to the target component. |
public MouseEventTranslator(Component target)
public void setOriginToTargetTransform(AffineTransform xform)
AffineTransform
that is used to transform a point relative
to the origin component into a point relative to the target component.public AffineTransform getOriginToTargetTransform()
AffineTransform
that is used to transform a point relative
to the origin component into a point relative to the target component.
Note: the returned AffineTransform
is a copy.
public void publishMouseEvent(Component underCursor, int id, long when, int modifiers, Point point, int clickCount, int button)
public void publishMouseEvent(int id, long when, int modifiers, int clickCount, int button, Point clickedOnOrigin)
public MouseWheelEvent publishMouseWheelEvent(Component source, int id, long when, int modifiers, Point sourcePoint, int clickCount, int scrollType, int scrollAmount, int wheelRotation)
public MouseWheelEvent publishMouseWheelEvent(int id, long when, int modifiers, int wheelRotation, Point mouseOnOrigin)
Copyright © 2010-2013. All Rights Reserved.