public abstract class View extends Object
Modifier and Type | Class and Description |
---|---|
static class |
View.Capability |
static class |
View.EventHandler |
Modifier and Type | Field and Description |
---|---|
static double |
GESTURE_NO_DOUBLE_VALUE |
static int |
GESTURE_NO_VALUE |
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 |
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(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) |
void |
close() |
void |
enableInputMethodEvents(boolean enable) |
boolean |
enterFullscreen(boolean animate,
boolean keepRatio,
boolean hideCursor) |
void |
exitFullscreen(boolean animate) |
void |
finishInputMethodComposition() |
View.EventHandler |
getEventHandler() |
int |
getHeight() |
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(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) |
void |
handleEndTouchEvent(View view,
long time) |
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) |
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(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) |
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
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(Map capabilities)
public boolean isClosed()
protected abstract long _getNativeView(long ptr)
public long getNativeView()
public int getNativeRemoteLayerId(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)
protected abstract boolean _close(long ptr)
public void close()
public View.EventHandler getEventHandler()
public void setEventHandler(View.EventHandler eventHandler)
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)
public void enableInputMethodEvents(boolean enable)
public void finishInputMethodComposition()
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(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)
Copyright © 2020. All rights reserved.