Package org.zkoss.zk.ui.event
Class Event
java.lang.Object
org.zkoss.zk.ui.event.Event
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AfterSizeEvent,BookmarkEvent,CheckEvent,ClientInfoEvent,CreateEvent,DOMExceptionEvent,ForwardEvent,FulfillEvent,HistoryPopStateEvent,InputEvent,KeyEvent,MaximizeEvent,MinimizeEvent,MouseEvent,MoveEvent,OpenEvent,ProxyEvent,ScriptErrorEvent,ScrollEvent,SelectEvent,SelectionEvent,SizeEvent,SlideEvent,SortEvent,StateChangeEvent,StubEvent,SwipeEvent,UploadEvent,URIEvent,VisibilityChangeEvent,ZIndexEvent
An event sent to the event handler of a component.
- Author:
- tomyeh
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData()Returns the data accompanies with this event, or null if not available.static EventCreates an instance ofEventbased on the specified request.final StringgetName()Returns the event name.final PagegetPage()Returns the page owning this event, or null if broadcast.final ComponentReturns the target component that receives this event, or null if broadcast.booleanReturns whether this event is propagatable.voidStops the propagation for this event.toString()
-
Constructor Details
-
Event
Constructs a simple event without target.- Parameters:
name- the name of the event- Since:
- 5.0.0
-
Event
Constructs a simple event.- Parameters:
name- the name of the eventtarget- the component to receive this event, or null to indicate broadcasting the event to all root components.
-
Event
Constructs a simple event.- Parameters:
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 data
-
-
Method Details
-
getEvent
Creates an instance ofEventbased on the specified request. -
getName
Returns the event name. -
getTarget
Returns the target component that receives this event, or null if broadcast. -
getPage
Returns the page owning this event, or null if broadcast. -
getData
Returns the data accompanies with this event, or null if not available. -
isPropagatable
public boolean isPropagatable()Returns whether this event is propagatable.Default: true.
It becomes false if
stopPropagation()is called. If true, the event will be sent to the following event listener (EventListener) being registered byComponent.addEventListener(int, java.lang.String, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event>)andPage.addEventListener(java.lang.String, org.zkoss.zk.ui.event.EventListener<? extends org.zkoss.zk.ui.event.Event>). -
stopPropagation
public void stopPropagation()Stops the propagation for this event. -
toString
-