| 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 javax.xml.bind.annotation.XmlAccessType; |
|---|
| 25 | import javax.xml.bind.annotation.XmlAccessorType; |
|---|
| 26 | import javax.xml.bind.annotation.XmlAttribute; |
|---|
| 27 | import javax.xml.bind.annotation.XmlType; |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | /** |
|---|
| 31 | * <p>Java class for CT_TableCell complex type. |
|---|
| 32 | * |
|---|
| 33 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 34 | * |
|---|
| 35 | * <pre> |
|---|
| 36 | * <complexType name="CT_TableCell"> |
|---|
| 37 | * <complexContent> |
|---|
| 38 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
|---|
| 39 | * <sequence> |
|---|
| 40 | * <element name="txBody" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_TextBody" minOccurs="0"/> |
|---|
| 41 | * <element name="tcPr" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_TableCellProperties" minOccurs="0"/> |
|---|
| 42 | * <element name="extLst" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_OfficeArtExtensionList" minOccurs="0"/> |
|---|
| 43 | * </sequence> |
|---|
| 44 | * <attribute name="rowSpan" type="{http://www.w3.org/2001/XMLSchema}int" default="1" /> |
|---|
| 45 | * <attribute name="gridSpan" type="{http://www.w3.org/2001/XMLSchema}int" default="1" /> |
|---|
| 46 | * <attribute name="hMerge" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> |
|---|
| 47 | * <attribute name="vMerge" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> |
|---|
| 48 | * </restriction> |
|---|
| 49 | * </complexContent> |
|---|
| 50 | * </complexType> |
|---|
| 51 | * </pre> |
|---|
| 52 | * |
|---|
| 53 | * |
|---|
| 54 | */ |
|---|
| 55 | @XmlAccessorType(XmlAccessType.FIELD) |
|---|
| 56 | @XmlType(name = "CT_TableCell", propOrder = { |
|---|
| 57 | "txBody", |
|---|
| 58 | "tcPr", |
|---|
| 59 | "extLst" |
|---|
| 60 | }) |
|---|
| 61 | public class CTTableCell { |
|---|
| 62 | |
|---|
| 63 | protected CTTextBody txBody; |
|---|
| 64 | protected CTTableCellProperties tcPr; |
|---|
| 65 | protected CTOfficeArtExtensionList extLst; |
|---|
| 66 | @XmlAttribute |
|---|
| 67 | protected Integer rowSpan; |
|---|
| 68 | @XmlAttribute |
|---|
| 69 | protected Integer gridSpan; |
|---|
| 70 | @XmlAttribute |
|---|
| 71 | protected Boolean hMerge; |
|---|
| 72 | @XmlAttribute |
|---|
| 73 | protected Boolean vMerge; |
|---|
| 74 | |
|---|
| 75 | /** |
|---|
| 76 | * Gets the value of the txBody property. |
|---|
| 77 | * |
|---|
| 78 | * @return |
|---|
| 79 | * possible object is |
|---|
| 80 | * {@link CTTextBody } |
|---|
| 81 | * |
|---|
| 82 | */ |
|---|
| 83 | public CTTextBody getTxBody() { |
|---|
| 84 | return txBody; |
|---|
| 85 | } |
|---|
| 86 | |
|---|
| 87 | /** |
|---|
| 88 | * Sets the value of the txBody property. |
|---|
| 89 | * |
|---|
| 90 | * @param value |
|---|
| 91 | * allowed object is |
|---|
| 92 | * {@link CTTextBody } |
|---|
| 93 | * |
|---|
| 94 | */ |
|---|
| 95 | public void setTxBody(CTTextBody value) { |
|---|
| 96 | this.txBody = value; |
|---|
| 97 | } |
|---|
| 98 | |
|---|
| 99 | /** |
|---|
| 100 | * Gets the value of the tcPr property. |
|---|
| 101 | * |
|---|
| 102 | * @return |
|---|
| 103 | * possible object is |
|---|
| 104 | * {@link CTTableCellProperties } |
|---|
| 105 | * |
|---|
| 106 | */ |
|---|
| 107 | public CTTableCellProperties getTcPr() { |
|---|
| 108 | return tcPr; |
|---|
| 109 | } |
|---|
| 110 | |
|---|
| 111 | /** |
|---|
| 112 | * Sets the value of the tcPr property. |
|---|
| 113 | * |
|---|
| 114 | * @param value |
|---|
| 115 | * allowed object is |
|---|
| 116 | * {@link CTTableCellProperties } |
|---|
| 117 | * |
|---|
| 118 | */ |
|---|
| 119 | public void setTcPr(CTTableCellProperties value) { |
|---|
| 120 | this.tcPr = value; |
|---|
| 121 | } |
|---|
| 122 | |
|---|
| 123 | /** |
|---|
| 124 | * Gets the value of the extLst property. |
|---|
| 125 | * |
|---|
| 126 | * @return |
|---|
| 127 | * possible object is |
|---|
| 128 | * {@link CTOfficeArtExtensionList } |
|---|
| 129 | * |
|---|
| 130 | */ |
|---|
| 131 | public CTOfficeArtExtensionList getExtLst() { |
|---|
| 132 | return extLst; |
|---|
| 133 | } |
|---|
| 134 | |
|---|
| 135 | /** |
|---|
| 136 | * Sets the value of the extLst property. |
|---|
| 137 | * |
|---|
| 138 | * @param value |
|---|
| 139 | * allowed object is |
|---|
| 140 | * {@link CTOfficeArtExtensionList } |
|---|
| 141 | * |
|---|
| 142 | */ |
|---|
| 143 | public void setExtLst(CTOfficeArtExtensionList value) { |
|---|
| 144 | this.extLst = value; |
|---|
| 145 | } |
|---|
| 146 | |
|---|
| 147 | /** |
|---|
| 148 | * Gets the value of the rowSpan property. |
|---|
| 149 | * |
|---|
| 150 | * @return |
|---|
| 151 | * possible object is |
|---|
| 152 | * {@link Integer } |
|---|
| 153 | * |
|---|
| 154 | */ |
|---|
| 155 | public int getRowSpan() { |
|---|
| 156 | if (rowSpan == null) { |
|---|
| 157 | return 1; |
|---|
| 158 | } else { |
|---|
| 159 | return rowSpan; |
|---|
| 160 | } |
|---|
| 161 | } |
|---|
| 162 | |
|---|
| 163 | /** |
|---|
| 164 | * Sets the value of the rowSpan property. |
|---|
| 165 | * |
|---|
| 166 | * @param value |
|---|
| 167 | * allowed object is |
|---|
| 168 | * {@link Integer } |
|---|
| 169 | * |
|---|
| 170 | */ |
|---|
| 171 | public void setRowSpan(Integer value) { |
|---|
| 172 | this.rowSpan = value; |
|---|
| 173 | } |
|---|
| 174 | |
|---|
| 175 | /** |
|---|
| 176 | * Gets the value of the gridSpan property. |
|---|
| 177 | * |
|---|
| 178 | * @return |
|---|
| 179 | * possible object is |
|---|
| 180 | * {@link Integer } |
|---|
| 181 | * |
|---|
| 182 | */ |
|---|
| 183 | public int getGridSpan() { |
|---|
| 184 | if (gridSpan == null) { |
|---|
| 185 | return 1; |
|---|
| 186 | } else { |
|---|
| 187 | return gridSpan; |
|---|
| 188 | } |
|---|
| 189 | } |
|---|
| 190 | |
|---|
| 191 | /** |
|---|
| 192 | * Sets the value of the gridSpan property. |
|---|
| 193 | * |
|---|
| 194 | * @param value |
|---|
| 195 | * allowed object is |
|---|
| 196 | * {@link Integer } |
|---|
| 197 | * |
|---|
| 198 | */ |
|---|
| 199 | public void setGridSpan(Integer value) { |
|---|
| 200 | this.gridSpan = value; |
|---|
| 201 | } |
|---|
| 202 | |
|---|
| 203 | /** |
|---|
| 204 | * Gets the value of the hMerge property. |
|---|
| 205 | * |
|---|
| 206 | * @return |
|---|
| 207 | * possible object is |
|---|
| 208 | * {@link Boolean } |
|---|
| 209 | * |
|---|
| 210 | */ |
|---|
| 211 | public boolean isHMerge() { |
|---|
| 212 | if (hMerge == null) { |
|---|
| 213 | return false; |
|---|
| 214 | } else { |
|---|
| 215 | return hMerge; |
|---|
| 216 | } |
|---|
| 217 | } |
|---|
| 218 | |
|---|
| 219 | /** |
|---|
| 220 | * Sets the value of the hMerge property. |
|---|
| 221 | * |
|---|
| 222 | * @param value |
|---|
| 223 | * allowed object is |
|---|
| 224 | * {@link Boolean } |
|---|
| 225 | * |
|---|
| 226 | */ |
|---|
| 227 | public void setHMerge(Boolean value) { |
|---|
| 228 | this.hMerge = value; |
|---|
| 229 | } |
|---|
| 230 | |
|---|
| 231 | /** |
|---|
| 232 | * Gets the value of the vMerge property. |
|---|
| 233 | * |
|---|
| 234 | * @return |
|---|
| 235 | * possible object is |
|---|
| 236 | * {@link Boolean } |
|---|
| 237 | * |
|---|
| 238 | */ |
|---|
| 239 | public boolean isVMerge() { |
|---|
| 240 | if (vMerge == null) { |
|---|
| 241 | return false; |
|---|
| 242 | } else { |
|---|
| 243 | return vMerge; |
|---|
| 244 | } |
|---|
| 245 | } |
|---|
| 246 | |
|---|
| 247 | /** |
|---|
| 248 | * Sets the value of the vMerge property. |
|---|
| 249 | * |
|---|
| 250 | * @param value |
|---|
| 251 | * allowed object is |
|---|
| 252 | * {@link Boolean } |
|---|
| 253 | * |
|---|
| 254 | */ |
|---|
| 255 | public void setVMerge(Boolean value) { |
|---|
| 256 | this.vMerge = value; |
|---|
| 257 | } |
|---|
| 258 | |
|---|
| 259 | } |
|---|