com.hfg.xml.msofficexml.docx.drawingml.DmlPresetGeometry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com_hfg Show documentation
Show all versions of com_hfg Show documentation
com.hfg xml, html, svg, and bioinformatics utility library
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;
}
}