01: package org.zilonis.tool.ext.aerith.effects;
02:
03: import java.awt.Graphics2D;
04: import java.awt.Image;
05:
06: /**
07: * Abstract class that contains the logic for rendering an image of the
08: * component during the transition, rather than rendering the component
09: * itself.
10: *
11: * @author Chet Haase
12: */
13: public abstract class ComponentImageEffect extends ComponentEffect {
14:
15: /**
16: * The image that will be rendered during the transition. This image
17: * must be created in subclasses prior to the call to <code>paint</code>.
18: */
19: protected Image targetImage;
20:
21: public ComponentImageEffect() {
22: }
23:
24: /**
25: * Copies the image into the given Graphics object
26: */
27: public void paint(Graphics2D g2d) {
28: g2d.drawImage(targetImage, 0, 0, null);
29: }
30: }
|