KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > svggen > DefaultExtensionHandler


1 /*
2
3    Copyright 2001,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.svggen;
19
20 import java.awt.Composite JavaDoc;
21 import java.awt.Paint JavaDoc;
22 import java.awt.Rectangle JavaDoc;
23 import java.awt.image.BufferedImageOp JavaDoc;
24
25 /**
26  * This implementation of the ExtensionHandler interface always
27  * returns null Nodes. In other words, it does not support any
28  * Java 2D API extensions.
29  *
30  * @author <a HREF="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
31  * @version $Id: DefaultExtensionHandler.java,v 1.6 2004/08/18 07:14:59 vhardy Exp $
32  * @see org.apache.batik.svggen.ExtensionHandler
33  */

34 public class DefaultExtensionHandler implements ExtensionHandler {
35     /**
36      * @param paint Custom Paint to be converted to SVG
37      * @param generatorContext allows the handler to build DOM objects as needed.
38      * @return an SVGPaintDescriptor
39      */

40     public SVGPaintDescriptor handlePaint(Paint JavaDoc paint,
41                                           SVGGeneratorContext generatorContext) {
42         return null;
43     }
44
45     /**
46      * @param composite Custom Composite to be converted to SVG.
47      * @param generatorContext allows the handler to build DOM objects as needed.
48      * @return an SVGCompositeDescriptor which contains a valid SVG filter,
49      * or null if the composite cannot be handled
50      *
51      */

52     public SVGCompositeDescriptor handleComposite(Composite JavaDoc composite,
53                                                   SVGGeneratorContext generatorContext) {
54         return null;
55     }
56
57     /**
58      * @param filter Custom filter to be converted to SVG.
59      * @param filterRect Rectangle, in device space, that defines the area
60      * to which filtering applies. May be null, meaning that the
61      * area is undefined.
62      * @param generatorContext allows the handler to build DOM objects as needed.
63      * @return an SVGFilterDescriptor which contains a valid SVG filter,
64      * or null if the composite cannot be handled
65      */

66     public SVGFilterDescriptor handleFilter(BufferedImageOp JavaDoc filter,
67                                             Rectangle JavaDoc filterRect,
68                                             SVGGeneratorContext generatorContext) {
69         return null;
70     }
71 }
72
Popular Tags