|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.TimerView
com.threerings.media.HourglassView
public class HourglassView
Displays an hourglass with the sand level representing the amount of time remaining.
| Field Summary | |
|---|---|
protected Point |
_botOff
Offsets at which to render the sand images. |
protected Rectangle |
_botRect
The bounds of the sand within the top and bottom sand images. |
protected Mirage |
_hourglass
Our images. |
protected Mirage |
_sandBottom
Our images. |
protected int |
_sandFrame
The next sand frame to be painted. |
protected long |
_sandStamp
The last time the sand updated moved. |
protected Mirage |
_sandTop
Our images. |
protected MultiFrameImage |
_sandTrickle
The sand trickle. |
protected int |
_sandY
The position of the top of the sand. |
protected Point |
_topOff
Offsets at which to render the sand images. |
protected Rectangle |
_topRect
The bounds of the sand within the top and bottom sand images. |
protected static long |
SAND_RATE
How often the sand frame updates. |
| Fields inherited from class com.threerings.media.TimerView |
|---|
_bounds, _changeThreshold, _complete, _completed, _duration, _enabled, _finisher, _fmgr, _host, _invalidated, _lastUpdate, _paintComplete, _participating, _processUnpause, _renderComplete, _renderOffset, _renderOffsetTime, _running, _start, _transitionTime, _warned, _warner, _warnPercent, DEFAULT_RATE |
| Constructor Summary | |
|---|---|
HourglassView(FrameManager fmgr,
JComponent host,
int x,
int y,
Mirage glassImage,
Mirage topImage,
Rectangle topRect,
Mirage botImage,
Rectangle botRect,
MultiFrameImage sandTrickle)
Constructs an hourglass view. |
|
HourglassView(FrameManager fmgr,
JComponent host,
int x,
int y,
Mirage glassImage,
Mirage topImage,
Rectangle topRect,
Point topOff,
Mirage botImage,
Rectangle botRect,
Point botOff,
MultiFrameImage sandTrickle)
Constructs an hourglass view. |
|
| Method Summary | |
|---|---|
void |
changeComplete(float complete)
Generate an unexpected change in the timer's completion and set up the necessary details to render interpolation from the old to new states |
protected int |
getSandBottomTop(float completed)
Returns the current top coordinate of the bottom sand pile. |
void |
paint(Graphics2D gfx,
float completed)
Paint the timer into the given graphics context at the inputted percent complete (0f means just started, 1f means just finished). |
protected void |
setSandTrickleY()
Set the y position of the trickle. |
void |
tick(long tickStamp)
This is called on all registered frame participants, one for every frame. |
| Methods inherited from class com.threerings.media.TimerView |
|---|
checkFrameParticipation, getComponent, getTransitionTime, handleCompleted, handleWarning, hierarchyChanged, invalidate, needsPaint, pause, removeWarning, render, reset, running, setEnabled, setTransitionTime, setWarning, start, stop, triggeredCompleted, triggeredWarning, unpause, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Rectangle _topRect
protected Rectangle _botRect
protected Point _topOff
protected Point _botOff
protected Mirage _hourglass
protected Mirage _sandTop
protected Mirage _sandBottom
protected MultiFrameImage _sandTrickle
protected long _sandStamp
protected int _sandFrame
protected int _sandY
protected static final long SAND_RATE
| Constructor Detail |
|---|
public HourglassView(FrameManager fmgr,
JComponent host,
int x,
int y,
Mirage glassImage,
Mirage topImage,
Rectangle topRect,
Mirage botImage,
Rectangle botRect,
MultiFrameImage sandTrickle)
public HourglassView(FrameManager fmgr,
JComponent host,
int x,
int y,
Mirage glassImage,
Mirage topImage,
Rectangle topRect,
Point topOff,
Mirage botImage,
Rectangle botRect,
Point botOff,
MultiFrameImage sandTrickle)
| Method Detail |
|---|
public void changeComplete(float complete)
TimerView
changeComplete in class TimerViewpublic void tick(long tickStamp)
FrameParticipant
tick in interface FrameParticipanttick in class TimerView
public void paint(Graphics2D gfx,
float completed)
TimerView
paint in class TimerViewprotected void setSandTrickleY()
protected int getSandBottomTop(float completed)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||