StylusEvent

站在用户的角度思考问题,与客户深入沟通,找到三沙网站设计与三沙网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:网站建设、做网站、企业官网、英文网站、手机端网站、网站推广、域名注册、雅安服务器托管、企业邮箱。业务覆盖三沙地区。
java.lang.Object
|---ohos.multimodalinput.event.MultimodalEvent
|---|---ohos.multimodalinput.event.ManipulationEvent
|---|---|---ohos.multimodalinput.event.StylusEvent
public abstract class StylusEvent
extends ManipulationEvent报告触控笔事件。
报告的事件包含按钮状态更改和触控笔操作(按下、滑动或抬起)等信息。 目前,一个事件仅支持一个触控笔动作。
Since:
5
嵌套类摘要
| 从接口 ohos.utils.Sequenceable 继承的嵌套类/接口 |
|---|
| Sequenceable.ProducerT |
字段摘要
| 修饰符和类型 | 字段 | 描述 |
|---|---|---|
| static int | BUTTON_PRESS | 表示触控笔按下按钮。 |
| static int | BUTTON_RELEASE | 表示触控笔抬起一个按钮。 |
| static int | FIRST_BUTTON | 指示触控笔事件中的按钮状态更改。 |
| static int | NONE | 表示手写笔不对屏幕进行任何操作。 |
| static int | NONE_BUTTON | 指示触控笔事件中没有按钮状态更改。 |
| static int | STYLUS_DOWN | 表示触控笔按在屏幕上。 |
| static int | STYLUS_MOVE | 表示触控笔在屏幕上滑动。 |
| static int | STYLUS_UP | 表示触控笔从屏幕上抬起。 |
| 从类 ohos.multimodalinput.event.ManipulationEvent 继承的字段 |
|---|
| PHASE_CANCEL, PHASE_COMPLETED, PHASE_MOVE, PHASE_NONE, PHASE_START |
| 从类 ohos.multimodalinput.event.MultimodalEvent 继承的字段 |
|---|
| BUILTIN_KEY, DEFAULT_TYPE, highLevelEvent, KEYBOARD, MOUSE, ROTATION, SPEECH, STYLUS, TOUCH_PANEL, UNSUPPORTED_DEVICE, uuid |
构造函数摘要
| 构造函数 | 描述 |
|---|---|
| StylusEvent() |
方法总结
| 修饰符和类型 | 方法 | 描述 |
|---|---|---|
| abstract int | getAction() | 获取触控笔动作。 |
| abstract int | getButtons() | 获取手写笔的按钮状态变化。 |
| 从类 ohos.multimodalinput.event.ManipulationEvent 继承的方法 |
|---|
| getForce, getPhase, getPointerCount, getPointerId, getPointerPosition, getPointerScreenPosition, getRadius, getStartTime, setScreenOffset |
| 从类 ohos.multimodalinput.event.MultimodalEvent 继承的方法 |
|---|
| getDeviceId, getInputDeviceId, getOccurredTime, getSourceDevice, getUuid, isSameEvent, marshalling, unmarshalling |
| 从类 java.lang.Object 继承的方法 |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 从接口 ohos.utils.Sequenceable 继承的方法 |
|---|
| hasFileDescriptor |
字段详细信息
BUTTON_PRESS
public static final int BUTTON_PRESS
表示触控笔按下按钮。
Since:
5
BUTTON_RELEASE
public static final int BUTTON_RELEASE
表示触控笔抬起一个按钮。
Since:
5
FIRST_BUTTON
public static final int FIRST_BUTTON
指示触控笔事件中的按钮状态更改。
Since:
5
NONE
public static final int NONE
表示手写笔不对屏幕进行任何操作。
Since:
5
NONE_BUTTON
public static final int NONE_BUTTON
指示触控笔事件中没有按钮状态更改。
Since:
5
STYLUS_DOWN
public static final int STYLUS_DOWN
表示触控笔按在屏幕上。
Since:
5
STYLUS_MOVE
public static final int STYLUS_MOVE
表示触控笔在屏幕上滑动。
Since:
5
STYLUS_UP
public static final int STYLUS_UP
表示触控笔从屏幕上抬起。
Since:
5
构造函数详细信息
StylusEvent
public StylusEvent()
方法详情
getAction
public abstract int getAction()
获取触控笔动作。
返回:
返回触控笔动作。 返回值可以是 BUTTON_PRESS、BUTTON_RELEASE、STYLUS_DOWN、STYLUS_MOVE 或 STYLUS_UP。
Since:
5
getButtons
public abstract int getButtons()
获取手写笔的按钮状态变化。
返回:
返回手写笔的按钮状态更改。 返回值可以是 FIRST_BUTTON 或 NONE_BUTTON。
Since:
5
网页名称:创新互联鸿蒙OS教程:鸿蒙OSStylusEvent
当前地址:http://www.jxjierui.cn/article/dphcpdh.html


咨询
建站咨询
