com.gargoylesoftware.htmlunit
Class WebWindowEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.gargoylesoftware.htmlunit.WebWindowEvent
All Implemented Interfaces:
java.io.Serializable

public final class WebWindowEvent
extends java.util.EventObject

An event that will be fired when a WebWindow changes.

Version:
$Revision: 1.3 $
Author:
Mike Bowler, David K. Taylor
See Also:
Serialized Form

Field Summary
static int CHANGE
 The content of the window has changed
static int CLOSE
 A window has closed
static int OPEN
 A window has opened
 
Constructor Summary
WebWindowEvent(WebWindow webWindow, int type, Page oldPage, Page newPage)
 Create an instance
 
Method Summary
 boolean equals(java.lang.Object object)
 Return true if the two objects are equal
 int getEventType()
  
 Page getNewPage()
 Return the oldPage
 Page getOldPage()
 Return the oldPage
 WebWindow getWebWindow()
 Return the web window that fired the event.
 int hashCode()
 Return the hash code for this object.
 java.lang.String toString()
 Return a string representation of this event
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CHANGE

public static final int CHANGE
The content of the window has changed

See Also:
Constant Field Values

CLOSE

public static final int CLOSE
A window has closed

See Also:
Constant Field Values

OPEN

public static final int OPEN
A window has opened

See Also:
Constant Field Values
Constructor Detail

WebWindowEvent

public WebWindowEvent(WebWindow webWindow,
                      int type,
                      Page oldPage,
                      Page newPage)
Create an instance

Parameters:
webWindow - The WebWindow that caused the event
type - The type - one of OPEN, CLOSE or CHANGE
oldPage - The old contents of the web window
newPage - The new contents of the web window
Method Detail

equals

public boolean equals(java.lang.Object object)
Return true if the two objects are equal

Overrides:
equals in class java.lang.Object
Parameters:
object - The object to compare against.
Returns:
true if the two objects are equal.

getEventType

public int getEventType()
Returns:
the event type

getNewPage

public Page getNewPage()
Return the oldPage

Returns:
the page or null if the window has no page

getOldPage

public Page getOldPage()
Return the oldPage

Returns:
the page or null if the window has no page

getWebWindow

public WebWindow getWebWindow()
Return the web window that fired the event.

Returns:
The web window that fired the event.

hashCode

public int hashCode()
Return the hash code for this object.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code for this object.

toString

public java.lang.String toString()
Return a string representation of this event

Overrides:
toString in class java.util.EventObject
Returns:
A string representation of this event.


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.