public class mxAnimation extends mxEventSource
mxEventSource.mxIEventListener
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DELAY
Specifies the default delay for animations in ms.
|
protected int |
delay
Default is DEFAULT_DELAY.
|
protected javax.swing.Timer |
timer
Time instance that is used for timing the animation.
|
eventListeners, eventsEnabled, eventSource
Constructor and Description |
---|
mxAnimation()
Constructs a new animation instance with the given repaint delay.
|
mxAnimation(int delay)
Constructs a new animation instance with the given repaint delay.
|
Modifier and Type | Method and Description |
---|---|
int |
getDelay()
Returns the delay for the animation.
|
boolean |
isRunning()
Returns true if the animation is running.
|
void |
setDelay(int value)
Sets the delay for the animation.
|
void |
startAnimation()
Starts the animation by repeatedly invoking updateAnimation.
|
void |
stopAnimation()
Stops the animation by deleting the timer and fires mxEvent.DONE.
|
void |
updateAnimation()
Hook for subclassers to implement the animation.
|
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
public static int DEFAULT_DELAY
protected int delay
protected javax.swing.Timer timer
public mxAnimation()
public mxAnimation(int delay)
public int getDelay()
public void setDelay(int value)
public boolean isRunning()
public void startAnimation()
public void updateAnimation()
public void stopAnimation()
Copyright (c) 2010-2017 Gaudenz Alder, JGraph Ltd. All rights reserved.