Class FocusListener.FocusEvent
- java.lang.Object
-
- com.badlogic.gdx.scenes.scene2d.Event
-
- com.badlogic.gdx.scenes.scene2d.utils.FocusListener.FocusEvent
-
- All Implemented Interfaces:
Pool.Poolable
- Enclosing class:
- FocusListener
public static class FocusListener.FocusEvent extends Event
Fired when an actor gains or loses keyboard or scroll focus. Can be cancelled to prevent losing or gaining focus.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FocusListener.FocusEvent.Type
-
Constructor Summary
Constructors Constructor Description FocusEvent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Actor
getRelatedActor()
The actor related to the event.FocusListener.FocusEvent.Type
getType()
boolean
isFocused()
void
reset()
Resets the object for reuse.void
setFocused(boolean focused)
void
setRelatedActor(Actor relatedActor)
void
setType(FocusListener.FocusEvent.Type focusType)
-
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Event
cancel, getBubbles, getListenerActor, getStage, getTarget, handle, isCancelled, isCapture, isHandled, isStopped, setBubbles, setCapture, setListenerActor, setStage, setTarget, stop
-
-
-
-
Method Detail
-
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
- Overrides:
reset
in classEvent
-
isFocused
public boolean isFocused()
-
setFocused
public void setFocused(boolean focused)
-
getType
public FocusListener.FocusEvent.Type getType()
-
setType
public void setType(FocusListener.FocusEvent.Type focusType)
-
getRelatedActor
@Null public Actor getRelatedActor()
The actor related to the event. When focus is lost, this is the new actor being focused, or null. When focus is gained, this is the previous actor that was focused, or null.
-
-