bug 32011
r=ashuk a=edburns Add an "eventData" argument to WebclientEvent and subclasses. This argument is sub-event specific. For example, when a user gets a DocumentLoadEvent, with an event type of STATUS_URL_LOAD, the eventData is a String containing the status string from the browser. git-svn-id: svn://10.0.0.236/trunk@66319 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
65240709c0
commit
7d273c0b6a
@ -38,9 +38,10 @@ public static long FETCH_INTERRUPT_EVENT_MASK = 1 << 8;
|
||||
// Constructors
|
||||
//
|
||||
|
||||
public DocumentLoadEvent(Object source, long newType)
|
||||
public DocumentLoadEvent(Object source, long newType,
|
||||
Object newEventData)
|
||||
{
|
||||
super(source, newType);
|
||||
super(source, newType, newEventData);
|
||||
}
|
||||
|
||||
} // end of class DocumentLoadEvent
|
||||
|
||||
@ -33,14 +33,18 @@ public class WebclientEvent extends EventObject
|
||||
|
||||
private long type;
|
||||
|
||||
private Object eventData;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
|
||||
public WebclientEvent(Object source, long newType)
|
||||
public WebclientEvent(Object source, long newType,
|
||||
Object newEventData)
|
||||
{
|
||||
super(source);
|
||||
type = newType;
|
||||
eventData = newEventData;
|
||||
}
|
||||
|
||||
public long getType()
|
||||
@ -48,4 +52,9 @@ public long getType()
|
||||
return type;
|
||||
}
|
||||
|
||||
public Object getEventData()
|
||||
{
|
||||
return eventData;
|
||||
}
|
||||
|
||||
} // end of class WebclientLoadEvent
|
||||
|
||||
@ -249,7 +249,8 @@ void addListener(WebclientEventListener newListener)
|
||||
|
||||
*/
|
||||
|
||||
void nativeEventOccurred(WebclientEventListener target, long eventType)
|
||||
void nativeEventOccurred(WebclientEventListener target, long eventType,
|
||||
Object eventData)
|
||||
{
|
||||
ParameterCheck.nonNull(target);
|
||||
|
||||
@ -260,7 +261,7 @@ void nativeEventOccurred(WebclientEventListener target, long eventType)
|
||||
WebclientEvent event = null;
|
||||
|
||||
if (target instanceof DocumentLoadListener) {
|
||||
event = new DocumentLoadEvent(this, eventType);
|
||||
event = new DocumentLoadEvent(this, eventType, eventData);
|
||||
}
|
||||
// else...
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user