com.hfg.xml.msofficexml.docx.drawingml.DmlPicture 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.msofficexml.docx.Docx;
import com.hfg.xml.msofficexml.docx.wordprocessingml.WmlXMLTag;
public class DmlPicture extends WmlXMLTag
{
private DmlNonVisualPictureProperties mNonVisualPictureProperties;
private DmlBlipFill mBlipFill;
private DmlShapeProperties mShapeProperties;
//---------------------------------------------------------------------------
public DmlPicture(Docx inDocx)
{
super(DmlXML.PIC, inDocx);
init();
}
//---------------------------------------------------------------------------
private void init()
{
}
//---------------------------------------------------------------------------
/**
* Returns the non-visible picture properties tag if one exists or else instantiates a new one.
* @return the non-visible picture properties for this picture tag
*/
public DmlNonVisualPictureProperties getNonVisualPictureProperties()
{
if (null == mNonVisualPictureProperties)
{
// Check if it has been added via addSubtag()...
mNonVisualPictureProperties = (DmlNonVisualPictureProperties) getOptionalSubtagByName(DmlXML.NON_VISUAL_PIC_PROPS);
if (null == mNonVisualPictureProperties)
{
mNonVisualPictureProperties = new DmlNonVisualPictureProperties();
addSubtag(mNonVisualPictureProperties);
}
}
return mNonVisualPictureProperties;
}
//---------------------------------------------------------------------------
/**
* Returns the blipFill tag if one exists or else instantiates a new one.
* @return the blipFill for this picture tag
*/
public DmlBlipFill getBlipFill()
{
if (null == mBlipFill)
{
// Check if it has been added via addSubtag()...
mBlipFill = (DmlBlipFill) getOptionalSubtagByName(DmlXML.BLIP_FILL);
if (null == mBlipFill)
{
mBlipFill = new DmlBlipFill(getParentDoc());
addSubtag(mBlipFill);
}
}
return mBlipFill;
}
//---------------------------------------------------------------------------
/**
* Returns the shape properties tag if one exists or else instantiates a new one.
* @return the shape properties for this picture tag
*/
public DmlShapeProperties getShapeProperties()
{
if (null == mShapeProperties)
{
// Check if it has been added via addSubtag()...
mShapeProperties = (DmlShapeProperties) getOptionalSubtagByName(DmlXML.SHAPE_PROPS);
if (null == mShapeProperties)
{
mShapeProperties = new DmlShapeProperties(getParentDoc());
addSubtag(mShapeProperties);
}
}
return mShapeProperties;
}
}