public final class BrowserKeyEvent
extends java.lang.Object
Browser.forwardKeyEvent(BrowserKeyEvent)
method.
Modifier and Type | Class and Description |
---|---|
static class |
BrowserKeyEvent.KeyCode
Contains all the key codes which can be forwarded to Chromium engine.
包含可以转发给Chromium引擎的所有关键代码。 |
static class |
BrowserKeyEvent.KeyEventType
Represents key event type.
表示键事件类型。 |
static class |
BrowserKeyEvent.KeyModifiers
Represents key modifiers that can be passed to
表示可以传递给BrowserKeyEvent实例的键修饰符。 BrowserKeyEvent instance.
|
static class |
BrowserKeyEvent.KeyModifiersBuilder
A builder that allows you to construct a
一个允许您构造BrowserKeyEvent.KeyModifiers实例的构建器。 BrowserKeyEvent.KeyModifiers instance.
|
Modifier and Type | Field and Description |
---|---|
static char |
CHAR_UNDEFINED
The
未映射到有效Unicode字符的BrowserKeyEvent.KeyEventType.PRESSED和BrowserKeyEvent.KeyEventType.RELEASED事件使用此事件作为keyChar值。 BrowserKeyEvent.KeyEventType.PRESSED and
BrowserKeyEvent.KeyEventType.RELEASED events which do not map to a valid Unicode character use this for the keyChar value.
|
Constructor and Description |
---|
BrowserKeyEvent(BrowserKeyEvent.KeyEventType eventType, BrowserKeyEvent.KeyCode keyCode)
Constructs a new
BrowserKeyEvent object with the given parameters.
|
BrowserKeyEvent(BrowserKeyEvent.KeyEventType eventType, BrowserKeyEvent.KeyCode keyCode, BrowserKeyEvent.KeyModifiers modifiers)
Constructs a new
BrowserKeyEvent object with the given parameters.
|
BrowserKeyEvent(BrowserKeyEvent.KeyEventType eventType, BrowserKeyEvent.KeyCode keyCode, char keyChar)
Constructs a new
BrowserKeyEvent object with the given parameters.
|
BrowserKeyEvent(BrowserKeyEvent.KeyEventType eventType, BrowserKeyEvent.KeyCode keyCode, char keyChar, BrowserKeyEvent.KeyModifiers modifiers)
Constructs a new
BrowserKeyEvent object with the given parameters.
|
BrowserKeyEvent(BrowserKeyEvent.KeyEventType eventType, BrowserKeyEvent.KeyCode keyCode, char keyChar, BrowserKeyEvent.KeyModifiers modifiers, long when)
Constructs a new
BrowserKeyEvent object with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
BrowserKeyEvent.KeyEventType |
getEventType()
Returns the key event type of the current event.
返回当前事件的关键事件类型。 |
char |
getKeyChar()
Returns the key character of the current event.
返回当前事件的关键字符。 |
BrowserKeyEvent.KeyCode |
getKeyCode()
Returns the key code of the current event.
返回当前事件的键代码。 |
BrowserKeyEvent.KeyModifiers |
getModifiers()
Returns the key modifiers of the current event.
返回当前事件的键修饰符。 |
long |
getWhen()
Returns a long integer that specifies the time the event occurred.
返回一个长整数,该整数指定事件发生的时间。 |
public static final char CHAR_UNDEFINED
BrowserKeyEvent.KeyEventType.PRESSED
and
BrowserKeyEvent.KeyEventType.RELEASED
events which do not map to a valid Unicode character use this for the keyChar value.
public BrowserKeyEvent(BrowserKeyEvent.KeyEventType eventType, BrowserKeyEvent.KeyCode keyCode)
BrowserKeyEvent
object with the given parameters.
eventType
- the key event type.
-关键事件类型。
keyCode
- the key code.
-关键代码。
public BrowserKeyEvent(BrowserKeyEvent.KeyEventType eventType, BrowserKeyEvent.KeyCode keyCode, char keyChar)
BrowserKeyEvent
object with the given parameters.
eventType
- the key event type.
-关键事件类型。
keyCode
- the key code.
-关键代码。
keyChar
- the key char.
-关键字符。
public BrowserKeyEvent(BrowserKeyEvent.KeyEventType eventType, BrowserKeyEvent.KeyCode keyCode, BrowserKeyEvent.KeyModifiers modifiers)
BrowserKeyEvent
object with the given parameters.
eventType
- the key event type.
-关键事件类型。
keyCode
- the key code.
-关键代码。
modifiers
- the key modifiers.
-关键修饰符。
java.lang.IllegalArgumentException
- when the
modifiers
parameter is
null
.
public BrowserKeyEvent(BrowserKeyEvent.KeyEventType eventType, BrowserKeyEvent.KeyCode keyCode, char keyChar, BrowserKeyEvent.KeyModifiers modifiers)
BrowserKeyEvent
object with the given parameters.
eventType
- the key event type.
-关键事件类型。
keyCode
- the key code.
-关键代码。
keyChar
- the key char.
-关键字符。
modifiers
- the key modifiers.
-关键修饰符。
java.lang.IllegalArgumentException
- when the
modifiers
parameter is
null
.
public BrowserKeyEvent(BrowserKeyEvent.KeyEventType eventType, BrowserKeyEvent.KeyCode keyCode, char keyChar, BrowserKeyEvent.KeyModifiers modifiers, long when)
BrowserKeyEvent
object with the given parameters.
eventType
- the key event type.
-关键事件类型。
keyCode
- the key code.
-关键代码。
keyChar
- the key char.
-关键字符。
modifiers
- the key modifiers.
-关键修饰符。
when
- the time in milliseconds when the event occurred.
-事件发生的时间(以毫秒为单位)。
java.lang.IllegalArgumentException
- when the
modifiers
parameter is
null
.
java.lang.IllegalArgumentException
- when the
when
parameter is negative.
public BrowserKeyEvent.KeyCode getKeyCode()
public BrowserKeyEvent.KeyEventType getEventType()
public char getKeyChar()
public BrowserKeyEvent.KeyModifiers getModifiers()
public long getWhen()