001package com.hfg.xml.msofficexml.docx.wordprocessingml; 002 003import com.hfg.xml.msofficexml.docx.Docx; 004 005 006public class WmlDrawing extends WmlXMLTag 007{ 008 private WmlInline mInlineTag; 009 010 //--------------------------------------------------------------------------- 011 public WmlDrawing(Docx inDocx) 012 { 013 super(WmlXML.DRAWING, inDocx); 014 } 015 016 //--------------------------------------------------------------------------- 017 /** 018 * Returns the inline tag if one exists or else instantiates a new one. 019 * @return the inline tag for this drawing 020 */ 021 public WmlInline getInline() 022 { 023 if (null == mInlineTag) 024 { 025 // Check if it has been added via addSubtag()... 026 mInlineTag = getOptionalSubtagByName(WmlXML.INLINE); 027 if (null == mInlineTag) 028 { 029 mInlineTag = new WmlInline(getParentDoc()); 030 addSubtag(mInlineTag); 031 } 032 } 033 034 return mInlineTag; 035 } 036 037}