public final class WebEvent<T>
extends Event
WebEvent
instances are passed into EventHandler
s registered
with a WebEngine
by JavaScript running on a Web page. An event holds
a single data item of type T
.WebEngine
,
WebEngine.setOnAlert(<any>)
,
WebEngine.setOnResized(<any>)
,
WebEngine.setOnStatusChanged(<any>)
,
WebEngine.setOnVisibilityChanged(<any>)
Modifier and Type | Field and Description |
---|---|
static <any> |
ALERT
This event occurs when a script calls the JavaScript
alert
function. |
static <any> |
ANY
Common supertype for all Web event types.
|
private T |
data |
static <any> |
RESIZED
This event occurs when a script changes location of the JavaScript
window object. |
static <any> |
STATUS_CHANGED
This event occurs when a script changes status line text.
|
static <any> |
VISIBILITY_CHANGED
This event occurs when a script changes visibility of the JavaScript
window object. |
Constructor and Description |
---|
WebEvent(java.lang.Object source,
<any> type,
T data)
Creates a new event object.
|
Modifier and Type | Method and Description |
---|---|
T |
getData()
Returns data item carried by this event.
|
java.lang.String |
toString()
Returns a string representation of this
WebEvent object. |
public static final <any> ANY
public static final <any> RESIZED
window
object.public static final <any> STATUS_CHANGED
public static final <any> VISIBILITY_CHANGED
window
object.public static final <any> ALERT
alert
function.private final T data
public WebEvent(java.lang.Object source, <any> type, T data)
source
- the event sourcetype
- the event typedata
- the data itempublic T getData()
public java.lang.String toString()
WebEvent
object.WebEvent
object.