public class InputEventForwarder extends java.lang.Object implements TICKeyListener, TICMouseListener, TICMouseWheelListener
AlignmentContentArea to the respective
AlignmentSubArea. For key events that is the first sequence area currently containing
the cursor and for mouse events the are containing the point where the mouse event occurred.
Instances of this class are used when AlignmentSubAreas paint directly on the toolkit
component of AlignmentContentArea (currently only optionally the case in SWT)
to allow the subareas to receive input events, even if they have no associated toolkit
component. (Since no toolkit components for the subareas exists, it is not possible to
determine the subarea owning the focus, which is why the alignment cursor position defines
the receiver subarea for key events.)
Events are not forwarded directly but copies are created that reference the respective
AlignmentSubArea as the source and mouse event coordinates are transformed to the
coordinate system origin used by the respective AlignmentSubArea.
This class is used by LibrAlign components internally. There is usually no need to reference it directly in application code.
| Constructor and Description |
|---|
InputEventForwarder(AlignmentContentArea owner) |
| Modifier and Type | Method and Description |
|---|---|
AlignmentContentArea |
getOwner() |
boolean |
keyPressed(TICKeyEvent event) |
boolean |
keyReleased(TICKeyEvent event) |
boolean |
mouseDragged(TICMouseEvent event) |
boolean |
mouseEntered(TICMouseEvent event) |
boolean |
mouseExited(TICMouseEvent event) |
boolean |
mouseMoved(TICMouseEvent event) |
boolean |
mousePressed(TICMouseEvent event) |
boolean |
mouseReleased(TICMouseEvent event) |
boolean |
mouseWheelMoved(TICMouseWheelEvent event) |
public InputEventForwarder(AlignmentContentArea owner)
public AlignmentContentArea getOwner()
public boolean keyPressed(TICKeyEvent event)
keyPressed in interface TICKeyListenerpublic boolean keyReleased(TICKeyEvent event)
keyReleased in interface TICKeyListenerpublic boolean mousePressed(TICMouseEvent event)
mousePressed in interface TICMouseListenerpublic boolean mouseReleased(TICMouseEvent event)
mouseReleased in interface TICMouseListenerpublic boolean mouseEntered(TICMouseEvent event)
mouseEntered in interface TICMouseListenerpublic boolean mouseExited(TICMouseEvent event)
mouseExited in interface TICMouseListenerpublic boolean mouseMoved(TICMouseEvent event)
mouseMoved in interface TICMouseListenerpublic boolean mouseDragged(TICMouseEvent event)
mouseDragged in interface TICMouseListenerpublic boolean mouseWheelMoved(TICMouseWheelEvent event)
mouseWheelMoved in interface TICMouseWheelListener