PresentationAnimationsElement.java

  1. /**
  2.  * **********************************************************************
  3.  *
  4.  * <p>DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
  5.  *
  6.  * <p>Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
  7.  *
  8.  * <p>Use is subject to license terms.
  9.  *
  10.  * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
  11.  * except in compliance with the License. You may obtain a copy of the License at
  12.  * http://www.apache.org/licenses/LICENSE-2.0. You can also obtain a copy of the License at
  13.  * http://odftoolkit.org/docs/license.txt
  14.  *
  15.  * <p>Unless required by applicable law or agreed to in writing, software distributed under the
  16.  * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  17.  * express or implied.
  18.  *
  19.  * <p>See the License for the specific language governing permissions and limitations under the
  20.  * License.
  21.  *
  22.  * <p>**********************************************************************
  23.  */

  24. /*
  25.  * This file is automatically generated.
  26.  * Don't edit manually.
  27.  */
  28. package org.odftoolkit.odfdom.dom.element.presentation;

  29. import org.odftoolkit.odfdom.dom.DefaultElementVisitor;
  30. import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
  31. import org.odftoolkit.odfdom.pkg.ElementVisitor;
  32. import org.odftoolkit.odfdom.pkg.OdfElement;
  33. import org.odftoolkit.odfdom.pkg.OdfFileDom;
  34. import org.odftoolkit.odfdom.pkg.OdfName;

  35. /** DOM implementation of OpenDocument element {@odf.element presentation:animations}. */
  36. public class PresentationAnimationsElement extends OdfElement {

  37.   public static final OdfName ELEMENT_NAME =
  38.       OdfName.newName(OdfDocumentNamespace.PRESENTATION, "animations");

  39.   /**
  40.    * Create the instance of <code>PresentationAnimationsElement</code>
  41.    *
  42.    * @param ownerDoc The type is <code>OdfFileDom</code>
  43.    */
  44.   public PresentationAnimationsElement(OdfFileDom ownerDoc) {
  45.     super(ownerDoc, ELEMENT_NAME);
  46.   }

  47.   /**
  48.    * Get the element name
  49.    *
  50.    * @return return <code>OdfName</code> the name of element {@odf.element presentation:animations}.
  51.    */
  52.   public OdfName getOdfName() {
  53.     return ELEMENT_NAME;
  54.   }

  55.   /**
  56.    * Create child element {@odf.element presentation:animation-group}.
  57.    *
  58.    * @return the element {@odf.element presentation:animation-group}
  59.    */
  60.   public PresentationAnimationGroupElement newPresentationAnimationGroupElement() {
  61.     PresentationAnimationGroupElement presentationAnimationGroup =
  62.         ((OdfFileDom) this.ownerDocument).newOdfElement(PresentationAnimationGroupElement.class);
  63.     this.appendChild(presentationAnimationGroup);
  64.     return presentationAnimationGroup;
  65.   }

  66.   /**
  67.    * Create child element {@odf.element presentation:dim}.
  68.    *
  69.    * @param drawColorValue the <code>String</code> value of <code>DrawColorAttribute</code>, see
  70.    *     {@odf.attribute draw:color} at specification
  71.    * @param drawShapeIdValue the <code>String</code> value of <code>DrawShapeIdAttribute</code>, see
  72.    *     {@odf.attribute draw:shape-id} at specification
  73.    * @return the element {@odf.element presentation:dim}
  74.    */
  75.   public PresentationDimElement newPresentationDimElement(
  76.       String drawColorValue, String drawShapeIdValue) {
  77.     PresentationDimElement presentationDim =
  78.         ((OdfFileDom) this.ownerDocument).newOdfElement(PresentationDimElement.class);
  79.     presentationDim.setDrawColorAttribute(drawColorValue);
  80.     presentationDim.setDrawShapeIdAttribute(drawShapeIdValue);
  81.     this.appendChild(presentationDim);
  82.     return presentationDim;
  83.   }

  84.   /**
  85.    * Create child element {@odf.element presentation:hide-shape}.
  86.    *
  87.    * @param drawShapeIdValue the <code>String</code> value of <code>DrawShapeIdAttribute</code>, see
  88.    *     {@odf.attribute draw:shape-id} at specification
  89.    * @return the element {@odf.element presentation:hide-shape}
  90.    */
  91.   public PresentationHideShapeElement newPresentationHideShapeElement(String drawShapeIdValue) {
  92.     PresentationHideShapeElement presentationHideShape =
  93.         ((OdfFileDom) this.ownerDocument).newOdfElement(PresentationHideShapeElement.class);
  94.     presentationHideShape.setDrawShapeIdAttribute(drawShapeIdValue);
  95.     this.appendChild(presentationHideShape);
  96.     return presentationHideShape;
  97.   }

  98.   /**
  99.    * Create child element {@odf.element presentation:hide-text}.
  100.    *
  101.    * @param drawShapeIdValue the <code>String</code> value of <code>DrawShapeIdAttribute</code>, see
  102.    *     {@odf.attribute draw:shape-id} at specification
  103.    * @return the element {@odf.element presentation:hide-text}
  104.    */
  105.   public PresentationHideTextElement newPresentationHideTextElement(String drawShapeIdValue) {
  106.     PresentationHideTextElement presentationHideText =
  107.         ((OdfFileDom) this.ownerDocument).newOdfElement(PresentationHideTextElement.class);
  108.     presentationHideText.setDrawShapeIdAttribute(drawShapeIdValue);
  109.     this.appendChild(presentationHideText);
  110.     return presentationHideText;
  111.   }

  112.   /**
  113.    * Create child element {@odf.element presentation:play}.
  114.    *
  115.    * @param drawShapeIdValue the <code>String</code> value of <code>DrawShapeIdAttribute</code>, see
  116.    *     {@odf.attribute draw:shape-id} at specification
  117.    * @return the element {@odf.element presentation:play}
  118.    */
  119.   public PresentationPlayElement newPresentationPlayElement(String drawShapeIdValue) {
  120.     PresentationPlayElement presentationPlay =
  121.         ((OdfFileDom) this.ownerDocument).newOdfElement(PresentationPlayElement.class);
  122.     presentationPlay.setDrawShapeIdAttribute(drawShapeIdValue);
  123.     this.appendChild(presentationPlay);
  124.     return presentationPlay;
  125.   }

  126.   /**
  127.    * Create child element {@odf.element presentation:show-shape}.
  128.    *
  129.    * @param drawShapeIdValue the <code>String</code> value of <code>DrawShapeIdAttribute</code>, see
  130.    *     {@odf.attribute draw:shape-id} at specification
  131.    * @return the element {@odf.element presentation:show-shape}
  132.    */
  133.   public PresentationShowShapeElement newPresentationShowShapeElement(String drawShapeIdValue) {
  134.     PresentationShowShapeElement presentationShowShape =
  135.         ((OdfFileDom) this.ownerDocument).newOdfElement(PresentationShowShapeElement.class);
  136.     presentationShowShape.setDrawShapeIdAttribute(drawShapeIdValue);
  137.     this.appendChild(presentationShowShape);
  138.     return presentationShowShape;
  139.   }

  140.   /**
  141.    * Create child element {@odf.element presentation:show-text}.
  142.    *
  143.    * @param drawShapeIdValue the <code>String</code> value of <code>DrawShapeIdAttribute</code>, see
  144.    *     {@odf.attribute draw:shape-id} at specification
  145.    * @return the element {@odf.element presentation:show-text}
  146.    */
  147.   public PresentationShowTextElement newPresentationShowTextElement(String drawShapeIdValue) {
  148.     PresentationShowTextElement presentationShowText =
  149.         ((OdfFileDom) this.ownerDocument).newOdfElement(PresentationShowTextElement.class);
  150.     presentationShowText.setDrawShapeIdAttribute(drawShapeIdValue);
  151.     this.appendChild(presentationShowText);
  152.     return presentationShowText;
  153.   }

  154.   @Override
  155.   public void accept(ElementVisitor visitor) {
  156.     if (visitor instanceof DefaultElementVisitor) {
  157.       DefaultElementVisitor defaultVisitor = (DefaultElementVisitor) visitor;
  158.       defaultVisitor.visit(this);
  159.     } else {
  160.       visitor.visit(this);
  161.     }
  162.   }
  163. }