Package totalcross.ui.event
Class ControlEvent
- java.lang.Object
-
- totalcross.ui.event.Event
-
- totalcross.ui.event.ControlEvent
-
- Direct Known Subclasses:
EnabledStateChangeEvent
public class ControlEvent extends Event
ControlEvent is an event posted by a control.
-
-
Field Summary
Fields Modifier and Type Field Description static intCURSOR_CHANGEDEvent sent when user called Edit.setCursorPosstatic intFOCUS_INThe event type for a focus in event.static intFOCUS_OUTThe event type for a focus out event.static intHIGHLIGHT_INThe event type for the control focus indicator changing to a new control.static intHIGHLIGHT_OUTThe event type for the control focus indicator leaving a control.static intPRESSEDThe event type for a pressed event.static intSIP_CLOSEDThe event type fot the SIP being closed by the system.static intWINDOW_CLOSEDThe 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()ControlEventupdate(Control c)Updates the control event setting the timestamp, consumed and target.-
Methods inherited from class totalcross.ui.event.Event
clearQueue, getNextAvailableEventId, isAvailable, touch
-
-
-
-
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 eventc- 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
-
-