public class Event
extends java.lang.Object
implements java.io.Serializable
Component
,
Serialized FormConstructor and Description |
---|
Event(java.lang.String name)
Constructs a simple event without target.
|
Event(java.lang.String name,
Component target)
Constructs a simple event.
|
Event(java.lang.String name,
Component target,
java.lang.Object data)
Constructs a simple event.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getData()
Returns the data accompanies with this event, or null if not available.
|
static Event |
getEvent(AuRequest request)
Creates an instance of
Event based on the specified request. |
java.lang.String |
getName()
Returns the event name.
|
Page |
getPage()
Returns the page owning this event, or null if broadcast.
|
Component |
getTarget()
Returns the target component that receives this event,
or null if broadcast.
|
boolean |
isPropagatable()
Returns whether this event is propagatable.
|
void |
stopPropagation()
Stops the propagation for this event.
|
java.lang.String |
toString() |
public Event(java.lang.String name)
name
- the name of the eventpublic Event(java.lang.String name, Component target)
name
- the name of the eventtarget
- the component to receive this event,
or null to indicate broadcasting the event to all root components.public Event(java.lang.String name, Component target, java.lang.Object data)
name
- the name of the eventtarget
- the component to receive this event,
or null to indicate broadcasting the event to all root components.data
- an arbitrary datapublic static Event getEvent(AuRequest request)
Event
based on the specified request.public final java.lang.String getName()
public final Component getTarget()
public final Page getPage()
public java.lang.Object getData()
public boolean isPropagatable()
Default: true.
It becomes false if stopPropagation()
is called.
If true, the event will be sent to the following event listener
(EventListener
) being registered by Component.addEventListener(int, java.lang.String, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event>)
and Page.addEventListener(java.lang.String, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event>)
.
public void stopPropagation()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005-2018 Potix Corporation. All Rights Reserved.