001package com.hfg.xml.msofficexml.docx.drawingml.line;
002
003
004import com.hfg.xml.XMLTag;
005import com.hfg.xml.msofficexml.docx.drawingml.DmlXML;
006import com.hfg.xml.msofficexml.docx.drawingml.color.DmlColor;
007
008//------------------------------------------------------------------------------
009/**
010 Represents a line reference (<a:lnRef>) tag in drawing markup language (DML) from Office Open XML.
011
012 @author J. Alex Taylor, hairyfatguy.com
013 */
014//------------------------------------------------------------------------------
015// com.hfg XML/HTML Coding Library
016//
017// This library is free software; you can redistribute it and/or
018// modify it under the terms of the GNU Lesser General Public
019// License as published by the Free Software Foundation; either
020// version 2.1 of the License, or (at your option) any later version.
021//
022// This library is distributed in the hope that it will be useful,
023// but WITHOUT ANY WARRANTY; without even the implied warranty of
024// MERCHANTABILITY or FITNESS FOR A P
025// ARTICULAR PURPOSE.  See the GNU
026// Lesser General Public License for more details.
027//
028// You should have received a copy of the GNU Lesser General Public
029// License along with this library; if not, write to the Free Software
030// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
031//
032// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
033// jataylor@hairyfatguy.com
034//------------------------------------------------------------------------------
035
036public class DmlLineRef extends XMLTag
037{
038   private DmlColor mColorModel;
039
040   //---------------------------------------------------------------------------
041   public DmlLineRef()
042   {
043      super(DmlXML.LINE_REF);
044   }
045
046
047   //---------------------------------------------------------------------------
048   public DmlLineRef setIndex(int inValue)
049   {
050      setAttribute(DmlXML.INDEX_ATT, inValue);
051      return this;
052   }
053
054   //---------------------------------------------------------------------------
055   public DmlLineRef setColorModel(DmlColor inColorModel)
056   {
057      if (mColorModel != null)
058      {
059         removeSubtag(mColorModel);
060      }
061
062      mColorModel = inColorModel;
063      addSubtag(mColorModel);
064
065      return this;
066   }
067
068
069}