APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.scene.web

public final Class WebEvent<T>

extends Event
Class Inheritance
Type Parameters
<T>
the type of the web event
Imports
javafx.beans.NamedArg, javafx.event.Event, .EventType

WebEvent instances are passed into EventHandlers registered with a WebEngine by JavaScript running on a Web page. An event holds a single data item of type T.
Since
JavaFX 2.0
See Also
WebEngine, WebEngine#setOnAlert, WebEngine#setOnResized, WebEngine#setOnStatusChanged, WebEngine#setOnVisibilityChanged

Field Summary

Modifier and TypeField and Description
public static final EventType<WebEvent<T>>
ALERT

This event occurs when a script calls the JavaScript alert function.

public static final EventType<WebEvent<T>>
ANY

Hides javafx.event.Event.ANY.

Common supertype for all Web event types.
private final T
public static final EventType<WebEvent<T>>
RESIZED

This event occurs when a script changes location of the JavaScript window object.

public static final EventType<WebEvent<T>>
STATUS_CHANGED

This event occurs when a script changes status line text.

public static final EventType<WebEvent<T>>
VISIBILITY_CHANGED

This event occurs when a script changes visibility of the JavaScript window object.

Inherited from javafx.event.Event:
consumedeventTypeNULL_SOURCE_TARGETtarget

Constructor Summary

AccessConstructor and Description
public
WebEvent(Object
the event source
source
,
EventType<WebEvent<T>>
the event type
type
,
T
the data item
data
)

Creates a new event object.

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

the data item
getData
()

Returns data item carried by this event.

public String

Returns:

a string representation of this WebEvent object.
toString
()

Overrides java.util.EventObject.toString.

Returns a string representation of this WebEvent object.

Inherited from javafx.event.Event:
cloneconsumecopyForfireEventgetEventTypegetTargetisConsumed

Field Detail

ALERTback to summary
public static final EventType<WebEvent<T>> ALERT

This event occurs when a script calls the JavaScript alert function.

ANYback to summary
public static final EventType<WebEvent<T>> ANY

Hides javafx.event.Event.ANY.

Common supertype for all Web event types.

databack to summary
private final T data
Annotations
@SuppressWarnings:doclint:missing
RESIZEDback to summary
public static final EventType<WebEvent<T>> RESIZED

This event occurs when a script changes location of the JavaScript window object.

STATUS_CHANGEDback to summary
public static final EventType<WebEvent<T>> STATUS_CHANGED

This event occurs when a script changes status line text.

VISIBILITY_CHANGEDback to summary
public static final EventType<WebEvent<T>> VISIBILITY_CHANGED

This event occurs when a script changes visibility of the JavaScript window object.

Constructor Detail

WebEventback to summary
public WebEvent(Object source, EventType<WebEvent<T>> type, T data)

Creates a new event object.

Parameters
source:Object

the event source

type:EventType<WebEvent<T>>

the event type

data:T

the data item

Method Detail

getDataback to summary
public T getData()

Returns data item carried by this event.

Returns:T

the data item

toStringback to summary
public String toString()

Overrides java.util.EventObject.toString.

Returns a string representation of this WebEvent object.

Returns:String

a string representation of this WebEvent object.

Annotations
@Override