Class FocusListener
- java.lang.Object
-
- com.badlogic.gdx.scenes.scene2d.utils.FocusListener
-
- All Implemented Interfaces:
EventListener
public abstract class FocusListener extends java.lang.Object implements EventListener
Listener forFocusListener.FocusEvent
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FocusListener.FocusEvent
Fired when an actor gains or loses keyboard or scroll focus.
-
Constructor Summary
Constructors Constructor Description FocusListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
handle(Event event)
Try to handle the given event, if it is applicable.void
keyboardFocusChanged(FocusListener.FocusEvent event, Actor actor, boolean focused)
void
scrollFocusChanged(FocusListener.FocusEvent event, Actor actor, boolean focused)
-
-
-
Method Detail
-
handle
public boolean handle(Event event)
Description copied from interface:EventListener
Try to handle the given event, if it is applicable.- Specified by:
handle
in interfaceEventListener
- Returns:
- true if the event should be considered
handled
by scene2d.
-
keyboardFocusChanged
public void keyboardFocusChanged(FocusListener.FocusEvent event, Actor actor, boolean focused)
- Parameters:
actor
- The event target, which is the actor that emitted the focus event.
-
scrollFocusChanged
public void scrollFocusChanged(FocusListener.FocusEvent event, Actor actor, boolean focused)
- Parameters:
actor
- The event target, which is the actor that emitted the focus event.
-
-