public class SmoothMover extends java.lang.Object implements java.awt.event.ActionListener
Modifier and Type | Class and Description |
---|---|
static class |
SmoothMover.SmoothMoverAdapter |
static interface |
SmoothMover.SmoothMoverListener |
static class |
SmoothMover.SmoothMoveType |
Constructor and Description |
---|
SmoothMover(double initValue) |
SmoothMover(double initValue,
SmoothMover.SmoothMoveType type) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
addListener(SmoothMover.SmoothMoverListener listener) |
double |
getDestValue() |
int |
getMoveTime() |
SmoothMover.SmoothMoveType |
getType() |
int |
getUpdateDelay() |
double |
getValue() |
boolean |
isMoving() |
void |
moveTo(double value)
Move to specified values v
|
void |
removeListener(SmoothMover.SmoothMoverListener listener) |
void |
setMoveTime(int moveTime) |
void |
setType(SmoothMover.SmoothMoveType type) |
void |
setUpdateDelay(int updateDelay) |
void |
setValue(double value)
Immediately set the value
|
void |
shutDown()
Shutdown the mover object (this actually stop internal timer and remove all listeners)
|
void |
stop() |
public SmoothMover(double initValue, SmoothMover.SmoothMoveType type)
public SmoothMover(double initValue)
public void moveTo(double value)
public boolean isMoving()
public void stop()
public void shutDown()
public int getUpdateDelay()
public void setUpdateDelay(int updateDelay)
updateDelay
- the update delay (in ms) to setpublic SmoothMover.SmoothMoveType getType()
public void setType(SmoothMover.SmoothMoveType type)
type
- the smooth type to setpublic int getMoveTime()
public void setMoveTime(int moveTime)
moveTime
- the moveTime to setpublic void setValue(double value)
public double getValue()
public double getDestValue()
public void addListener(SmoothMover.SmoothMoverListener listener)
public void removeListener(SmoothMover.SmoothMoverListener listener)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener