KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > gvt > renderer > Renderer


1 /*
2
3    Copyright 2000-2003 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.gvt.renderer;
19
20 import java.awt.Shape JavaDoc;
21 import java.awt.geom.AffineTransform JavaDoc;
22
23 import org.apache.batik.gvt.GraphicsNode;
24 import org.apache.batik.ext.awt.geom.RectListManager;
25
26 /**
27  * Interface for GVT Renderers.
28  *
29  * @author <a HREF="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
30  * @version $Id: Renderer.java,v 1.13 2005/03/27 08:58:34 cam Exp $
31  */

32 public interface Renderer {
33
34     /**
35      * This associates the given GVT Tree with this renderer.
36      * Any previous tree association is forgotten.
37      * Not certain if this should be just GraphicsNode, or CanvasGraphicsNode.
38      */

39     public void setTree(GraphicsNode treeRoot);
40
41     /**
42      * Returns the GVT tree associated with this renderer
43      */

44     public GraphicsNode getTree();
45
46     /**
47      * Repaints the associated GVT tree at least under <tt>area</tt>.
48      *
49      * @param area the region to be repainted, in the current user
50      * space coordinate system.
51      */

52     public void repaint(Shape JavaDoc area);
53
54     /**
55      * Repaints the associated GVT tree at least in areas under the
56      * list of <tt>areas</tt>.
57      *
58      * @param areas a List of regions to be repainted, in the current
59      * user space coordinate system.
60      */

61     public void repaint(RectListManager areas);
62
63     /**
64      * Sets the transform from the current user space (as defined by
65      * the top node of the GVT tree, to the associated device space.
66      */

67     public void setTransform(AffineTransform JavaDoc usr2dev);
68
69     /**
70      * Returns a copy of the transform from the current user space (as
71      * defined by the top node of the GVT tree) to the device space (1
72      * unit = 1/72nd of an inch / 1 pixel, roughly speaking
73      */

74     public AffineTransform JavaDoc getTransform();
75
76     /**
77      * Returns true if the Renderer is currently doubleBuffering is
78      * rendering requests. If it is then getOffscreen will only
79      * return completed renderings (or null if nothing is available).
80      */

81     public boolean isDoubleBuffered();
82
83     /**
84      * Turns on/off double buffering in renderer. Turning off
85      * double buffering makes it possible to see the ongoing results
86      * of a render operation.
87      */

88     public void setDoubleBuffered(boolean isDoubleBuffered);
89
90     /**
91      * Cause the renderer to ask to be removed from external reference
92      * lists, de-register as a listener to events, etc. This is so that
93      * in the absence of other existing references, it can be
94      * removed by the garbage collector.
95      */

96     public void dispose();
97
98 }
99
100
Popular Tags