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 classFocusListener.FocusEventFired 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 booleanhandle(Event event)Try to handle the given event, if it is applicable.voidkeyboardFocusChanged(FocusListener.FocusEvent event, Actor actor, boolean focused)voidscrollFocusChanged(FocusListener.FocusEvent event, Actor actor, boolean focused)
-
-
-
Method Detail
-
handle
public boolean handle(Event event)
Description copied from interface:EventListenerTry to handle the given event, if it is applicable.- Specified by:
handlein interfaceEventListener- Returns:
- true if the event should be considered
handledby 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.
-
-