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 classFocusListener.FocusEvent.Type
-
Constructor Summary
Constructors Constructor Description FocusEvent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActorgetRelatedActor()The actor related to the event.FocusListener.FocusEvent.TypegetType()booleanisFocused()voidreset()Resets the object for reuse.voidsetFocused(boolean focused)voidsetRelatedActor(Actor relatedActor)voidsetType(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.PoolableResets the object for reuse. Object references should be nulled and fields may be set to default values.- Specified by:
resetin interfacePool.Poolable- Overrides:
resetin 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.
-
-