01: /*
02:
03: Licensed to the Apache Software Foundation (ASF) under one or more
04: contributor license agreements. See the NOTICE file distributed with
05: this work for additional information regarding copyright ownership.
06: The ASF licenses this file to You under the Apache License, Version 2.0
07: (the "License"); you may not use this file except in compliance with
08: the License. You may obtain a copy of the License at
09:
10: http://www.apache.org/licenses/LICENSE-2.0
11:
12: Unless required by applicable law or agreed to in writing, software
13: distributed under the License is distributed on an "AS IS" BASIS,
14: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: See the License for the specific language governing permissions and
16: limitations under the License.
17:
18: */
19: package org.apache.batik.dom.svg;
20:
21: /**
22: * This class provides an implementation of the {@link
23: * org.w3c.dom.svg.SVGAnimatedLength} interface.
24: *
25: * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
26: * @version $Id: SVGOMAnimatedLength.java 475477 2006-11-15 22:44:28Z cam $
27: */
28: public class SVGOMAnimatedLength extends AbstractSVGAnimatedLength {
29:
30: /**
31: * The default value if the attribute is not specified.
32: */
33: protected String defaultValue;
34:
35: /**
36: * Creates a new SVGOMAnimatedLength.
37: * @param elt The associated element.
38: * @param ns The attribute's namespace URI.
39: * @param ln The attribute's local name.
40: * @param def The default value if the attribute is not specified.
41: * @param dir The length's direction.
42: * @param nonneg Whether the length must be non-negative.
43: */
44: public SVGOMAnimatedLength(AbstractElement elt, String ns,
45: String ln, String def, short dir, boolean nonneg) {
46: super (elt, ns, ln, dir, nonneg);
47: defaultValue = def;
48: }
49:
50: /**
51: * Returns the default value to use when the associated attribute
52: * was not specified.
53: */
54: protected String getDefaultValue() {
55: return defaultValue;
56: }
57: }
|