public class mxMorphing extends mxAnimation
mxEventSource.mxIEventListener
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object[] |
cells
Optional array of cells to limit the animation to.
|
protected mxRectangle |
dirty |
protected double |
ease
Ease-off for movement towards the given vector.
|
protected mxGraphComponent |
graphComponent
Reference to the enclosing graph instance.
|
protected java.util.Map<java.lang.Object,mxPoint> |
origins
Maps from cells to origins.
|
protected mxCellStatePreview |
preview |
protected int |
step
Counts the current number of steps of the animation.
|
protected int |
steps
Specifies the maximum number of steps for the morphing.
|
DEFAULT_DELAY, delay, timer
eventListeners, eventsEnabled, eventSource
Constructor and Description |
---|
mxMorphing(mxGraphComponent graphComponent)
Constructs a new morphing instance for the given graph.
|
mxMorphing(mxGraphComponent graphComponent,
int steps,
double ease,
int delay)
Constructs a new morphing instance for the given graph.
|
Modifier and Type | Method and Description |
---|---|
protected void |
animateCell(java.lang.Object cell,
mxCellStatePreview move,
boolean recurse)
Animates the given cell state using moveState.
|
protected mxPoint |
getDelta(mxCellState state)
Returns the vector between the current rendered state and the future
location of the state after the display will be updated.
|
double |
getEase()
Returns the easing for the movements.
|
protected mxPoint |
getOriginForCell(java.lang.Object cell)
Returns the top, left corner of the given cell.
|
int |
getSteps()
Returns the number of steps for the animation.
|
void |
paint(java.awt.Graphics g) |
void |
setCells(java.lang.Object[] value)
Optional array of cells to be animated.
|
void |
setEase(double value)
Sets the easing for the movements.
|
void |
setSteps(int value)
Sets the number of steps for the animation.
|
protected void |
show(mxCellStatePreview preview)
Shows the changes in the given mxCellStatePreview.
|
void |
stopAnimation()
Stops the animation by deleting the timer and fires mxEvent.DONE.
|
protected boolean |
stopRecursion(mxCellState state,
mxPoint delta)
Returns true if the animation should not recursively find more
deltas for children if the given parent state has been animated.
|
void |
updateAnimation()
Animation step.
|
getDelay, isRunning, setDelay, startAnimation
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
protected mxGraphComponent graphComponent
protected int steps
protected int step
protected double ease
protected java.util.Map<java.lang.Object,mxPoint> origins
protected java.lang.Object[] cells
protected transient mxRectangle dirty
protected transient mxCellStatePreview preview
public mxMorphing(mxGraphComponent graphComponent)
public mxMorphing(mxGraphComponent graphComponent, int steps, double ease, int delay)
public int getSteps()
public void setSteps(int value)
public double getEase()
public void setEase(double value)
public void setCells(java.lang.Object[] value)
public void updateAnimation()
updateAnimation
in class mxAnimation
public void stopAnimation()
mxAnimation
stopAnimation
in class mxAnimation
protected void show(mxCellStatePreview preview)
protected void animateCell(java.lang.Object cell, mxCellStatePreview move, boolean recurse)
protected boolean stopRecursion(mxCellState state, mxPoint delta)
protected mxPoint getDelta(mxCellState state)
protected mxPoint getOriginForCell(java.lang.Object cell)
public void paint(java.awt.Graphics g)
Copyright (c) 2010-2017 Gaudenz Alder, JGraph Ltd. All rights reserved.