public class GTimer
extends java.lang.Object
void fireBall(GTimer timer){ ... }
Modifier and Type | Field and Description |
---|---|
static int |
ALL_METHOD |
static int |
CLIP_RUN |
static int |
COMBI_MODES |
static java.lang.String |
DEFAULT_SLIDER_STYLE |
static int |
DRAG_CONTROL |
static int |
DRAW_METHOD |
static char |
EOL |
static int |
EXCP_IN_HANDLER |
static int[][] |
grid |
static int |
GROUP_CONTROL_METHOD |
static int |
I_CL |
static int |
I_COVERED |
static int |
I_CR |
static int |
I_INSIDE |
static int |
I_MODES |
static int |
I_NONE |
static int |
I_TL |
static int |
I_TR |
static int |
INVALID_PAPPLET |
static int |
INVALID_TYPE |
static int |
KEY_METHOD |
static int |
MERGE_RUNS |
static int |
MISSING |
static int |
MOUSE_METHOD |
static int |
NONEXISTANT |
static int |
OFF_CONTROL |
static int |
OVER_CONTROL |
static java.awt.BasicStroke |
pen_1_0 |
static java.awt.BasicStroke |
pen_2_0 |
static java.awt.BasicStroke |
pen_3_0 |
static java.awt.BasicStroke |
pen_4_0 |
static int |
POST_METHOD |
static int |
PRE_METHOD |
static int |
PRESS_CONTROL |
static int |
SCROLLBAR_HORIZONTAL |
static int |
SCROLLBAR_VERTICAL |
static java.lang.String |
SLIDER_STYLES |
static int |
TINT_FOR_ALPHA |
static int |
TPAD2 |
static int |
TPAD4 |
static int |
TPAD6 |
static int |
TPAD8 |
static float |
WHEEL_DELTA |
static float |
WHEEL_STICK_FACTOR |
static int |
Z_PANEL |
static int |
Z_SLIPPY |
static int |
Z_SLIPPY_EXPANDS |
static int |
Z_STICKY |
Constructor and Description |
---|
GTimer(processing.core.PApplet theApplet,
java.lang.Object obj,
java.lang.String methodName,
int delay)
Create the GTimer object with this ctor.
|
GTimer(processing.core.PApplet theApplet,
java.lang.Object obj,
java.lang.String methodName,
int delay,
int initDelay)
Create the GTimer object with this ctor.
|
Modifier and Type | Method and Description |
---|---|
int |
getInitialDelay()
Get the initial delay time (milliseconds).
|
int |
getInterval()
Get the interval time (milliseconds) between
events.
|
int |
getNbrRepeats()
The number of times an event is to be fired.
|
boolean |
isRunning()
Is the timer running?
|
boolean |
isValid()
See if the GTimer object has been created successfully
|
void |
setDelay(int delay)
Sets the initial delay and the interval between events.
|
void |
setInitialDelay(int initDelay)
Set the delay before the first event is triggered
|
void |
setInterval(int interval)
Set the interval between events
|
void |
setNbrRepeats(int nbrRepeats)
The number of times an event is to be fired.
|
void |
start()
Start the timer (call the method forever)
|
void |
start(int nrepeats)
Start the timer and call the method for the number of
times indicated by nrepeats
If nrepeats is <=0 then repeat forever
|
void |
stop()
Stop the timer (can be restarted with start() method)
|
public static final java.lang.String SLIDER_STYLES
public static final java.lang.String DEFAULT_SLIDER_STYLE
public static final int DRAW_METHOD
public static final int MOUSE_METHOD
public static final int PRE_METHOD
public static final int KEY_METHOD
public static final int POST_METHOD
public static final int ALL_METHOD
public static final int GROUP_CONTROL_METHOD
public static final int MISSING
public static final int NONEXISTANT
public static final int INVALID_TYPE
public static final int INVALID_PAPPLET
public static final int EXCP_IN_HANDLER
public static final int OFF_CONTROL
public static final int OVER_CONTROL
public static final int PRESS_CONTROL
public static final int DRAG_CONTROL
public static final int TINT_FOR_ALPHA
public static final int I_NONE
public static final int I_TL
public static final int I_TR
public static final int I_CL
public static final int I_CR
public static final int I_INSIDE
public static final int I_COVERED
public static final int I_MODES
public static final int MERGE_RUNS
public static final int CLIP_RUN
public static final int COMBI_MODES
public static final int[][] grid
public static final java.awt.BasicStroke pen_1_0
public static final java.awt.BasicStroke pen_2_0
public static final java.awt.BasicStroke pen_3_0
public static final java.awt.BasicStroke pen_4_0
public static final int TPAD2
public static final int TPAD4
public static final int TPAD6
public static final int TPAD8
public static final int SCROLLBAR_VERTICAL
public static final int SCROLLBAR_HORIZONTAL
public static final float WHEEL_DELTA
public static final float WHEEL_STICK_FACTOR
public static final char EOL
public static final int Z_STICKY
public static final int Z_SLIPPY
public static final int Z_SLIPPY_EXPANDS
public static final int Z_PANEL
public GTimer(processing.core.PApplet theApplet, java.lang.Object obj, java.lang.String methodName, int delay)
theApplet
- a reference to the PApplet object (invariably this)obj
- the object that has the method to be executed (likely to be this)methodName
- the name of the method to be called by the timerdelay
- the initial delay and the time (in millisecs) between function callspublic GTimer(processing.core.PApplet theApplet, java.lang.Object obj, java.lang.String methodName, int delay, int initDelay)
theApplet
- a reference to the PApplet object (invariably this)obj
- the object that has the method to be executed (likely to be this)methodName
- the name of the method to be called by the timerdelay
- the time (in millisecs) between function callsinitDelay
- the initial delay (in millisecs) before calling methodpublic void start()
public void start(int nrepeats)
nrepeats
- public void stop()
public boolean isRunning()
public void setInterval(int interval)
interval
- delay between events in millisecondspublic void setInitialDelay(int initDelay)
initDelay
- initial delay in millisecondspublic void setDelay(int delay)
setInterval(delay); setInitialDelay(delay);
delay
- initial delay and interval in millisecondspublic int getInterval()
public int getInitialDelay()
public int getNbrRepeats()
public void setNbrRepeats(int nbrRepeats)
nbrRepeats
- <=0 keep running until stopped by userpublic boolean isValid()
Processing library G4P by Peter Lager. (c) 2017