001package com.hfg.xml.msofficexml.docx.drawingml; 002 003 004import com.hfg.xml.XMLTag; 005import com.hfg.xml.msofficexml.docx.Docx; 006import com.hfg.xml.msofficexml.OfficeOpenXMLTag; 007 008public class DmlStretch extends OfficeOpenXMLTag 009{ 010 private XMLTag mFillRectTag; 011 012 //--------------------------------------------------------------------------- 013 public DmlStretch(Docx inDocx) 014 { 015 super(DmlXML.STRETCH, inDocx); 016 } 017 018 //--------------------------------------------------------------------------- 019 // TODO: Add offset support to the fillRect tag 020 public DmlStretch fillRect() 021 { 022 if (null == mFillRectTag) 023 { 024 // Check it it has been added via addSubtag()... 025 mFillRectTag = getOptionalSubtagByName(DmlXML.FILL_RECT); 026 if (null == mFillRectTag) 027 { 028 mFillRectTag = new XMLTag(DmlXML.FILL_RECT); 029 addSubtag(mFillRectTag); 030 } 031 } 032 033 return this; 034 } 035}