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