Package org.apache.batik.dom.svg

Source Code of org.apache.batik.dom.svg.SVGOMFilterPrimitiveStandardAttributes

/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved.        *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* version 1.1, a copy of which has been included with this distribution in  *
* the LICENSE file.                                                         *
*****************************************************************************/

package org.apache.batik.dom.svg;

import java.lang.ref.WeakReference;
import org.apache.batik.dom.AbstractDocument;
import org.w3c.dom.svg.SVGAnimatedLength;
import org.w3c.dom.svg.SVGAnimatedString;
import org.w3c.dom.svg.SVGFilterPrimitiveStandardAttributes;

/**
* This class represents a SVGElement with support for standard filter
* attributes.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
* @version $Id: SVGOMFilterPrimitiveStandardAttributes.java,v 1.4 2001/03/26 09:45:07 tkormann Exp $
*/
public abstract class SVGOMFilterPrimitiveStandardAttributes
    extends SVGOMElement
    implements SVGFilterPrimitiveStandardAttributes {

    /**
     * The reference to the x attribute.
     */
    protected transient WeakReference xReference;

    /**
     * The reference to the y attribute.
     */
    protected transient WeakReference yReference;

    /**
     * The reference to the width attribute.
     */
    protected transient WeakReference widthReference;

    /**
     * The reference to the height attribute.
     */
    protected transient WeakReference heightReference;

    /**
     * The reference to the result attribute.
     */
    protected transient WeakReference resultReference;

    /**
     * Creates a new SVGOMFilterPrimitiveStandardAttributes object.
     */
    protected SVGOMFilterPrimitiveStandardAttributes() {
    }

    /**
     * Creates a new SVGOMFilterPrimitiveStandardAttributes object.
     * @param prefix The namespace prefix.
     * @param owner The owner document.
     */
    protected SVGOMFilterPrimitiveStandardAttributes(String prefix,
                                                     AbstractDocument owner) {
        super(prefix, owner);
    }

    /**
     * <b>DOM</b>: Implements {@link
     * org.w3c.dom.svg.SVGFilterPrimitiveStandardAttributes#getX()}.
     */
    public SVGAnimatedLength getX() {
        SVGAnimatedLength result;
        if (xReference == null ||
            (result = (SVGAnimatedLength)xReference.get()) == null) {
            result = new SVGOMAnimatedLength(this, null, SVG_X_ATTRIBUTE, null);
            xReference = new WeakReference(result);
        }
        return result;
    }

    /**
     * <b>DOM</b>: Implements {@link
     * org.w3c.dom.svg.SVGFilterPrimitiveStandardAttributes#getY()}.
     */
    public SVGAnimatedLength getY() {
        SVGAnimatedLength result;
        if (yReference == null ||
            (result = (SVGAnimatedLength)yReference.get()) == null) {
            result = new SVGOMAnimatedLength(this, null, SVG_Y_ATTRIBUTE, null);
            yReference = new WeakReference(result);
        }
        return result;
    }

    /**
     * <b>DOM</b>: Implements {@link
     * org.w3c.dom.svg.SVGFilterPrimitiveStandardAttributes#getWidth()}.
     */
    public SVGAnimatedLength getWidth() {
        SVGAnimatedLength result;
        if (widthReference == null ||
            (result = (SVGAnimatedLength)widthReference.get()) == null) {
            result = new SVGOMAnimatedLength(this, null, SVG_WIDTH_ATTRIBUTE, null);
            widthReference = new WeakReference(result);
        }
        return result;
    }

    /**
     * <b>DOM</b>: Implements {@link
     * org.w3c.dom.svg.SVGFilterPrimitiveStandardAttributes#getHeight()}.
     */
    public SVGAnimatedLength getHeight() {
        SVGAnimatedLength result;
        if (heightReference == null ||
            (result = (SVGAnimatedLength)heightReference.get()) == null) {
            result = new SVGOMAnimatedLength(this, null, SVG_HEIGHT_ATTRIBUTE, null);
            heightReference = new WeakReference(result);
        }
        return result;
    }

    /**
     * <b>DOM</b>: Implements {@link
     * org.w3c.dom.svg.SVGFilterPrimitiveStandardAttributes#getResult()}.
     */
    public SVGAnimatedString getResult() {
        SVGAnimatedString result;
        if (resultReference == null ||
            (result = (SVGAnimatedString)resultReference.get()) == null) {
            result = new SVGOMAnimatedString(this, null, SVG_RESULT_ATTRIBUTE);
            resultReference = new WeakReference(result);
        }
        return result;
    }

}
TOP

Related Classes of org.apache.batik.dom.svg.SVGOMFilterPrimitiveStandardAttributes

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.