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

com.hfg.xml.msofficexml.docx.drawingml.DmlPresetGeometry Maven / Gradle / Ivy

There is a newer version: 20240423
Show newest version
package com.hfg.xml.msofficexml.docx.drawingml;


import com.hfg.xml.XMLTag;

public class DmlPresetGeometry extends XMLTag
{
   private DmlShapeAdjustValues mShapeAdjustValues;

   //---------------------------------------------------------------------------
   public DmlPresetGeometry()
   {
      super(DmlXML.PRESET_GEOMETRY);
      init();
   }

   //---------------------------------------------------------------------------
   public DmlPresetGeometry(DmlShapeType inValue)
   {
      this();
      setShape(inValue);
   }

   //---------------------------------------------------------------------------
   private void init()
   {
      getShapeAdjustValues();
   }

   //---------------------------------------------------------------------------
   public DmlPresetGeometry setShape(DmlShapeType inValue)
   {
      setAttribute(DmlXML.PRESET_ATT, inValue.name());
      return this;
   }

   //---------------------------------------------------------------------------
   /**
    * Returns the shape adjusted values (avLst) tag if one exists or else instantiates a new one.
    * @return the shape adjusted values tag for this preset geometry
    */
   public DmlShapeAdjustValues getShapeAdjustValues()
   {
      if (null == mShapeAdjustValues)
      {
         // Check if it has been added via addSubtag()...
         mShapeAdjustValues = getOptionalSubtagByName(DmlXML.SHAPE_ADJUST_VALUES);
         if (null == mShapeAdjustValues)
         {
            mShapeAdjustValues = new DmlShapeAdjustValues();
            mShapeAdjustValues.addContent("");
            addSubtag(0, mShapeAdjustValues);
         }
      }

      return mShapeAdjustValues;
   }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy