|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.touch.client.Momentum.State
public static class Momentum.State
A snapshot of the current state.
Constructor Summary | |
---|---|
Momentum.State(Point initialPosition,
Point initialVelocity)
Construct a new Momentum.State . |
Method Summary | |
---|---|
int |
getCumulativeElapsedMillis()
Get the cumulative elapsed time in milliseconds since momentum took over. |
int |
getElapsedMillis()
Get the elapsed time in milliseconds since the last time the state was updated. |
Point |
getInitialPosition()
Get the initial position when the momentum took over. |
Point |
getInitialVelocity()
Get the initial velocity in pixels per millisecond when the momentum took over. |
Point |
getPosition()
Get the current position. |
Point |
getVelocity()
Get the current velocity in pixels per millisecond. |
(package private) void |
setCumulativeElapsedMillis(int cumulativeElapsedMillis)
Set the cumulative elapsed time in milliseconds since momentum took over. |
(package private) void |
setElapsedMillis(int elapsedMillis)
Set the elapsed time in milliseconds since the last time the state was updated. |
void |
setPosition(Point position)
Set the current position. |
void |
setVelocity(Point velocity)
Get the current velocity in pixels per millisecond. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Momentum.State(Point initialPosition, Point initialVelocity)
Momentum.State
.
initialPosition
- the initial position, which is also set to the
current positioninitialVelocity
- the initial velocity in pixels per millisecond,
which is also set to the current velocityMethod Detail |
---|
public int getCumulativeElapsedMillis()
public int getElapsedMillis()
public Point getInitialPosition()
public Point getInitialVelocity()
public Point getPosition()
public Point getVelocity()
public void setPosition(Point position)
position
- set the current positionpublic void setVelocity(Point velocity)
velocity
- set the current velocityvoid setCumulativeElapsedMillis(int cumulativeElapsedMillis)
void setElapsedMillis(int elapsedMillis)
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |