Constructor and Description |
---|
EventHandler() |
Modifier and Type | Method and Description |
---|---|
double[] |
getInputMethodCandidatePos(int offset) |
Accessible |
getSceneAccessible() |
void |
handleBeginTouchEvent(View view,
long time,
int modifiers,
boolean isDirect,
int touchEventCount)
Touch event handler.
|
int |
handleDragDrop(View view,
int x,
int y,
int xAbs,
int yAbs,
int recommendedDropAction,
ClipboardAssistance dropTargetAssistant) |
void |
handleDragEnd(View view,
int performedAction) |
int |
handleDragEnter(View view,
int x,
int y,
int xAbs,
int yAbs,
int recommendedDropAction,
ClipboardAssistance dropTargetAssistant) |
void |
handleDragLeave(View view,
ClipboardAssistance dropTargetAssistant) |
int |
handleDragOver(View view,
int x,
int y,
int xAbs,
int yAbs,
int recommendedDropAction,
ClipboardAssistance dropTargetAssistant) |
void |
handleDragStart(View view,
int button,
int x,
int y,
int xAbs,
int yAbs,
ClipboardAssistance dropSourceAssistant) |
void |
handleEndTouchEvent(View view,
long time)
Touch event handler.
|
void |
handleInputMethodEvent(long time,
String text,
int[] clauseBoundary,
int[] attrBoundary,
byte[] attrValue,
int commitCount,
int cursorPos) |
void |
handleKeyEvent(View view,
long time,
int action,
int keyCode,
char[] keyChars,
int modifiers) |
void |
handleMenuEvent(View view,
int x,
int y,
int xAbs,
int yAbs,
boolean isKeyboardTrigger) |
void |
handleMouseEvent(View view,
long time,
int type,
int button,
int x,
int y,
int xAbs,
int yAbs,
int modifiers,
boolean isPopupTrigger,
boolean isSynthesized) |
void |
handleNextTouchEvent(View view,
long time,
int type,
long touchId,
int x,
int y,
int xAbs,
int yAbs)
Touch event handler.
|
void |
handleRotateGestureEvent(View view,
long time,
int type,
int modifiers,
boolean isDirect,
boolean isInertia,
int x,
int y,
int xAbs,
int yAbs,
double dangle,
double totalangle)
Rotation gesture handler.
|
void |
handleScrollEvent(View view,
long time,
int x,
int y,
int xAbs,
int yAbs,
double deltaX,
double deltaY,
int modifiers,
int lines,
int chars,
int defaultLines,
int defaultChars,
double xMultiplier,
double yMultiplier)
A Scroll event handler.
|
void |
handleScrollGestureEvent(View view,
long time,
int type,
int modifiers,
boolean isDirect,
boolean isInertia,
int touchCount,
int x,
int y,
int xAbs,
int yAbs,
double dx,
double dy,
double totaldx,
double totaldy,
double multiplierX,
double multiplierY)
Scroll gesture handler.
|
void |
handleSwipeGestureEvent(View view,
long time,
int type,
int modifiers,
boolean isDirect,
boolean isInertia,
int touchCount,
int dir,
int x,
int y,
int xAbs,
int yAbs)
Swipe gesture handler.
|
void |
handleViewEvent(View view,
long time,
int type) |
void |
handleZoomGestureEvent(View view,
long time,
int type,
int modifiers,
boolean isDirect,
boolean isInertia,
int x,
int y,
int xAbs,
int yAbs,
double scale,
double expansion,
double totalscale,
double totalexpansion)
Zoom gesture handler.
|
public void handleViewEvent(View view, long time, int type)
public void handleKeyEvent(View view, long time, int action, int keyCode, char[] keyChars, int modifiers)
public void handleMenuEvent(View view, int x, int y, int xAbs, int yAbs, boolean isKeyboardTrigger)
public void handleMouseEvent(View view, long time, int type, int button, int x, int y, int xAbs, int yAbs, int modifiers, boolean isPopupTrigger, boolean isSynthesized)
public void handleScrollEvent(View view, long time, int x, int y, int xAbs, int yAbs, double deltaX, double deltaY, int modifiers, int lines, int chars, int defaultLines, int defaultChars, double xMultiplier, double yMultiplier)
public void handleInputMethodEvent(long time, String text, int[] clauseBoundary, int[] attrBoundary, byte[] attrValue, int commitCount, int cursorPos)
public double[] getInputMethodCandidatePos(int offset)
public void handleDragStart(View view, int button, int x, int y, int xAbs, int yAbs, ClipboardAssistance dropSourceAssistant)
public void handleDragEnd(View view, int performedAction)
public int handleDragEnter(View view, int x, int y, int xAbs, int yAbs, int recommendedDropAction, ClipboardAssistance dropTargetAssistant)
public int handleDragOver(View view, int x, int y, int xAbs, int yAbs, int recommendedDropAction, ClipboardAssistance dropTargetAssistant)
public void handleDragLeave(View view, ClipboardAssistance dropTargetAssistant)
public int handleDragDrop(View view, int x, int y, int xAbs, int yAbs, int recommendedDropAction, ClipboardAssistance dropTargetAssistant)
public void handleBeginTouchEvent(View view, long time, int modifiers, boolean isDirect, int touchEventCount)
isDirect
- if event reported by direct or indirect touch device;
touch screen is an example of direct touch device and
touch pad is an example of indirect onetouchEventCount
- indicates number of #handleNextTouchEvent() calls
that will follow this method call.public void handleNextTouchEvent(View view, long time, int type, long touchId, int x, int y, int xAbs, int yAbs)
type
- touch event type. One of constants declared in
#com.sun.glass.events.TouchEvent class.touchId
- touch point identifier;
every touch point has its own unique identifier;
the identifier remains the same across multiple calls of
#handleNextTouchEvent method for the same touch point until
it is not released.x
- the X coordinate of the touch point;y
- the Y coordinate of the touch point;xAbs
- absolute X coordinate of the touch point;yAbs
- absolute Y coordinate of the touch point;handleBeginTouchEvent(com.sun.glass.ui.View, long, int, boolean, int)
public void handleEndTouchEvent(View view, long time)
public void handleScrollGestureEvent(View view, long time, int type, int modifiers, boolean isDirect, boolean isInertia, int touchCount, int x, int y, int xAbs, int yAbs, double dx, double dy, double totaldx, double totaldy, double multiplierX, double multiplierY)
type
- gesture state. One of constants declared in
#com.sun.glass.events.GestureEvent class.isInertia
- if gesture is caused by inertia.touchCount
- number of touch points at
the moment of gesture execution; it is always set to
View.GESTURE_NO_VALUE constant if value of type argument is
set to com.sun.glass.events.GestureEvent.GESTURE_FINISHED
constantx
- the X coordinate of the gesture;y
- the Y coordinate of the gesture;xAbs
- absolute X coordinate of the gesture;yAbs
- absolute Y coordinate of the gesture;dx
- horizontal scroll delta. Positive if scrolling from
left to right, non-positive otherwisedy
- vertical scroll delta. Positive if scrolling from
up to down, non-positive otherwisetotaldx
- total horizontal scroll calculated from all
sequential scroll gestures, i.e. sum of all 'dx' values from
previous sequential calls to this methodtotaldy
- total vertical scroll calculated from all
sequential scroll gestures, i.e. sum of all 'dy' values from
previous sequential calls to this methodmultiplierX
- the X multipliermultiplierY
- the Y multiplier
Multiplers are used when an app receives a non-zero unit values (i.e.
either the lines or chars are not zeroes), but wants instead get delta
values in pixels. In this case the app needs to multiply the deltas
on the provided multiplier parameter.public void handleZoomGestureEvent(View view, long time, int type, int modifiers, boolean isDirect, boolean isInertia, int x, int y, int xAbs, int yAbs, double scale, double expansion, double totalscale, double totalexpansion)
scale
- current zoom delta; the value is multiplicative
and not additive.expansion
- current expansion delta. Measured in pixels on
direct touch input devices and normalized values on indirect
touch input devices. See #handleBeginTouchEvent for
description of units of indirect touch input devices.totalscale
- total zoom calculated from all
sequential zoom gestures, i.e. sum of all 'scale' values from
previous sequential calls to this methodtotalexpansion
- total expansion calculated from all
sequential zoom gestures, i.e. sum of all 'expansion' values
from previous sequential calls of this methodpublic void handleRotateGestureEvent(View view, long time, int type, int modifiers, boolean isDirect, boolean isInertia, int x, int y, int xAbs, int yAbs, double dangle, double totalangle)
dangle
- current angle delta in degrees. Positive for clockwise
rotationtotalangle
- total angle calculated from all
sequential rotation gestures, i.e. sum of all 'dangle' values
from previous sequential calls of this methodpublic void handleSwipeGestureEvent(View view, long time, int type, int modifiers, boolean isDirect, boolean isInertia, int touchCount, int dir, int x, int y, int xAbs, int yAbs)
dir
- gesture direction.
One of constants defined in com.sun.glass.events.SwipeGesture
class.public Accessible getSceneAccessible()
Copyright © 2020. All rights reserved.