Package com.mxgraph.swing.util
Class mxMorphing
java.lang.Object
com.mxgraph.util.mxEventSource
com.mxgraph.swing.util.mxAnimation
com.mxgraph.swing.util.mxMorphing
Provides animation effects.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.mxgraph.util.mxEventSource
mxEventSource.mxIEventListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object[]Optional array of cells to limit the animation to.protected mxRectangleprotected doubleEase-off for movement towards the given vector.protected mxGraphComponentReference to the enclosing graph instance.Maps from cells to origins.protected mxCellStatePreviewprotected intCounts the current number of steps of the animation.protected intSpecifies the maximum number of steps for the morphing.Fields inherited from class com.mxgraph.swing.util.mxAnimation
DEFAULT_DELAY, delay, timerFields inherited from class com.mxgraph.util.mxEventSource
eventListeners, eventsEnabled, eventSource -
Constructor Summary
ConstructorsConstructorDescriptionmxMorphing(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. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidanimateCell(Object cell, mxCellStatePreview move, boolean recurse) Animates the given cell state using moveState.protected mxPointgetDelta(mxCellState state) Returns the vector between the current rendered state and the future location of the state after the display will be updated.doublegetEase()Returns the easing for the movements.protected mxPointgetOriginForCell(Object cell) Returns the top, left corner of the given cell.intgetSteps()Returns the number of steps for the animation.voidvoidOptional array of cells to be animated.voidsetEase(double value) Sets the easing for the movements.voidsetSteps(int value) Sets the number of steps for the animation.protected voidshow(mxCellStatePreview preview) Shows the changes in the given mxCellStatePreview.voidStops the animation by deleting the timer and fires mxEvent.DONE.protected booleanstopRecursion(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.voidAnimation step.Methods inherited from class com.mxgraph.swing.util.mxAnimation
getDelay, isRunning, setDelay, startAnimationMethods inherited from class com.mxgraph.util.mxEventSource
addListener, fireEvent, fireEvent, getEventSource, isEventsEnabled, removeListener, removeListener, setEventsEnabled, setEventSource
-
Field Details
-
graphComponent
Reference to the enclosing graph instance. -
steps
protected int stepsSpecifies the maximum number of steps for the morphing. Default is 6. -
step
protected int stepCounts the current number of steps of the animation. -
ease
protected double easeEase-off for movement towards the given vector. Larger values are slower and smoother. Default is 1.5. -
origins
Maps from cells to origins. -
cells
Optional array of cells to limit the animation to. -
dirty
-
preview
-
-
Constructor Details
-
mxMorphing
Constructs a new morphing instance for the given graph. -
mxMorphing
Constructs a new morphing instance for the given graph.
-
-
Method Details
-
getSteps
public int getSteps()Returns the number of steps for the animation. -
setSteps
public void setSteps(int value) Sets the number of steps for the animation. -
getEase
public double getEase()Returns the easing for the movements. -
setEase
public void setEase(double value) Sets the easing for the movements. -
setCells
Optional array of cells to be animated. If this is not specified then all cells are checked and animated if they have been moved in the current transaction. -
updateAnimation
public void updateAnimation()Animation step.- Overrides:
updateAnimationin classmxAnimation
-
stopAnimation
public void stopAnimation()Description copied from class:mxAnimationStops the animation by deleting the timer and fires mxEvent.DONE.- Overrides:
stopAnimationin classmxAnimation
-
show
Shows the changes in the given mxCellStatePreview. -
animateCell
Animates the given cell state using moveState. -
stopRecursion
Returns true if the animation should not recursively find more deltas for children if the given parent state has been animated. -
getDelta
Returns the vector between the current rendered state and the future location of the state after the display will be updated. -
getOriginForCell
Returns the top, left corner of the given cell. -
paint
-