Class ControlEvent

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int CURSOR_CHANGED
      Event sent when user called Edit.setCursorPos
      static int FOCUS_IN
      The event type for a focus in event.
      static int FOCUS_OUT
      The event type for a focus out event.
      static int HIGHLIGHT_IN
      The event type for the control focus indicator changing to a new control.
      static int HIGHLIGHT_OUT
      The event type for the control focus indicator leaving a control.
      static int PRESSED
      The event type for a pressed event.
      static int SIP_CLOSED
      The event type fot the SIP being closed by the system.
      static int WINDOW_CLOSED
      The event type for a closing window.
    • Constructor Summary

      Constructors 
      Constructor Description
      ControlEvent()
      Constructs an empty ControlEvent.
      ControlEvent​(int type, Control c)
      Constructs a control event of the given type.
    • Field Detail

      • PRESSED

        public static final int PRESSED
        The event type for a pressed event.
        See Also:
        Constant Field Values
      • FOCUS_IN

        public static final int FOCUS_IN
        The event type for a focus in event.
        See Also:
        Constant Field Values
      • FOCUS_OUT

        public static final int FOCUS_OUT
        The event type for a focus out event.
        See Also:
        Constant Field Values
      • WINDOW_CLOSED

        public static final int WINDOW_CLOSED
        The event type for a closing window.
        See Also:
        Constant Field Values
      • HIGHLIGHT_IN

        public static final int HIGHLIGHT_IN
        The event type for the control focus indicator changing to a new control.
        See Also:
        Constant Field Values
      • HIGHLIGHT_OUT

        public static final int HIGHLIGHT_OUT
        The event type for the control focus indicator leaving a control.
        See Also:
        Constant Field Values
      • SIP_CLOSED

        public static final int SIP_CLOSED
        The event type fot the SIP being closed by the system. Works on Android and iOS. The application cannot see this event since it is interpected by the topmost Window.
        Since:
        TotalCross 1.3
        See Also:
        Constant Field Values
      • CURSOR_CHANGED

        public static final int CURSOR_CHANGED
        Event sent when user called Edit.setCursorPos
        Since:
        TotalCross 1.5
        See Also:
        Constant Field Values
    • Constructor Detail

      • ControlEvent

        public ControlEvent()
        Constructs an empty ControlEvent.
      • ControlEvent

        public ControlEvent​(int type,
                            Control c)
        Constructs a control event of the given type.
        Parameters:
        type - the type of event
        c - the target control
    • Method Detail

      • update

        public ControlEvent update​(Control c)
        Updates the control event setting the timestamp, consumed and target.
        Since:
        TotalCross 1.0
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Event