| 1 | /* |
|---|
| 2 | * Copyright 2007-2008, Plutext Pty Ltd. |
|---|
| 3 | * |
|---|
| 4 | * This file is part of docx4j. |
|---|
| 5 | |
|---|
| 6 | docx4j is licensed under the Apache License, Version 2.0 (the "License"); |
|---|
| 7 | you may not use this file except in compliance with the License. |
|---|
| 8 | |
|---|
| 9 | You may obtain a copy of the License at |
|---|
| 10 | |
|---|
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 12 | |
|---|
| 13 | Unless required by applicable law or agreed to in writing, software |
|---|
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
|---|
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|---|
| 16 | See the License for the specific language governing permissions and |
|---|
| 17 | limitations under the License. |
|---|
| 18 | |
|---|
| 19 | */ |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | package org.docx4j.dml; |
|---|
| 23 | |
|---|
| 24 | import java.util.ArrayList; |
|---|
| 25 | import java.util.List; |
|---|
| 26 | import javax.xml.bind.annotation.XmlAccessType; |
|---|
| 27 | import javax.xml.bind.annotation.XmlAccessorType; |
|---|
| 28 | import javax.xml.bind.annotation.XmlAttribute; |
|---|
| 29 | import javax.xml.bind.annotation.XmlElement; |
|---|
| 30 | import javax.xml.bind.annotation.XmlType; |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | /** |
|---|
| 34 | * <p>Java class for CT_FontCollection complex type. |
|---|
| 35 | * |
|---|
| 36 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 37 | * |
|---|
| 38 | * <pre> |
|---|
| 39 | * <complexType name="CT_FontCollection"> |
|---|
| 40 | * <complexContent> |
|---|
| 41 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 42 | * <sequence> |
|---|
| 43 | * <element name="latin" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_TextFont"/> |
|---|
| 44 | * <element name="ea" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_TextFont"/> |
|---|
| 45 | * <element name="cs" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_TextFont"/> |
|---|
| 46 | * <element name="font" maxOccurs="unbounded" minOccurs="0"> |
|---|
| 47 | * <complexType> |
|---|
| 48 | * <complexContent> |
|---|
| 49 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 50 | * <attribute name="script" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 51 | * <attribute name="typeface" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_TextTypeface" /> |
|---|
| 52 | * </restriction> |
|---|
| 53 | * </complexContent> |
|---|
| 54 | * </complexType> |
|---|
| 55 | * </element> |
|---|
| 56 | * <element name="extLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_OfficeArtExtensionList" minOccurs="0"/> |
|---|
| 57 | * </sequence> |
|---|
| 58 | * </restriction> |
|---|
| 59 | * </complexContent> |
|---|
| 60 | * </complexType> |
|---|
| 61 | * </pre> |
|---|
| 62 | * |
|---|
| 63 | * |
|---|
| 64 | */ |
|---|
| 65 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 66 | @XmlType(name = "CT_FontCollection", propOrder = { |
|---|
| 67 | "latin", |
|---|
| 68 | "ea", |
|---|
| 69 | "cs", |
|---|
| 70 | "font", |
|---|
| 71 | "extLst" |
|---|
| 72 | }) |
|---|
| 73 | public class FontCollection { |
|---|
| 74 | |
|---|
| 75 | @XmlElement(required = true) |
|---|
| 76 | protected TextFont latin; |
|---|
| 77 | @XmlElement(required = true) |
|---|
| 78 | protected TextFont ea; |
|---|
| 79 | @XmlElement(required = true) |
|---|
| 80 | protected TextFont cs; |
|---|
| 81 | protected List<FontCollection.Font> font; |
|---|
| 82 | protected CTOfficeArtExtensionList extLst; |
|---|
| 83 | |
|---|
| 84 | /** |
|---|
| 85 | * Gets the value of the latin property. |
|---|
| 86 | * |
|---|
| 87 | * @return |
|---|
| 88 | * possible object is |
|---|
| 89 | * {@link TextFont } |
|---|
| 90 | * |
|---|
| 91 | */ |
|---|
| 92 | public TextFont getLatin() { |
|---|
| 93 | return latin; |
|---|
| 94 | } |
|---|
| 95 | |
|---|
| 96 | /** |
|---|
| 97 | * Sets the value of the latin property. |
|---|
| 98 | * |
|---|
| 99 | * @param value |
|---|
| 100 | * allowed object is |
|---|
| 101 | * {@link TextFont } |
|---|
| 102 | * |
|---|
| 103 | */ |
|---|
| 104 | public void setLatin(TextFont value) { |
|---|
| 105 | this.latin = value; |
|---|
| 106 | } |
|---|
| 107 | |
|---|
| 108 | /** |
|---|
| 109 | * Gets the value of the ea property. |
|---|
| 110 | * |
|---|
| 111 | * @return |
|---|
| 112 | * possible object is |
|---|
| 113 | * {@link TextFont } |
|---|
| 114 | * |
|---|
| 115 | */ |
|---|
| 116 | public TextFont getEa() { |
|---|
| 117 | return ea; |
|---|
| 118 | } |
|---|
| 119 | |
|---|
| 120 | /** |
|---|
| 121 | * Sets the value of the ea property. |
|---|
| 122 | * |
|---|
| 123 | * @param value |
|---|
| 124 | * allowed object is |
|---|
| 125 | * {@link TextFont } |
|---|
| 126 | * |
|---|
| 127 | */ |
|---|
| 128 | public void setEa(TextFont value) { |
|---|
| 129 | this.ea = value; |
|---|
| 130 | } |
|---|
| 131 | |
|---|
| 132 | /** |
|---|
| 133 | * Gets the value of the cs property. |
|---|
| 134 | * |
|---|
| 135 | * @return |
|---|
| 136 | * possible object is |
|---|
| 137 | * {@link TextFont } |
|---|
| 138 | * |
|---|
| 139 | */ |
|---|
| 140 | public TextFont getCs() { |
|---|
| 141 | return cs; |
|---|
| 142 | } |
|---|
| 143 | |
|---|
| 144 | /** |
|---|
| 145 | * Sets the value of the cs property. |
|---|
| 146 | * |
|---|
| 147 | * @param value |
|---|
| 148 | * allowed object is |
|---|
| 149 | * {@link TextFont } |
|---|
| 150 | * |
|---|
| 151 | */ |
|---|
| 152 | public void setCs(TextFont value) { |
|---|
| 153 | this.cs = value; |
|---|
| 154 | } |
|---|
| 155 | |
|---|
| 156 | /** |
|---|
| 157 | * Gets the value of the font property. |
|---|
| 158 | * |
|---|
| 159 | * <p> |
|---|
| 160 | * This accessor method returns a reference to the live list, |
|---|
| 161 | * not a snapshot. Therefore any modification you make to the |
|---|
| 162 | * returned list will be present inside the JAXB object. |
|---|
| 163 | * This is why there is not a <CODE>set</CODE> method for the font property. |
|---|
| 164 | * |
|---|
| 165 | * <p> |
|---|
| 166 | * For example, to add a new item, do as follows: |
|---|
| 167 | * <pre> |
|---|
| 168 | * getFont().add(newItem); |
|---|
| 169 | * </pre> |
|---|
| 170 | * |
|---|
| 171 | * |
|---|
| 172 | * <p> |
|---|
| 173 | * Objects of the following type(s) are allowed in the list |
|---|
| 174 | * {@link FontCollection.Font } |
|---|
| 175 | * |
|---|
| 176 | * |
|---|
| 177 | */ |
|---|
| 178 | public List<FontCollection.Font> getFont() { |
|---|
| 179 | if (font == null) { |
|---|
| 180 | font = new ArrayList<FontCollection.Font>(); |
|---|
| 181 | } |
|---|
| 182 | return this.font; |
|---|
| 183 | } |
|---|
| 184 | |
|---|
| 185 | /** |
|---|
| 186 | * Gets the value of the extLst property. |
|---|
| 187 | * |
|---|
| 188 | * @return |
|---|
| 189 | * possible object is |
|---|
| 190 | * {@link CTOfficeArtExtensionList } |
|---|
| 191 | * |
|---|
| 192 | */ |
|---|
| 193 | public CTOfficeArtExtensionList getExtLst() { |
|---|
| 194 | return extLst; |
|---|
| 195 | } |
|---|
| 196 | |
|---|
| 197 | /** |
|---|
| 198 | * Sets the value of the extLst property. |
|---|
| 199 | * |
|---|
| 200 | * @param value |
|---|
| 201 | * allowed object is |
|---|
| 202 | * {@link CTOfficeArtExtensionList } |
|---|
| 203 | * |
|---|
| 204 | */ |
|---|
| 205 | public void setExtLst(CTOfficeArtExtensionList value) { |
|---|
| 206 | this.extLst = value; |
|---|
| 207 | } |
|---|
| 208 | |
|---|
| 209 | |
|---|
| 210 | /** |
|---|
| 211 | * <p>Java class for anonymous complex type. |
|---|
| 212 | * |
|---|
| 213 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 214 | * |
|---|
| 215 | * <pre> |
|---|
| 216 | * <complexType> |
|---|
| 217 | * <complexContent> |
|---|
| 218 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 219 | * <attribute name="script" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> |
|---|
| 220 | * <attribute name="typeface" use="required" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_TextTypeface" /> |
|---|
| 221 | * </restriction> |
|---|
| 222 | * </complexContent> |
|---|
| 223 | * </complexType> |
|---|
| 224 | * </pre> |
|---|
| 225 | * |
|---|
| 226 | * |
|---|
| 227 | */ |
|---|
| 228 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 229 | @XmlType(name = "") |
|---|
| 230 | public static class Font { |
|---|
| 231 | |
|---|
| 232 | @XmlAttribute(required = true) |
|---|
| 233 | protected String script; |
|---|
| 234 | @XmlAttribute(required = true) |
|---|
| 235 | protected String typeface; |
|---|
| 236 | |
|---|
| 237 | /** |
|---|
| 238 | * Gets the value of the script property. |
|---|
| 239 | * |
|---|
| 240 | * @return |
|---|
| 241 | * possible object is |
|---|
| 242 | * {@link String } |
|---|
| 243 | * |
|---|
| 244 | */ |
|---|
| 245 | public String getScript() { |
|---|
| 246 | return script; |
|---|
| 247 | } |
|---|
| 248 | |
|---|
| 249 | /** |
|---|
| 250 | * Sets the value of the script property. |
|---|
| 251 | * |
|---|
| 252 | * @param value |
|---|
| 253 | * allowed object is |
|---|
| 254 | * {@link String } |
|---|
| 255 | * |
|---|
| 256 | */ |
|---|
| 257 | public void setScript(String value) { |
|---|
| 258 | this.script = value; |
|---|
| 259 | } |
|---|
| 260 | |
|---|
| 261 | /** |
|---|
| 262 | * Gets the value of the typeface property. |
|---|
| 263 | * |
|---|
| 264 | * @return |
|---|
| 265 | * possible object is |
|---|
| 266 | * {@link String } |
|---|
| 267 | * |
|---|
| 268 | */ |
|---|
| 269 | public String getTypeface() { |
|---|
| 270 | return typeface; |
|---|
| 271 | } |
|---|
| 272 | |
|---|
| 273 | /** |
|---|
| 274 | * Sets the value of the typeface property. |
|---|
| 275 | * |
|---|
| 276 | * @param value |
|---|
| 277 | * allowed object is |
|---|
| 278 | * {@link String } |
|---|
| 279 | * |
|---|
| 280 | */ |
|---|
| 281 | public void setTypeface(String value) { |
|---|
| 282 | this.typeface = value; |
|---|
| 283 | } |
|---|
| 284 | |
|---|
| 285 | } |
|---|
| 286 | |
|---|
| 287 | } |
|---|