Class ComponentStateChangeEvent

java.lang.Object
com.codename1.ui.events.ActionEvent
com.codename1.ui.events.ComponentStateChangeEvent

public class ComponentStateChangeEvent extends ActionEvent
An event that is fired when the state of a component is changed to and from initialized.
  • Nested Class Summary

    Nested classes/interfaces inherited from class ActionEvent

    ActionEvent.Type
    Modifier and Type
    Class
    Description
    static enum 
    The event type, as declared when the event is created.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ComponentStateChangeEvent(Component source, boolean initialized)
    Creates a ComponentStateChangeEvent.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates if the component state is initialized.

    Methods inherited from class ActionEvent

    consume, getActualComponent, getCommand, getComponent, getDraggedComponent, getDropTarget, getEventType, getKeyEvent, getProgress, getSource, getX, getY, isConsumed, isLongEvent, isPointerPressedDuringDrag, setPointerPressedDuringDrag
    Modifier and Type
    Method
    Description
    void
    Consume the event indicating that it was handled thus preventing other action listeners from handling/receiving the event
    Identical to ActionEvent#getComponent() except for the fact that a lead component will be returned if such a lead component is available.
    If this event was sent as a result of a command action this method returns that command
    Returns the component that generated the event.
    Set in the case of a drop listener, returns the component being dragged
    Set in the case of a drop listener, returns the component on which the drop occurs
    Returns the type of the given event allowing us to have more generic event handling code and useful for debugging
    int
    If this event was triggered by a key press this method will return the appropriate keycode
    int
    Returns the numeric progress of native browser loading on Android
    The element that triggered the action event, useful for decoupling event handling code
    int
    The X position if this is a pointer event otherwise undefined
    int
    The Y position if this is a pointer event otherwise undefined
    boolean
    Returns true if the event was consumed thus indicating that it was handled.
    boolean
    Returns true for long click or long pointer event
    boolean
    Only used for pointer dragged events.
    void
    setPointerPressedDuringDrag(boolean pressed)
    Only used for pointer dragged events.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
     
    boolean
    Indicates whether some other object is "equal to" this one.
    final Class
    Returns the runtime class of an object.
    int
    Returns a hash code value for the object.
    final void
    Wakes up a single thread that is waiting on this object's monitor.
    final void
    Wakes up all threads that are waiting on this object's monitor.
    Returns a string representation of the object.
    final void
    Causes current thread to wait until another thread invokes the method or the method for this object.
    final void
    wait(long timeout)
    Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
    final void
    wait(long timeout, int nanos)
    Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
  • Constructor Details

    • ComponentStateChangeEvent

      public ComponentStateChangeEvent(Component source, boolean initialized)

      Creates a ComponentStateChangeEvent.

      Parameters
      • source: The component whose state has changed.

      • initialized: True if the component state changed to initialized. False otherwise.

  • Method Details

    • isInitialized

      public boolean isInitialized()

      Indicates if the component state is initialized.

      Returns

      True if the component state changed to initialized.