Modifier and Type | Class and Description |
---|---|
static class |
View.Capability |
static class |
View.EventHandler |
Modifier and Type | Field and Description |
---|---|
(package private) static boolean |
accessible |
private static int |
clickCount |
private static boolean |
dragProcessed |
private ClipboardAssistance |
dropSourceAssistant |
(package private) ClipboardAssistance |
dropTargetAssistant |
private View.EventHandler |
eventHandler |
static double |
GESTURE_NO_DOUBLE_VALUE |
static int |
GESTURE_NO_VALUE |
private int |
height |
static byte |
IME_ATTR_CONVERTED |
static byte |
IME_ATTR_INPUT |
static byte |
IME_ATTR_INPUT_ERROR |
static byte |
IME_ATTR_TARGET_CONVERTED |
static byte |
IME_ATTR_TARGET_NOTCONVERTED |
private boolean |
inFullscreen |
private boolean |
isValid |
private boolean |
isVisible |
private static int |
lastClickedButton |
private static long |
lastClickedTime |
private static java.lang.ref.WeakReference<View> |
lastClickedView |
private static int |
lastClickedX |
private static int |
lastClickedY |
private long |
ptr |
private int |
width |
private Window |
window |
Modifier | Constructor and Description |
---|---|
protected |
View() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
_begin(long ptr) |
protected abstract boolean |
_close(long ptr) |
protected abstract long |
_create(java.util.Map capabilities) |
protected abstract void |
_enableInputMethodEvents(long ptr,
boolean enable) |
protected abstract void |
_end(long ptr) |
protected abstract boolean |
_enterFullscreen(long ptr,
boolean animate,
boolean keepRatio,
boolean hideCursor) |
protected abstract void |
_exitFullscreen(long ptr,
boolean animate) |
protected void |
_finishInputMethodComposition(long ptr) |
protected abstract int |
_getNativeFrameBuffer(long ptr) |
protected abstract long |
_getNativeView(long ptr) |
protected abstract int |
_getX(long ptr) |
protected abstract int |
_getY(long ptr) |
protected abstract void |
_scheduleRepaint(long ptr) |
protected abstract void |
_setParent(long ptr,
long parentPtr) |
protected abstract void |
_uploadPixels(long ptr,
Pixels pixels) |
private void |
checkNotClosed() |
void |
close() |
void |
enableInputMethodEvents(boolean enable) |
boolean |
enterFullscreen(boolean animate,
boolean keepRatio,
boolean hideCursor) |
void |
exitFullscreen(boolean animate) |
void |
finishInputMethodComposition() |
(package private) long |
getAccessible()
Returns the accessible object for the view.
|
View.EventHandler |
getEventHandler() |
int |
getHeight() |
private double[] |
getInputMethodCandidatePos(int offset) |
static int |
getMultiClickMaxX() |
static int |
getMultiClickMaxY() |
static long |
getMultiClickTime() |
int |
getNativeFrameBuffer()
Called on the renderer thread and must be between lock and unlock
|
int |
getNativeRemoteLayerId(java.lang.String serverName)
Only used on Mac when run inside a plugin
|
long |
getNativeView()
On Windows ptr is a pointer to a native structure.
|
int |
getWidth() |
Window |
getWindow() |
int |
getX()
X coordinate relative to the host (window or applet).
|
int |
getY()
Y coordinate relative to the host (window or applet).
|
void |
handleBeginTouchEvent(View view,
long time,
int modifiers,
boolean isDirect,
int touchEventCount) |
private int |
handleDragDrop(int x,
int y,
int xAbs,
int yAbs,
int recommendedDropAction,
ClipboardAssistance dropTargetAssistant) |
private void |
handleDragEnd(int performedAction) |
private int |
handleDragEnter(int x,
int y,
int xAbs,
int yAbs,
int recommendedDropAction,
ClipboardAssistance dropTargetAssistant) |
private void |
handleDragLeave(ClipboardAssistance dropTargetAssistant) |
private int |
handleDragOver(int x,
int y,
int xAbs,
int yAbs,
int recommendedDropAction,
ClipboardAssistance dropTargetAssistant) |
private void |
handleDragStart(int button,
int x,
int y,
int xAbs,
int yAbs,
ClipboardAssistance dropSourceAssistant) |
void |
handleEndTouchEvent(View view,
long time) |
private void |
handleInputMethodEvent(long time,
java.lang.String text,
int[] clauseBoundary,
int[] attrBoundary,
byte[] attrValue,
int commitCount,
int cursorPos) |
private void |
handleKeyEvent(long time,
int action,
int keyCode,
char[] keyChars,
int modifiers) |
private void |
handleMenuEvent(int x,
int y,
int xAbs,
int yAbs,
boolean isKeyboardTrigger) |
private void |
handleMouseEvent(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) |
void |
handleRotateGestureEvent(View view,
long time,
int type,
int modifiers,
boolean isDirect,
boolean isInertia,
int originx,
int originy,
int originxAbs,
int originyAbs,
double dangle,
double totalangle) |
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) |
void |
handleSwipeGestureEvent(View view,
long time,
int type,
int modifiers,
boolean isDirect,
boolean isInertia,
int touchCount,
int dir,
int originx,
int originy,
int originxAbs,
int originyAbs) |
private void |
handleViewEvent(long time,
int type) |
void |
handleZoomGestureEvent(View view,
long time,
int type,
int modifiers,
boolean isDirect,
boolean isInertia,
int originx,
int originy,
int originxAbs,
int originyAbs,
double scale,
double expansion,
double totalscale,
double totalexpansion) |
boolean |
isClosed() |
boolean |
isInFullscreen() |
void |
lock()
prepares to painting by locking native surface
Called on the render thread
|
void |
notifyBeginTouchEvent(int modifiers,
boolean isDirect,
int touchEventCount) |
protected int |
notifyDragDrop(int x,
int y,
int xAbs,
int yAbs,
int recommendedDropAction) |
protected void |
notifyDragEnd(int performedAction) |
protected int |
notifyDragEnter(int x,
int y,
int xAbs,
int yAbs,
int recommendedDropAction) |
protected void |
notifyDragLeave() |
protected int |
notifyDragOver(int x,
int y,
int xAbs,
int yAbs,
int recommendedDropAction) |
protected void |
notifyDragStart(int button,
int x,
int y,
int xAbs,
int yAbs) |
void |
notifyEndTouchEvent() |
protected void |
notifyInputMethod(java.lang.String text,
int[] clauseBoundary,
int[] attrBoundary,
byte[] attrValue,
int committedTextLength,
int caretPos,
int visiblePos) |
protected double[] |
notifyInputMethodCandidatePosRequest(int offset) |
protected void |
notifyKey(int type,
int keyCode,
char[] keyChars,
int modifiers) |
protected void |
notifyMenu(int x,
int y,
int xAbs,
int yAbs,
boolean isKeyboardTrigger) |
protected void |
notifyMouse(int type,
int button,
int x,
int y,
int xAbs,
int yAbs,
int modifiers,
boolean isPopupTrigger,
boolean isSynthesized) |
void |
notifyNextTouchEvent(int type,
long touchId,
int x,
int y,
int xAbs,
int yAbs) |
protected void |
notifyRepaint(int x,
int y,
int width,
int height) |
protected void |
notifyResize(int width,
int height) |
void |
notifyRotateGestureEvent(int type,
int modifiers,
boolean isDirect,
boolean isInertia,
int originx,
int originy,
int originxAbs,
int originyAbs,
double dangle,
double totalangle) |
protected void |
notifyScroll(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) |
void |
notifyScrollGestureEvent(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) |
void |
notifySwipeGestureEvent(int type,
int modifiers,
boolean isDirect,
boolean isInertia,
int touchCount,
int dir,
int originx,
int originy,
int originxAbs,
int originyAbs) |
protected void |
notifyView(int type) |
void |
notifyZoomGestureEvent(int type,
int modifiers,
boolean isDirect,
boolean isInertia,
int originx,
int originy,
int originxAbs,
int originyAbs,
double scale,
double expansion,
double totalscale,
double totalexpansion) |
void |
scheduleRepaint()
marks native surface dirty, so the system itself will create repaint event
|
void |
setEventHandler(View.EventHandler eventHandler) |
(package private) void |
setVisible(boolean visible) |
(package private) void |
setWindow(Window window) |
boolean |
toggleFullscreen(boolean animate,
boolean keepRatio,
boolean hideCursor) |
void |
unlock()
ends painting by unlocking native surface and flushing
flushes surface (if flush == true) or discard it (flush == false)
Called on the render thread
|
void |
uploadPixels(Pixels pixels)
This method dumps the pixels on to the view.
|
public static final int GESTURE_NO_VALUE
public static final double GESTURE_NO_DOUBLE_VALUE
public static final byte IME_ATTR_INPUT
public static final byte IME_ATTR_TARGET_CONVERTED
public static final byte IME_ATTR_CONVERTED
public static final byte IME_ATTR_TARGET_NOTCONVERTED
public static final byte IME_ATTR_INPUT_ERROR
static final boolean accessible
private volatile long ptr
private Window window
private View.EventHandler eventHandler
private int width
private int height
private boolean isValid
private boolean isVisible
private boolean inFullscreen
private static java.lang.ref.WeakReference<View> lastClickedView
private static int lastClickedButton
private static long lastClickedTime
private static int lastClickedX
private static int lastClickedY
private static int clickCount
private static boolean dragProcessed
private ClipboardAssistance dropSourceAssistant
ClipboardAssistance dropTargetAssistant
public static long getMultiClickTime()
public static int getMultiClickMaxX()
public static int getMultiClickMaxY()
protected abstract void _enableInputMethodEvents(long ptr, boolean enable)
protected void _finishInputMethodComposition(long ptr)
protected abstract long _create(java.util.Map capabilities)
private void checkNotClosed()
public boolean isClosed()
protected abstract long _getNativeView(long ptr)
public long getNativeView()
public int getNativeRemoteLayerId(java.lang.String serverName)
public Window getWindow()
protected abstract int _getX(long ptr)
public int getX()
protected abstract int _getY(long ptr)
public int getY()
public int getWidth()
public int getHeight()
protected abstract void _setParent(long ptr, long parentPtr)
void setWindow(Window window)
void setVisible(boolean visible)
protected abstract boolean _close(long ptr)
public void close()
public View.EventHandler getEventHandler()
public void setEventHandler(View.EventHandler eventHandler)
private void handleViewEvent(long time, int type)
private void handleKeyEvent(long time, int action, int keyCode, char[] keyChars, int modifiers)
private void handleMouseEvent(long time, int type, int button, int x, int y, int xAbs, int yAbs, int modifiers, boolean isPopupTrigger, boolean isSynthesized)
private void handleMenuEvent(int x, int y, int xAbs, int yAbs, boolean isKeyboardTrigger)
public void handleBeginTouchEvent(View view, long time, int modifiers, boolean isDirect, int touchEventCount)
public void handleNextTouchEvent(View view, long time, int type, long touchId, int x, int y, int xAbs, int yAbs)
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)
public void handleZoomGestureEvent(View view, long time, int type, int modifiers, boolean isDirect, boolean isInertia, int originx, int originy, int originxAbs, int originyAbs, double scale, double expansion, double totalscale, double totalexpansion)
public void handleRotateGestureEvent(View view, long time, int type, int modifiers, boolean isDirect, boolean isInertia, int originx, int originy, int originxAbs, int originyAbs, double dangle, double totalangle)
public void handleSwipeGestureEvent(View view, long time, int type, int modifiers, boolean isDirect, boolean isInertia, int touchCount, int dir, int originx, int originy, int originxAbs, int originyAbs)
private void handleInputMethodEvent(long time, java.lang.String text, int[] clauseBoundary, int[] attrBoundary, byte[] attrValue, int commitCount, int cursorPos)
public void enableInputMethodEvents(boolean enable)
public void finishInputMethodComposition()
private double[] getInputMethodCandidatePos(int offset)
private void handleDragStart(int button, int x, int y, int xAbs, int yAbs, ClipboardAssistance dropSourceAssistant)
private void handleDragEnd(int performedAction)
private int handleDragEnter(int x, int y, int xAbs, int yAbs, int recommendedDropAction, ClipboardAssistance dropTargetAssistant)
private int handleDragOver(int x, int y, int xAbs, int yAbs, int recommendedDropAction, ClipboardAssistance dropTargetAssistant)
private void handleDragLeave(ClipboardAssistance dropTargetAssistant)
private int handleDragDrop(int x, int y, int xAbs, int yAbs, int recommendedDropAction, ClipboardAssistance dropTargetAssistant)
protected abstract void _scheduleRepaint(long ptr)
public void scheduleRepaint()
protected abstract void _begin(long ptr)
public void lock()
protected abstract void _end(long ptr)
public void unlock()
protected abstract int _getNativeFrameBuffer(long ptr)
public int getNativeFrameBuffer()
protected abstract void _uploadPixels(long ptr, Pixels pixels)
public void uploadPixels(Pixels pixels)
protected abstract boolean _enterFullscreen(long ptr, boolean animate, boolean keepRatio, boolean hideCursor)
public boolean enterFullscreen(boolean animate, boolean keepRatio, boolean hideCursor)
protected abstract void _exitFullscreen(long ptr, boolean animate)
public void exitFullscreen(boolean animate)
public boolean isInFullscreen()
public boolean toggleFullscreen(boolean animate, boolean keepRatio, boolean hideCursor)
protected void notifyView(int type)
protected void notifyResize(int width, int height)
protected void notifyRepaint(int x, int y, int width, int height)
protected void notifyMenu(int x, int y, int xAbs, int yAbs, boolean isKeyboardTrigger)
protected void notifyMouse(int type, int button, int x, int y, int xAbs, int yAbs, int modifiers, boolean isPopupTrigger, boolean isSynthesized)
protected void notifyScroll(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)
protected void notifyKey(int type, int keyCode, char[] keyChars, int modifiers)
protected void notifyInputMethod(java.lang.String text, int[] clauseBoundary, int[] attrBoundary, byte[] attrValue, int committedTextLength, int caretPos, int visiblePos)
protected double[] notifyInputMethodCandidatePosRequest(int offset)
protected void notifyDragStart(int button, int x, int y, int xAbs, int yAbs)
protected void notifyDragEnd(int performedAction)
protected int notifyDragEnter(int x, int y, int xAbs, int yAbs, int recommendedDropAction)
protected int notifyDragOver(int x, int y, int xAbs, int yAbs, int recommendedDropAction)
protected void notifyDragLeave()
protected int notifyDragDrop(int x, int y, int xAbs, int yAbs, int recommendedDropAction)
public void notifyBeginTouchEvent(int modifiers, boolean isDirect, int touchEventCount)
public void notifyNextTouchEvent(int type, long touchId, int x, int y, int xAbs, int yAbs)
public void notifyEndTouchEvent()
public void notifyScrollGestureEvent(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)
public void notifyZoomGestureEvent(int type, int modifiers, boolean isDirect, boolean isInertia, int originx, int originy, int originxAbs, int originyAbs, double scale, double expansion, double totalscale, double totalexpansion)
public void notifyRotateGestureEvent(int type, int modifiers, boolean isDirect, boolean isInertia, int originx, int originy, int originxAbs, int originyAbs, double dangle, double totalangle)
public void notifySwipeGestureEvent(int type, int modifiers, boolean isDirect, boolean isInertia, int touchCount, int dir, int originx, int originy, int originxAbs, int originyAbs)
long getAccessible()