|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.animation.transitions.Effect
org.jdesktop.animation.transitions.effects.Rotate
public class Rotate
This Effect 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(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. |
|
Rotate(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. |
|
Rotate(int degrees,
javax.swing.JComponent component)
Construct a Rotate effect for a given component with the number of degrees you wish to rotate through during the transition. |
Method Summary | |
---|---|
void |
cleanup(org.jdesktop.animation.timing.Animator animator)
Effect subclasses that create temporary objects for the transition (such as in the init() method) should override this
method and clean up those resources. |
void |
init(org.jdesktop.animation.timing.Animator animator,
Effect parentEffect)
|
void |
setRadians(double radians)
|
void |
setup(java.awt.Graphics2D g2d)
This method is called during each frame of the transition animation, prior to the call to paint() . |
Methods inherited from class org.jdesktop.animation.transitions.Effect |
---|
getComponent, getComponentImage, getEnd, getRenderComponent, getStart, paint, setBounds, setBounds, setComponentImage, setComponentStates, setEnd, setHeight, setLocation, setRenderComponent, setStart, setWidth, setX, setY |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Rotate(int degrees, javax.swing.JComponent component)
public Rotate(int degrees, int xCenter, int yCenter)
public Rotate(ComponentState start, ComponentState end, int degrees, int xCenter, int yCenter)
Method Detail |
---|
public void setRadians(double radians)
public void init(org.jdesktop.animation.timing.Animator animator, Effect parentEffect)
init
in class Effect
public void cleanup(org.jdesktop.animation.timing.Animator animator)
Effect
init()
method) should override this
method and clean up those resources. For example, TimingTarget
e.g., PropertySetter) objects added to Animator should be removed
after the transition to avoid leaking resources that may otherwise
be retained by those objects.
cleanup
in class Effect
public void setup(java.awt.Graphics2D g2d)
Effect
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.
setup
in class Effect
g2d
- the Graphics2D destination for this rendering
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |