Class UITimer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Stops executing the timervoidBinds the timer to start at the given schedulevoidschedule(int timeMillis, boolean repeat, TopLevelContainer bound) Schedules this timer against any top level; see#timer(int, boolean, TopLevelContainer, Runnable).static UITimerConvenience method to schedule a UITimer more easilystatic UITimertimer(int timeMillis, boolean repeat, TopLevelContainer parent, Runnable r) Schedules a timer bound to any top level, so a component inside aWindowcan have one.static UITimerConvenience method to schedule a UITimer more easily on the current form
-
Constructor Details
-
UITimer
protected UITimer()This constructor is useful when deriving this class to implement a timer. -
UITimer
Constructor that accepts a runnable to invoke on timer elapse
Parameters
r: runnable instance
-
-
Method Details
-
timer
Convenience method to schedule a UITimer more easily
Parameters
-
timeMillis: the time from now in milliseconds -
repeat: whether the timer repeats -
parent: the form to which the timer is bound -
r: callback when the timer elapses
Returns
the timer instance
-
-
timer
Schedules a timer bound to any top level, so a component inside a
Windowcan have one.Component#getComponentForm()is null there, and a port that bound its timer to the form silently ran no timer at all inside a window.Parameters
-
timeMillis: the timer interval in milliseconds -
repeat: whether the timer repeats -
parent: the top level the timer is bound to -
r: the task to run
Returns
the scheduled timer
-
-
timer
-
schedule
Binds the timer to start at the given schedule
Parameters
-
timeMillis: the time from now in milliseconds -
repeat: whether the timer repeats -
bound: the form to which the timer is bound
-
-
schedule
Schedules this timer against any top level; see
#timer(int, boolean, TopLevelContainer, Runnable).Parameters
-
timeMillis: the timer interval in milliseconds -
repeat: whether the timer repeats -
bound: the top level the timer is bound to
-
-
cancel
public void cancel()Stops executing the timer
-