|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sub_arctic.anim.time_interval
This class is handy for manipulating transitions both by the user and by the animation agent. It keeps track of when a transition is to occur and allows you to specify a time_interval either in absolute time or in various relative ways.
Field Summary | |
protected long |
_delay
|
protected long |
_duration
If used _used_duration is true, this will contain the duration. |
protected long |
_end_time
End (if known) is here |
protected int |
_related_how
If we are relative, how are we relative? Will be one of the constants AFTER_START_OF or AFTER_END_OF. |
protected transition |
_related_to
If we are relative, who are we relative to? |
protected boolean |
_specified_end
Did they specify an end time. |
protected boolean |
_specified_start
Did they specify a start time. |
protected long |
_start_time
Start (if known) is here |
protected boolean |
_used_duration
Did they specify this in terms of duration? |
static int |
AFTER_END_OF
Use this constant to express that this time interval starts after the end of some other transition. |
static int |
AFTER_START_OF
Use this constant to express that this time interval starts after the start of some other transition. |
Constructor Summary | |
time_interval()
Create a time interval that you will fill in the values for later. |
|
time_interval(int how,
transition t,
long parm)
Create one of these puppies... |
|
time_interval(long start,
long end)
Create a time_interval with a known start and end point. |
Method Summary | |
long |
delay()
Retrieve the amount of time after the start or end of the other transition if we are related to other transitions. |
long |
duration()
Return how long this interval is. |
long |
end_time()
Retrieve the end time of this interval. |
static long |
now()
What's the current time in milliseconds? |
int |
related_how()
This will return one of the relationship constants AFTER_START_OF or AFTER_END_OF if this time_interval is related to another transition. |
transition |
related_to()
Retrieve what transition we are related to, if any. |
void |
set_delay(long d)
Set the delay after a relative transition. |
void |
set_duration(long millis)
Set the interval of ending time to be a duration in milliseconds. |
void |
set_ending_time_from_now(long millis)
Set the ending time to be a particular amount of time from now. |
void |
set_ending_time(long millis)
Set the interval ending time to be a particular value in milliseconds. |
void |
set_start_time_from_now(long millis)
Set the start point to be a know point in millis from now. |
void |
set_start_time(long millis)
Set the start point to be a known point in milliseconds. |
boolean |
specified_end()
Return if the user specified an end time for this interval. |
boolean |
specified_start()
Return if the user specified a start time for this interval. |
long |
start_time()
Retrieve the start time of this interval. |
boolean |
used_duration()
Return if the user specified this interval in terms of duration. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected boolean _specified_start
protected boolean _specified_end
protected boolean _used_duration
protected long _duration
public static final int AFTER_START_OF
public static final int AFTER_END_OF
protected long _start_time
protected long _end_time
protected transition _related_to
protected int _related_how
protected long _delay
Constructor Detail |
public time_interval(int how, transition t, long parm)
int
- how how to be related to the supplied transitiontransition
- t the transition we are related tolong
- parm the amount of delay after the start or end of the
related to transitionpublic time_interval(long start, long end)
long
- start the start timelong
- end the end timepublic time_interval()
Method Detail |
public boolean used_duration()
public boolean specified_start()
public boolean specified_end()
public long duration()
public static long now()
public long start_time()
public long end_time()
public transition related_to()
public int related_how()
public long delay()
public void set_delay(long d)
long
- d the new delay valuepublic void set_duration(long millis)
long
- millis the new duration in millisecondspublic void set_ending_time(long millis)
long
- millis the new ending time in milliseconds.public void set_ending_time_from_now(long millis)
long
- millis the new ending point in time (distance from now in
milliseconds).public void set_start_time(long millis)
long
- millis the new start time in millisecondspublic void set_start_time_from_now(long millis)
long
- millis the new start time (distance from now in milliseconds)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |