|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.extension.gui.dock.theme.smooth.SmoothChanger
public abstract class SmoothChanger
A class which counts milliseconds from 0 to duration
or in the other direction. There is no new thread, objects are inserted
in the EventDispatcher-Thread.
Field Summary | |
---|---|
private int |
current
the current location, something between 0 and duration |
private int |
duration
the duration of the change |
private long |
last
the time at the last pulse |
private javax.swing.Timer |
timer
a timer which pulses this changer |
Constructor Summary | |
---|---|
SmoothChanger()
Constructor, sets duration to 250 milliseconds. |
|
SmoothChanger(int duration)
Constructs a new changer. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
int |
getDuration()
Gets the duration of a transition |
protected abstract boolean |
isActive()
The direction of the change. |
protected abstract void |
repaint(int current)
Triggered during a transition when the counter has been changed |
void |
setDuration(int duration)
Sets the duration of the transition. |
void |
trigger()
Starts a transition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private long last
private int current
duration
private int duration
private javax.swing.Timer timer
Constructor Detail |
---|
public SmoothChanger()
duration
to 250 milliseconds.
public SmoothChanger(int duration)
duration
- the duration of one transition, should not be less than 1Method Detail |
---|
protected abstract boolean isActive()
protected abstract void repaint(int current)
current
- the counterpublic void setDuration(int duration)
duration
- the duration
java.lang.IllegalStateException
- if the duration is less than 1public int getDuration()
setDuration(int)
public void trigger()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |