All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.odftoolkit.odfdom.dom.element.svg.SvgRadialGradientElement Maven / Gradle / Ivy

The newest version!
/************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
 *
 * Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
 *
 * Use is subject to license terms.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0. You can also
 * obtain a copy of the License at http://odftoolkit.org/docs/license.txt
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 ************************************************************************/

/*
 * This file is automatically generated.
 * Don't edit manually.
 */
package org.odftoolkit.odfdom.dom.element.svg;

import org.odftoolkit.odfdom.pkg.OdfElement;
import org.odftoolkit.odfdom.pkg.ElementVisitor;
import org.odftoolkit.odfdom.pkg.OdfFileDom;
import org.odftoolkit.odfdom.pkg.OdfName;
import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
import org.odftoolkit.odfdom.dom.DefaultElementVisitor;
import org.odftoolkit.odfdom.dom.attribute.draw.DrawDisplayNameAttribute;
import org.odftoolkit.odfdom.dom.attribute.draw.DrawNameAttribute;
import org.odftoolkit.odfdom.dom.attribute.svg.SvgCxAttribute;
import org.odftoolkit.odfdom.dom.attribute.svg.SvgCyAttribute;
import org.odftoolkit.odfdom.dom.attribute.svg.SvgFxAttribute;
import org.odftoolkit.odfdom.dom.attribute.svg.SvgFyAttribute;
import org.odftoolkit.odfdom.dom.attribute.svg.SvgGradientTransformAttribute;
import org.odftoolkit.odfdom.dom.attribute.svg.SvgGradientUnitsAttribute;
import org.odftoolkit.odfdom.dom.attribute.svg.SvgRAttribute;
import org.odftoolkit.odfdom.dom.attribute.svg.SvgSpreadMethodAttribute;

/**
 * DOM implementation of OpenDocument element  {@odf.element svg:radialGradient}.
 *
 */
public class SvgRadialGradientElement extends OdfElement {

	public static final OdfName ELEMENT_NAME = OdfName.newName(OdfDocumentNamespace.SVG, "radialGradient");

	/**
	 * Create the instance of SvgRadialGradientElement
	 *
	 * @param  ownerDoc     The type is OdfFileDom
	 */
	public SvgRadialGradientElement(OdfFileDom ownerDoc) {
		super(ownerDoc, ELEMENT_NAME);
	}

	/**
	 * Get the element name
	 *
	 * @return  return   OdfName the name of element {@odf.element svg:radialGradient}.
	 */
	public OdfName getOdfName() {
		return ELEMENT_NAME;
	}

	/**
	 * Receives the value of the ODFDOM attribute representation DrawDisplayNameAttribute , See {@odf.attribute draw:display-name}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getDrawDisplayNameAttribute() {
		DrawDisplayNameAttribute attr = (DrawDisplayNameAttribute) getOdfAttribute(OdfDocumentNamespace.DRAW, "display-name");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation DrawDisplayNameAttribute , See {@odf.attribute draw:display-name}
	 *
	 * @param drawDisplayNameValue   The type is String
	 */
	public void setDrawDisplayNameAttribute(String drawDisplayNameValue) {
		DrawDisplayNameAttribute attr = new DrawDisplayNameAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(drawDisplayNameValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation DrawNameAttribute , See {@odf.attribute draw:name}
	 *
	 * Attribute is mandatory.
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getDrawNameAttribute() {
		DrawNameAttribute attr = (DrawNameAttribute) getOdfAttribute(OdfDocumentNamespace.DRAW, "name");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation DrawNameAttribute , See {@odf.attribute draw:name}
	 *
	 * @param drawNameValue   The type is String
	 */
	public void setDrawNameAttribute(String drawNameValue) {
		DrawNameAttribute attr = new DrawNameAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(drawNameValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SvgCxAttribute , See {@odf.attribute svg:cx}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSvgCxAttribute() {
		SvgCxAttribute attr = (SvgCxAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "cx");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return SvgCxAttribute.DEFAULT_VALUE;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SvgCxAttribute , See {@odf.attribute svg:cx}
	 *
	 * @param svgCxValue   The type is String
	 */
	public void setSvgCxAttribute(String svgCxValue) {
		SvgCxAttribute attr = new SvgCxAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(svgCxValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SvgCyAttribute , See {@odf.attribute svg:cy}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSvgCyAttribute() {
		SvgCyAttribute attr = (SvgCyAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "cy");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return SvgCyAttribute.DEFAULT_VALUE;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SvgCyAttribute , See {@odf.attribute svg:cy}
	 *
	 * @param svgCyValue   The type is String
	 */
	public void setSvgCyAttribute(String svgCyValue) {
		SvgCyAttribute attr = new SvgCyAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(svgCyValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SvgFxAttribute , See {@odf.attribute svg:fx}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSvgFxAttribute() {
		SvgFxAttribute attr = (SvgFxAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "fx");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SvgFxAttribute , See {@odf.attribute svg:fx}
	 *
	 * @param svgFxValue   The type is String
	 */
	public void setSvgFxAttribute(String svgFxValue) {
		SvgFxAttribute attr = new SvgFxAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(svgFxValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SvgFyAttribute , See {@odf.attribute svg:fy}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSvgFyAttribute() {
		SvgFyAttribute attr = (SvgFyAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "fy");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SvgFyAttribute , See {@odf.attribute svg:fy}
	 *
	 * @param svgFyValue   The type is String
	 */
	public void setSvgFyAttribute(String svgFyValue) {
		SvgFyAttribute attr = new SvgFyAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(svgFyValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SvgGradientTransformAttribute , See {@odf.attribute svg:gradientTransform}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSvgGradientTransformAttribute() {
		SvgGradientTransformAttribute attr = (SvgGradientTransformAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "gradientTransform");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return null;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SvgGradientTransformAttribute , See {@odf.attribute svg:gradientTransform}
	 *
	 * @param svgGradientTransformValue   The type is String
	 */
	public void setSvgGradientTransformAttribute(String svgGradientTransformValue) {
		SvgGradientTransformAttribute attr = new SvgGradientTransformAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(svgGradientTransformValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SvgGradientUnitsAttribute , See {@odf.attribute svg:gradientUnits}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSvgGradientUnitsAttribute() {
		SvgGradientUnitsAttribute attr = (SvgGradientUnitsAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "gradientUnits");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return SvgGradientUnitsAttribute.DEFAULT_VALUE;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SvgGradientUnitsAttribute , See {@odf.attribute svg:gradientUnits}
	 *
	 * @param svgGradientUnitsValue   The type is String
	 */
	public void setSvgGradientUnitsAttribute(String svgGradientUnitsValue) {
		SvgGradientUnitsAttribute attr = new SvgGradientUnitsAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(svgGradientUnitsValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SvgRAttribute , See {@odf.attribute svg:r}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSvgRAttribute() {
		SvgRAttribute attr = (SvgRAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "r");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return SvgRAttribute.DEFAULT_VALUE;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SvgRAttribute , See {@odf.attribute svg:r}
	 *
	 * @param svgRValue   The type is String
	 */
	public void setSvgRAttribute(String svgRValue) {
		SvgRAttribute attr = new SvgRAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(svgRValue);
	}

	/**
	 * Receives the value of the ODFDOM attribute representation SvgSpreadMethodAttribute , See {@odf.attribute svg:spreadMethod}
	 *
	 * @return - the String , the value or null, if the attribute is not set and no default value defined.
	 */
	public String getSvgSpreadMethodAttribute() {
		SvgSpreadMethodAttribute attr = (SvgSpreadMethodAttribute) getOdfAttribute(OdfDocumentNamespace.SVG, "spreadMethod");
		if (attr != null) {
			return String.valueOf(attr.getValue());
		}
		return SvgSpreadMethodAttribute.DEFAULT_VALUE;
	}

	/**
	 * Sets the value of ODFDOM attribute representation SvgSpreadMethodAttribute , See {@odf.attribute svg:spreadMethod}
	 *
	 * @param svgSpreadMethodValue   The type is String
	 */
	public void setSvgSpreadMethodAttribute(String svgSpreadMethodValue) {
		SvgSpreadMethodAttribute attr = new SvgSpreadMethodAttribute((OdfFileDom) this.ownerDocument);
		setOdfAttribute(attr);
		attr.setValue(svgSpreadMethodValue);
	}

	/**
	 * Create child element {@odf.element svg:stop}.
	 *
	 * @param svgOffsetValue  the String value of SvgOffsetAttribute, see {@odf.attribute  svg:offset} at specification
	 * @return the element {@odf.element svg:stop}
	 */
	 public SvgStopElement newSvgStopElement(String svgOffsetValue) {
		SvgStopElement svgStop = ((OdfFileDom) this.ownerDocument).newOdfElement(SvgStopElement.class);
		svgStop.setSvgOffsetAttribute(svgOffsetValue);
		this.appendChild(svgStop);
		return svgStop;
	}

	@Override
	public void accept(ElementVisitor visitor) {
		if (visitor instanceof DefaultElementVisitor) {
			DefaultElementVisitor defaultVisitor = (DefaultElementVisitor) visitor;
			defaultVisitor.visit(this);
		} else {
			visitor.visit(this);
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy