|
||||||||||
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.Fade
public abstract class Fade
Effect that performs a Fade (in or out) on the component. This
is done by using an image of the component and altering the translucency (or
AlphaComposite
) of the Graphics2D
object
according to how far along the transition animation is.
This is an abstract class that relies on the FadeIn or FadeOut subclasses
to set up the end (FadeIn) or start (FadeOut) states appropriately.
Constructor Summary | |
---|---|
Fade()
|
Method Summary | |
---|---|
void |
setOpacity(float opacity)
|
void |
setup(java.awt.Graphics2D g2d)
This method is called prior to paint() during every
frame of the transition animation. |
Methods inherited from class org.jdesktop.animation.transitions.Effect |
---|
cleanup, getComponent, getComponentImage, getEnd, getRenderComponent, getStart, init, 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 Fade()
Method Detail |
---|
public void setOpacity(float opacity)
public void setup(java.awt.Graphics2D g2d)
paint()
during every
frame of the transition animation. It calculates the
opacity based on the elapsed fraction of the animation and
sets the AlphaComposite
value on the
Graphics2D
object appropriately.
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 |