Package org.htmlunit
Class WebWindowEvent
java.lang.Object
java.util.EventObject
org.htmlunit.WebWindowEvent
- All Implemented Interfaces:
Serializable
An event that will be fired when a WebWindow changes.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The content of the window has changed.static final int
A window has closed.private final Page
private final Page
static final int
A window has opened.private final int
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionWebWindowEvent
(WebWindow webWindow, int type, Page oldPage, Page newPage) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the two objects are equal.int
Returns the oldPage.Returns the oldPage.Returns the web window that fired the event.int
hashCode()
Returns the hash code for this object.private static boolean
toString()
Returns a string representation of this event.Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
oldPage_
-
newPage_
-
type_
private final int type_ -
OPEN
public static final int OPENA window has opened.- See Also:
-
CLOSE
public static final int CLOSEA window has closed.- See Also:
-
CHANGE
public static final int CHANGEThe content of the window has changed.- See Also:
-
-
Constructor Details
-
Method Details
-
equals
Returns true if the two objects are equal. -
hashCode
public int hashCode()Returns the hash code for this object. -
getOldPage
Returns the oldPage.- Returns:
- the page or null if the window has no page
-
getNewPage
Returns the oldPage.- Returns:
- the page or null if the window has no page
-
getWebWindow
Returns the web window that fired the event.- Returns:
- the web window that fired the event
-
isEqual
-
toString
Returns a string representation of this event.- Overrides:
toString
in classEventObject
- Returns:
- a string representation of this event
-
getEventType
public int getEventType()- Returns:
- the event type
-