totalcross.ui.event
Class ControlEvent

totalcross.lang.Object
  extended by totalcross.ui.event.Event
      extended by totalcross.ui.event.ControlEvent

public class ControlEvent
extends Event

ControlEvent is an event posted by a control.


Field Summary
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 WINDOW_CLOSED
          The event type for a closing window.
 
Fields inherited from class totalcross.ui.event.Event
consumed, target, timeStamp, type
 
Constructor Summary
ControlEvent()
          Constructs an empty ControlEvent.
ControlEvent(int type, Control c)
          Constructs a control event of the given type.
 
Method Summary
 String toString()
           
 ControlEvent update(Control c)
          Updates the control event setting the timestamp, consumed and target.
 
Methods inherited from class totalcross.ui.event.Event
clearQueue, getNextAvailableEventId, isAvailable, touch
 
Methods inherited from class totalcross.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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
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 String toString()
Overrides:
toString in class Event