org.zilonis.tool.ext.aerith.effects
Class Rotate
java.lang.Object
org.zilonis.tool.ext.aerith.effects.ComponentEffect
org.zilonis.tool.ext.aerith.effects.Rotate
public class Rotate
- extends ComponentEffect
This ComponentEffect rotates an image through a given number of degrees
during the animated transition. It subclasses ComponentImageEffect to
use an image for redrawing the component instead of re-rendering
the component each time.
|
Constructor Summary |
Rotate(java.awt.Component component,
int degrees)
Construct a Rotate effect for a given component with the number of
degrees you wish to rotate through during the transition. |
Rotate(ComponentState start,
ComponentState end,
int degrees,
int xCenter,
int yCenter)
Construct a Rotate effect for a given component with the number
of degrees you wish to rotate through during the transition and the
center of rotation to use. |
|
Method Summary |
void |
setup(java.awt.Graphics2D g2d,
float fraction)
This method is called during each frame of the transition animation,
prior to the call to paint(). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Rotate
public Rotate(java.awt.Component component,
int degrees)
- Construct a Rotate effect for a given component with the number of
degrees you wish to rotate through during the transition. This
constructor will result in an effect that rotates around the center
of the component
Rotate
public Rotate(ComponentState start,
ComponentState end,
int degrees,
int xCenter,
int yCenter)
- Construct a Rotate effect for a given component with the number
of degrees you wish to rotate through during the transition and the
center of rotation to use.
setup
public void setup(java.awt.Graphics2D g2d,
float fraction)
- Description copied from class:
ComponentEffect
- This method is called during each frame of the transition animation,
prior to the call to
paint().
Subclasses will implement this method to set up the Graphic state,
or other related state, that will be used in the following call to
the paint() method. Note that changes to the
Graphics2D object here will still be present in the
Graphics2D object that is passed into the
paint() method, so this is a good time to set up things
such as transform state.
- Overrides:
setup in class ComponentEffect
- Parameters:
g2d - the Graphics2D destination for this renderingfraction - The fraction of elapsed time in this animation