Package arc.scene.event
Class SceneEvent
java.lang.Object
arc.scene.event.SceneEvent
- All Implemented Interfaces:
Pool.Poolable
- Direct Known Subclasses:
ChangeListener.ChangeEvent
,FocusListener.FocusEvent
,InputEvent
,SceneResizeEvent
,VisibilityEvent
The base class for all events.
By default an event will "bubble" up through an element's parent's handlers.
An element's capture listeners can stop()
an event to prevent child elements from seeing it.
An Event may be marked as "handled" which will end its propagation outside of the Stage (see handle()
). The default
Element.fire(SceneEvent)
will mark events handled if an EventListener
returns true.
A cancelled event will be stopped and handled. Additionally, many elements will undo the side-effects of a canceled event. (See
cancel()
.)
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionboolean
boolean
boolean
boolean
boolean
-
Constructor Summary
-
Method Summary
-
Field Details
-
targetActor
-
listenerActor
-
capture
public boolean capture -
bubbles
public boolean bubbles -
handled
public boolean handled -
stopped
public boolean stopped -
cancelled
public boolean cancelled
-
-
Constructor Details
-
SceneEvent
public SceneEvent()
-
-
Method Details
-
handle
public void handle()Marks this event as handled. This does not affect event propagation inside scene2d, but causes theScene
event methods to return true, which will eat the event so it is not passed on to the application under the stage. -
cancel
public void cancel() -
stop
public void stop()Marks this event has being stopped. This halts event propagation. -
reset
public void reset()Description copied from interface:Pool.Poolable
Resets the object for reuse. Object references should be nulled and fields may be set to default values.- Specified by:
reset
in interfacePool.Poolable
-