|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zilonis.tool.ext.aerith.effects.ComponentEffect
public abstract class ComponentEffect
This is the base class for all effects that are used during
screen transitions. It is also the repository for caching and
retrieving custom effects.
Subclasses of this base class will implement the setup()
and paint() methods as appropriate to set up the
Graphics state and perform the rendering necessary to achieve the
desired effect.
| Field Summary | |
|---|---|
protected java.awt.Image |
componentImage
The image that will be used during the transition, for effects that opt to not re-render the components directly. |
protected ComponentState |
end
Information about the end state used by this effect. |
protected int |
height
Current height. |
protected boolean |
renderComponent
Flag to indicate whether effect needs to re-render Component |
protected ComponentState |
start
Information about the start state used by this effect. |
protected int |
width
Current width. |
protected int |
x
Current x location. |
protected int |
y
Current y location. |
| Constructor Summary | |
|---|---|
ComponentEffect()
|
|
| Method Summary | |
|---|---|
protected javax.swing.JComponent |
getComponent()
|
java.awt.Image |
getComponentImage()
|
ComponentState |
getEnd()
|
ComponentState |
getStart()
|
void |
paint(java.awt.Graphics2D g2d)
This method is called during each frame of the transition animation, after the call to setup(). |
protected void |
setComponentImage(java.awt.Image componentImage)
|
void |
setComponentStates(ComponentState start,
ComponentState end)
Sets both the start and end states of this Effect. |
void |
setEnd(ComponentState end)
Sets the end state of this Effect. |
void |
setStart(ComponentState start)
Sets the start state of this Effect. |
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 |
| Field Detail |
|---|
protected ComponentState start
protected ComponentState end
protected boolean renderComponent
protected java.awt.Image componentImage
protected int x
protected int y
protected int width
protected int height
| Constructor Detail |
|---|
public ComponentEffect()
| Method Detail |
|---|
protected javax.swing.JComponent getComponent()
public void setComponentStates(ComponentState start,
ComponentState end)
public void setStart(ComponentState start)
public ComponentState getStart()
public void setEnd(ComponentState end)
public ComponentState getEnd()
public java.awt.Image getComponentImage()
protected void setComponentImage(java.awt.Image componentImage)
public void setup(java.awt.Graphics2D g2d,
float fraction)
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.
g2d - the Graphics2D destination for this renderingfraction - The fraction of elapsed time in this animationpublic void paint(java.awt.Graphics2D g2d)
setup().
Subclasses will implement this method to perform whatever rendering
is necessary to paint the transitioning component into the
Graphics2D object with the desired effect.
g2d - The Graphics2D destination for this rendering. Note that
the state of this Graphics2D object is affected by the previous call
to setup so there may be no more need to perturb the
graphics state any more; you may simply want to render the component
as appropriate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||