KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > dom > svg > SVGOMClipPathElement


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.dom.svg;
19
20 import org.apache.batik.dom.AbstractDocument;
21 import org.w3c.dom.Node JavaDoc;
22 import org.w3c.dom.svg.SVGAnimatedEnumeration;
23 import org.w3c.dom.svg.SVGClipPathElement;
24
25 /**
26  * This class implements {@link SVGClipPathElement}.
27  *
28  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
29  * @version $Id: SVGOMClipPathElement.java,v 1.10 2004/08/18 07:13:14 vhardy Exp $
30  */

31 public class SVGOMClipPathElement
32     extends SVGGraphicsElement
33     implements SVGClipPathElement {
34
35     /**
36      * The clipPathUnits values.
37      */

38     protected final static String JavaDoc[] CLIP_PATH_UNITS_VALUES = {
39         "",
40         SVG_USER_SPACE_ON_USE_VALUE,
41         SVG_OBJECT_BOUNDING_BOX_VALUE
42     };
43
44     /**
45      * Creates a new SVGOMClipPathElement object.
46      */

47     protected SVGOMClipPathElement() {
48     }
49
50     /**
51      * Creates a new SVGOMClipPathElement object.
52      * @param prefix The namespace prefix.
53      * @param owner The owner document.
54      */

55     public SVGOMClipPathElement(String JavaDoc prefix, AbstractDocument owner) {
56         super(prefix, owner);
57     }
58
59     /**
60      * <b>DOM</b>: Implements {@link Node#getLocalName()}.
61      */

62     public String JavaDoc getLocalName() {
63         return SVG_CLIP_PATH_TAG;
64     }
65
66     /**
67      * <b>DOM</b>: Implements {@link SVGClipPathElement#getClipPathUnits()}.
68      */

69     public SVGAnimatedEnumeration getClipPathUnits() {
70         return getAnimatedEnumerationAttribute
71             (null, SVG_CLIP_PATH_UNITS_ATTRIBUTE, CLIP_PATH_UNITS_VALUES,
72              (short)1);
73     }
74
75     /**
76      * Returns a new uninitialized instance of this object's class.
77      */

78     protected Node JavaDoc newNode() {
79         return new SVGOMClipPathElement();
80     }
81 }
82
Popular Tags