- java.lang.Object
-
- java.util.EventObject
-
- javafx.event.Event
-
- javafx.scene.web.WebEvent<T>
-
- All Implemented Interfaces:
Serializable
,Cloneable
public final class WebEvent<T> extends Event
WebEvent
instances are passed intoEventHandler
s registered with aWebEngine
by JavaScript running on a Web page. An event holds a single data item of typeT
.- Since:
- JavaFX 2.0
- See Also:
WebEngine
,WebEngine.setOnAlert(javafx.event.EventHandler<javafx.scene.web.WebEvent<java.lang.String>>)
,WebEngine.setOnResized(javafx.event.EventHandler<javafx.scene.web.WebEvent<javafx.geometry.Rectangle2D>>)
,WebEngine.setOnStatusChanged(javafx.event.EventHandler<javafx.scene.web.WebEvent<java.lang.String>>)
,WebEngine.setOnVisibilityChanged(javafx.event.EventHandler<javafx.scene.web.WebEvent<java.lang.Boolean>>)
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static EventType<WebEvent>
ALERT
This event occurs when a script calls the JavaScriptalert
function.static EventType<WebEvent>
ANY
Common supertype for all Web event types.static EventType<WebEvent>
RESIZED
This event occurs when a script changes location of the JavaScriptwindow
object.static EventType<WebEvent>
STATUS_CHANGED
This event occurs when a script changes status line text.static EventType<WebEvent>
VISIBILITY_CHANGED
This event occurs when a script changes visibility of the JavaScriptwindow
object.-
Fields declared in class javafx.event.Event
consumed, eventType, NULL_SOURCE_TARGET, target
-
Fields declared in class java.util.EventObject
source
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getData()
Returns data item carried by this event.String
toString()
Returns a string representation of thisWebEvent
object.-
Methods declared in class javafx.event.Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
-
Methods declared in class java.util.EventObject
getSource
-
-
-
-
Field Detail
-
RESIZED
public static final EventType<WebEvent> RESIZED
This event occurs when a script changes location of the JavaScriptwindow
object.
-
STATUS_CHANGED
public static final EventType<WebEvent> STATUS_CHANGED
This event occurs when a script changes status line text.
-
VISIBILITY_CHANGED
public static final EventType<WebEvent> VISIBILITY_CHANGED
This event occurs when a script changes visibility of the JavaScriptwindow
object.
-
-
Method Detail
-
getData
public T getData()
Returns data item carried by this event.- Returns:
- the data item
-
toString
public String toString()
Returns a string representation of thisWebEvent
object.- Overrides:
toString
in classEventObject
- Returns:
- a string representation of this
WebEvent
object.
-
-