001package com.hfg.xml.msofficexml.docx.wordprocessingml;
002
003import com.hfg.graphics.units.GfxSize;
004import com.hfg.graphics.units.GfxUnits;
005import com.hfg.graphics.units.Pixels;
006import com.hfg.xml.XMLTag;
007import com.hfg.xml.msofficexml.docx.drawingml.DmlXML;
008
009public class WmlEffectExtent extends XMLTag
010{
011
012   //---------------------------------------------------------------------------
013   public WmlEffectExtent()
014   {
015      super(WmlXML.EFFECT_EXTENT);
016      init();
017   }
018
019   //---------------------------------------------------------------------------
020   private void init()
021   {
022      setLeft(new Pixels(0));
023      setRight(new Pixels(0));
024      setTop(new Pixels(0));
025      setBottom(new Pixels(0));
026   }
027
028
029   //---------------------------------------------------------------------------
030   /**
031    * Specifies the additional extent to add to the left of the drawing.
032    */
033   public WmlEffectExtent setLeft(GfxSize inValue)
034   {
035      setAttribute(DmlXML.LEFT_ATT, inValue.toInt(GfxUnits.emus));
036      return this;
037   }
038
039   //---------------------------------------------------------------------------
040   /**
041    * Specifies the additional extent to add to the right of the drawing.
042    */
043   public WmlEffectExtent setRight(GfxSize inValue)
044   {
045      setAttribute(DmlXML.RIGHT_ATT, inValue.toInt(GfxUnits.emus));
046      return this;
047   }
048
049   //---------------------------------------------------------------------------
050   /**
051    * Specifies the additional extent to add to the top of the drawing.
052    */
053   public WmlEffectExtent setTop(GfxSize inValue)
054   {
055      setAttribute(DmlXML.TOP_ATT, inValue.toInt(GfxUnits.emus));
056      return this;
057   }
058
059   //---------------------------------------------------------------------------
060   /**
061    * Specifies the additional extent to add to the bottom of the drawing.
062    */
063   public WmlEffectExtent setBottom(GfxSize inValue)
064   {
065      setAttribute(DmlXML.BOTTOM_ATT, inValue.toInt(GfxUnits.emus));
066      return this;
067   }
068}