By default an event will "bubble" up through an actor's parent's handlers (see setBubbles(boolean)).
An actor's capture listeners can stop() an event to prevent child actors from seeing it.
An Event may be marked as "handled" which will end its propagation outside of the Stage (see handle()). The default
Actor#fire(Event) will mark events handled if an EventListener returns true.
A cancelled event will be stopped and handled. Additionally, many actors will undo the side-effects of a canceled event. (See
cancel().)
InputEvent, Actor#fire(Event)
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private Actor | |
| private Stage | |
| private boolean | |
| private Actor |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | |
| public Actor | |
| public Stage | |
| public Actor | |
| public void | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| public void | setBubbles(boolean bubbles)
If true, after the event is fired on the target actor, it will also be fired on each of the parent actors, all the way to the root. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| bubbles | back to summary |
|---|---|
| private boolean bubbles | |
| cancelled | back to summary |
|---|---|
| private boolean cancelled | |
| capture | back to summary |
|---|---|
| private boolean capture | |
| handled | back to summary |
|---|---|
| private boolean handled | |
| listenerActor | back to summary |
|---|---|
| private Actor listenerActor | |
| stage | back to summary |
|---|---|
| private Stage stage | |
| stopped | back to summary |
|---|---|
| private boolean stopped | |
| targetActor | back to summary |
|---|---|
| private Actor targetActor | |
| Event | back to summary |
|---|---|
| public Event() | |
| cancel | back to summary |
|---|---|
| public void cancel() Marks this event cancelled. This | |
| getBubbles | back to summary |
|---|---|
| public boolean getBubbles() | |
| getListenerActor | back to summary |
|---|---|
| public Actor getListenerActor() Returns the actor that this listener is attached to. | |
| getStage | back to summary |
|---|---|
| public Stage getStage() The stage for the actor the event was fired on. | |
| getTarget | back to summary |
|---|---|
| public Actor getTarget() Returns the actor that the event originated from. | |
| handle | back to summary |
|---|---|
| public void handle() Marks this event as handled. This does not affect event propagation inside scene2d, but causes the | |
| isCancelled | back to summary |
|---|---|
public boolean isCancelled()
| |
| isCapture | back to summary |
|---|---|
| public boolean isCapture() If true, the event was fired during the capture phase.
| |
| isHandled | back to summary |
|---|---|
| public boolean isHandled() | |
| isStopped | back to summary |
|---|---|
public boolean isStopped()
| |
| reset | back to summary |
|---|---|
| public void reset() Implements com. Doc from com. Resets the object for reuse. Object references should be nulled and fields may be set to default values. | |
| setBubbles | back to summary |
|---|---|
| public void setBubbles(boolean bubbles) If true, after the event is fired on the target actor, it will also be fired on each of the parent actors, all the way to the root. | |
| setCapture | back to summary |
|---|---|
| public void setCapture(boolean capture) | |
| setListenerActor | back to summary |
|---|---|
| public void setListenerActor(Actor listenerActor) | |
| setStage | back to summary |
|---|---|
| public void setStage(Stage stage) | |
| setTarget | back to summary |
|---|---|
| public void setTarget(Actor targetActor) | |
| stop | back to summary |
|---|---|
| public void stop() Marks this event has being stopped. This halts event propagation. Any other listeners on the | |