001: /*
002:
003: Licensed to the Apache Software Foundation (ASF) under one or more
004: contributor license agreements. See the NOTICE file distributed with
005: this work for additional information regarding copyright ownership.
006: The ASF licenses this file to You under the Apache License, Version 2.0
007: (the "License"); you may not use this file except in compliance with
008: the License. You may obtain a copy of the License at
009:
010: http://www.apache.org/licenses/LICENSE-2.0
011:
012: Unless required by applicable law or agreed to in writing, software
013: distributed under the License is distributed on an "AS IS" BASIS,
014: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: See the License for the specific language governing permissions and
016: limitations under the License.
017:
018: */
019: package org.apache.batik.dom.svg;
020:
021: import org.apache.batik.dom.AbstractDocument;
022: import org.apache.batik.dom.util.DoublyIndexedTable;
023: import org.apache.batik.util.SVGTypes;
024:
025: import org.w3c.dom.Node;
026: import org.w3c.dom.svg.SVGAnimatedString;
027: import org.w3c.dom.svg.SVGFETileElement;
028:
029: /**
030: * This class implements {@link SVGFETileElement}.
031: *
032: * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
033: * @version $Id: SVGOMFETileElement.java 489964 2006-12-24 01:30:23Z cam $
034: */
035: public class SVGOMFETileElement extends
036: SVGOMFilterPrimitiveStandardAttributes implements
037: SVGFETileElement {
038:
039: /**
040: * Table mapping XML attribute names to TraitInformation objects.
041: */
042: protected static DoublyIndexedTable xmlTraitInformation;
043: static {
044: DoublyIndexedTable t = new DoublyIndexedTable(
045: SVGOMFilterPrimitiveStandardAttributes.xmlTraitInformation);
046: t.put(null, SVG_IN_ATTRIBUTE, new TraitInformation(true,
047: SVGTypes.TYPE_CDATA));
048: xmlTraitInformation = t;
049: }
050:
051: /**
052: * The 'in' attribute value.
053: */
054: protected SVGOMAnimatedString in;
055:
056: /**
057: * Creates a new SVGOMFETileElement object.
058: */
059: protected SVGOMFETileElement() {
060: }
061:
062: /**
063: * Creates a new SVGOMFETileElement object.
064: * @param prefix The namespace prefix.
065: * @param owner The owner document.
066: */
067: public SVGOMFETileElement(String prefix, AbstractDocument owner) {
068: super (prefix, owner);
069: initializeLiveAttributes();
070: }
071:
072: /**
073: * Initializes all live attributes for this element.
074: */
075: protected void initializeAllLiveAttributes() {
076: super .initializeAllLiveAttributes();
077: initializeLiveAttributes();
078: }
079:
080: /**
081: * Initializes the live attribute values of this element.
082: */
083: private void initializeLiveAttributes() {
084: in = createLiveAnimatedString(null, SVG_IN_ATTRIBUTE);
085: }
086:
087: /**
088: * <b>DOM</b>: Implements {@link Node#getLocalName()}.
089: */
090: public String getLocalName() {
091: return SVG_FE_TILE_TAG;
092: }
093:
094: /**
095: * <b>DOM</b>: Implements {@link SVGFETileElement#getIn1()}.
096: */
097: public SVGAnimatedString getIn1() {
098: return in;
099: }
100:
101: /**
102: * Returns a new uninitialized instance of this object's class.
103: */
104: protected Node newNode() {
105: return new SVGOMFETileElement();
106: }
107:
108: /**
109: * Returns the table of TraitInformation objects for this element.
110: */
111: protected DoublyIndexedTable getTraitInformationTable() {
112: return xmlTraitInformation;
113: }
114: }
|