|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object com.sun.media.BasicClock
public class BasicClock
BasicClock implements javax.media.Clock. This is not a running thread that implements the clock ticks. It just implements the math and maintains the correct states to perform the computations from media-time to time-base-time.
字段摘要 | |
---|---|
static int |
STARTED
|
static int |
STOPPED
|
从接口 javax.media.Clock 继承的字段 |
---|
RESET |
构造方法摘要 | |
---|---|
BasicClock()
|
方法摘要 | |
---|---|
long |
getMediaNanoseconds()
Get the current media time in nanoseconds. |
Time |
getMediaTime()
Return the current media time. |
float |
getRate()
Get the current presentation speed. |
int |
getState()
Return the current state of the clock in either started or stopped state. |
Time |
getStopTime()
Return the preset stop time. |
Time |
getSyncTime()
Return the Sync Time. |
TimeBase |
getTimeBase()
Get the Time Base that the clock is currently using. |
Time |
mapToTimeBase(Time t)
Map the the given media-time to time-base-time. |
protected void |
setMediaLength(long t)
Set the upper bound of the media time. |
protected void |
setMediaStart(long t)
Set the lower bound of the media time. |
void |
setMediaTime(Time now)
Set the media time. |
float |
setRate(float factor)
Set the rate of presentation: 1.0: normal, 2.0: twice the speed |
void |
setStopTime(Time t)
Preset a stop time in media time. |
void |
setTimeBase(TimeBase master)
Set a time base on the clock. |
void |
stop()
Stop the clock immediately. |
void |
syncStart(Time tbt)
Start the clock with the given time-base-time |
protected void |
throwError(java.lang.Error e)
|
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
public static final int STOPPED
public static final int STARTED
构造方法详细信息 |
---|
public BasicClock()
方法详细信息 |
---|
public void setTimeBase(TimeBase master) throws IncompatibleTimeBaseException
Clock
中的 setTimeBase
master
- the new master time base.
IncompatibleTimeBaseException
- thrown if clock cannot accept
the given time base.public void syncStart(Time tbt)
Clock
中的 syncStart
the
- time base time to start the clock.public void stop()
Clock
中的 stop
public void setStopTime(Time t)
Clock
中的 setStopTime
t
- the preset stop time.public Time getStopTime()
Clock
中的 getStopTime
public void setMediaTime(Time now)
Clock
中的 setMediaTime
the
- media time to set to.public Time getMediaTime()
Clock
中的 getMediaTime
public long getMediaNanoseconds()
Clock
中的 getMediaNanoseconds
protected void setMediaStart(long t)
t
- the lower bound of the media time.protected void setMediaLength(long t)
t
- the upper bound of the media time.public int getState()
public Time getSyncTime()
Clock
中的 getSyncTime
public TimeBase getTimeBase()
Clock
中的 getTimeBase
public Time mapToTimeBase(Time t) throws ClockStoppedException
Clock
中的 mapToTimeBase
t
- media time
ClockStoppedException
- is thrown if this method is invoked
on a stopped clock.public float setRate(float factor)
Clock
中的 setRate
the
- speed factor.
public float getRate()
Clock
中的 getRate
protected void throwError(java.lang.Error e)
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |