KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > bridge > GraphicsNodeBridge


1 /*
2
3    Copyright 2000-2002 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.bridge;
19
20 import org.apache.batik.gvt.GraphicsNode;
21 import org.w3c.dom.Element JavaDoc;
22
23 /**
24  * Bridge class for creating, building, and updating a <tt>GraphicsNode</tt>
25  * according to an <tt>Element</tt>.
26  *
27  * @author <a HREF="mailto:tkormann@apache.org">Thierry Kormann</a>
28  * @version $Id: GraphicsNodeBridge.java,v 1.11 2005/03/27 08:58:30 cam Exp $
29  */

30 public interface GraphicsNodeBridge extends Bridge {
31
32     /**
33      * Creates a <tt>GraphicsNode</tt> according to the specified parameters.
34      * This is called before children have been added to the
35      * returned GraphicsNode (obviously since you construct and return it).
36      *
37      * @param ctx the bridge context to use
38      * @param e the element that describes the graphics node to build
39      * @return a graphics node that represents the specified element
40      */

41     GraphicsNode createGraphicsNode(BridgeContext ctx, Element JavaDoc e);
42
43     /**
44      * Builds using the specified BridgeContext and element, the
45      * specified graphics node. This is called after all the children
46      * of the node have been constructed and added, so it is safe to
47      * do work that depends on being able to see your children nodes
48      * in this method.
49      *
50      * @param ctx the bridge context to use
51      * @param e the element that describes the graphics node to build
52      * @param node the graphics node to build
53      */

54     void buildGraphicsNode(BridgeContext ctx, Element JavaDoc e, GraphicsNode node);
55
56     /**
57      * Returns true if the bridge handles container element, false
58      * otherwise.
59      */

60     boolean isComposite();
61
62     /**
63      * Returns true if the graphics node has to be displayed, false
64      * otherwise.
65      */

66     boolean getDisplay(Element JavaDoc e);
67
68     /**
69      * Returns the Bridge instance to be used for a single DOM
70      * element. For example, a static Bridge (i.e., a Bridge for
71      * static SVG content) will always return the same instance.
72      * A dynamic Bridge will return a new instance on each call.
73      *
74      * <!> FIX ME: Move to Bridge
75      */

76     Bridge getInstance();
77
78 }
79
Popular Tags