source: trunk/docx4j/src/main/java/org/docx4j/wml/CTColumns.java @ 359

Revision 359, 6.2 KB checked in by jharrop, 4 years ago (diff)

Change CT_FldChar to FldChar?;
Style is freestanding, rather than an inner class of Styles.
(Other changes largely whitespace in license header)

Line 
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
22package org.docx4j.wml;
23
24import java.math.BigInteger;
25import java.util.ArrayList;
26import java.util.List;
27import javax.xml.bind.Unmarshaller;
28import javax.xml.bind.annotation.XmlAccessType;
29import javax.xml.bind.annotation.XmlAccessorType;
30import javax.xml.bind.annotation.XmlAttribute;
31import javax.xml.bind.annotation.XmlTransient;
32import javax.xml.bind.annotation.XmlType;
33import org.jvnet.jaxb2_commons.ppp.Child;
34
35
36/**
37 * <p>Java class for CT_Columns complex type.
38 *
39 * <p>The following schema fragment specifies the expected content contained within this class.
40 *
41 * <pre>
42 * &lt;complexType name="CT_Columns">
43 *   &lt;complexContent>
44 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
45 *       &lt;sequence minOccurs="0">
46 *         &lt;element name="col" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_Column" maxOccurs="45"/>
47 *       &lt;/sequence>
48 *       &lt;attribute name="equalWidth" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
49 *       &lt;attribute name="space" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_TwipsMeasure" />
50 *       &lt;attribute name="num" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_DecimalNumber" />
51 *       &lt;attribute name="sep" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
52 *     &lt;/restriction>
53 *   &lt;/complexContent>
54 * &lt;/complexType>
55 * </pre>
56 *
57 *
58 */
59@XmlAccessorType(XmlAccessType.FIELD)
60@XmlType(name = "CT_Columns", propOrder = {
61    "col"
62})
63public class CTColumns
64    implements Child
65{
66
67    protected List<CTColumn> col;
68    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
69    protected Boolean equalWidth;
70    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
71    protected BigInteger space;
72    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
73    protected BigInteger num;
74    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
75    protected Boolean sep;
76    @XmlTransient
77    private Object parent;
78
79    /**
80     * Gets the value of the col property.
81     *
82     * <p>
83     * This accessor method returns a reference to the live list,
84     * not a snapshot. Therefore any modification you make to the
85     * returned list will be present inside the JAXB object.
86     * This is why there is not a <CODE>set</CODE> method for the col property.
87     *
88     * <p>
89     * For example, to add a new item, do as follows:
90     * <pre>
91     *    getCol().add(newItem);
92     * </pre>
93     *
94     *
95     * <p>
96     * Objects of the following type(s) are allowed in the list
97     * {@link CTColumn }
98     *
99     *
100     */
101    public List<CTColumn> getCol() {
102        if (col == null) {
103            col = new ArrayList<CTColumn>();
104        }
105        return this.col;
106    }
107
108    /**
109     * Gets the value of the equalWidth property.
110     *
111     * @return
112     *     possible object is
113     *     {@link Boolean }
114     *     
115     */
116    public boolean isEqualWidth() {
117        if (equalWidth == null) {
118            return true;
119        } else {
120            return equalWidth;
121        }
122    }
123
124    /**
125     * Sets the value of the equalWidth property.
126     *
127     * @param value
128     *     allowed object is
129     *     {@link Boolean }
130     *     
131     */
132    public void setEqualWidth(Boolean value) {
133        this.equalWidth = value;
134    }
135
136    /**
137     * Gets the value of the space property.
138     *
139     * @return
140     *     possible object is
141     *     {@link BigInteger }
142     *     
143     */
144    public BigInteger getSpace() {
145        return space;
146    }
147
148    /**
149     * Sets the value of the space property.
150     *
151     * @param value
152     *     allowed object is
153     *     {@link BigInteger }
154     *     
155     */
156    public void setSpace(BigInteger value) {
157        this.space = value;
158    }
159
160    /**
161     * Gets the value of the num property.
162     *
163     * @return
164     *     possible object is
165     *     {@link BigInteger }
166     *     
167     */
168    public BigInteger getNum() {
169        return num;
170    }
171
172    /**
173     * Sets the value of the num property.
174     *
175     * @param value
176     *     allowed object is
177     *     {@link BigInteger }
178     *     
179     */
180    public void setNum(BigInteger value) {
181        this.num = value;
182    }
183
184    /**
185     * Gets the value of the sep property.
186     *
187     * @return
188     *     possible object is
189     *     {@link Boolean }
190     *     
191     */
192    public boolean isSep() {
193        if (sep == null) {
194            return true;
195        } else {
196            return sep;
197        }
198    }
199
200    /**
201     * Sets the value of the sep property.
202     *
203     * @param value
204     *     allowed object is
205     *     {@link Boolean }
206     *     
207     */
208    public void setSep(Boolean value) {
209        this.sep = value;
210    }
211
212    /**
213     * Gets the parent object in the object tree representing the unmarshalled xml document.
214     *
215     * @return
216     *     The parent object.
217     */
218    public Object getParent() {
219        return this.parent;
220    }
221
222    public void setParent(Object parent) {
223        this.parent = parent;
224    }
225
226    /**
227     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
228     *
229     * @param parent
230     *     The parent object in the object tree.
231     * @param unmarshaller
232     *     The unmarshaller that generated the instance.
233     */
234    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
235        setParent(parent);
236    }
237
238}
Note: See TracBrowser for help on using the repository browser.