com.badlogic.gdx.scenes.scene2d.utils
Class FocusListener.FocusEvent

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.Event
      extended by 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.

Author:
Nathan Sweet

Nested Class Summary
static class FocusListener.FocusEvent.Type
           
 
Constructor Summary
FocusListener.FocusEvent()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FocusListener.FocusEvent

public FocusListener.FocusEvent()
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 interface Pool.Poolable
Overrides:
reset in class Event

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

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.


setRelatedActor

public void setRelatedActor(Actor relatedActor)
Parameters:
relatedActor - May be null.


Copyright © 2013. All Rights Reserved.