source: trunk/docx4j/src/main/java/org/docx4j/dml/CTPath2D.java @ 1201

Revision 1201, 7.2 KB checked in by jharrop, 21 months ago (diff)

Additional xlsx parts. Had to regenerate dml/ to include spreadsheet drawing.

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.dml;
23
24import java.util.ArrayList;
25import java.util.List;
26import javax.xml.bind.annotation.XmlAccessType;
27import javax.xml.bind.annotation.XmlAccessorType;
28import javax.xml.bind.annotation.XmlAttribute;
29import javax.xml.bind.annotation.XmlElement;
30import javax.xml.bind.annotation.XmlElements;
31import javax.xml.bind.annotation.XmlType;
32
33
34/**
35 * <p>Java class for CT_Path2D complex type.
36 *
37 * <p>The following schema fragment specifies the expected content contained within this class.
38 *
39 * <pre>
40 * &lt;complexType name="CT_Path2D">
41 *   &lt;complexContent>
42 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
43 *       &lt;choice maxOccurs="unbounded" minOccurs="0">
44 *         &lt;element name="close" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DClose"/>
45 *         &lt;element name="moveTo" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DMoveTo"/>
46 *         &lt;element name="lnTo" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DLineTo"/>
47 *         &lt;element name="arcTo" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DArcTo"/>
48 *         &lt;element name="quadBezTo" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DQuadBezierTo"/>
49 *         &lt;element name="cubicBezTo" type="{http://schemas.openxmlformats.org/drawingml/2006/main}CT_Path2DCubicBezierTo"/>
50 *       &lt;/choice>
51 *       &lt;attribute name="w" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveCoordinate" default="0" />
52 *       &lt;attribute name="h" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PositiveCoordinate" default="0" />
53 *       &lt;attribute name="fill" type="{http://schemas.openxmlformats.org/drawingml/2006/main}ST_PathFillMode" default="norm" />
54 *       &lt;attribute name="stroke" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
55 *       &lt;attribute name="extrusionOk" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
56 *     &lt;/restriction>
57 *   &lt;/complexContent>
58 * &lt;/complexType>
59 * </pre>
60 *
61 *
62 */
63@XmlAccessorType(XmlAccessType.FIELD)
64@XmlType(name = "CT_Path2D", propOrder = {
65    "closeOrMoveToOrLnTo"
66})
67public class CTPath2D {
68
69    @XmlElements({
70        @XmlElement(name = "lnTo", type = CTPath2DLineTo.class),
71        @XmlElement(name = "quadBezTo", type = CTPath2DQuadBezierTo.class),
72        @XmlElement(name = "arcTo", type = CTPath2DArcTo.class),
73        @XmlElement(name = "close", type = CTPath2DClose.class),
74        @XmlElement(name = "moveTo", type = CTPath2DMoveTo.class),
75        @XmlElement(name = "cubicBezTo", type = CTPath2DCubicBezierTo.class)
76    })
77    protected List<Object> closeOrMoveToOrLnTo;
78    @XmlAttribute
79    protected Long w;
80    @XmlAttribute
81    protected Long h;
82    @XmlAttribute
83    protected STPathFillMode fill;
84    @XmlAttribute
85    protected Boolean stroke;
86    @XmlAttribute
87    protected Boolean extrusionOk;
88
89    /**
90     * Gets the value of the closeOrMoveToOrLnTo property.
91     *
92     * <p>
93     * This accessor method returns a reference to the live list,
94     * not a snapshot. Therefore any modification you make to the
95     * returned list will be present inside the JAXB object.
96     * This is why there is not a <CODE>set</CODE> method for the closeOrMoveToOrLnTo property.
97     *
98     * <p>
99     * For example, to add a new item, do as follows:
100     * <pre>
101     *    getCloseOrMoveToOrLnTo().add(newItem);
102     * </pre>
103     *
104     *
105     * <p>
106     * Objects of the following type(s) are allowed in the list
107     * {@link CTPath2DLineTo }
108     * {@link CTPath2DQuadBezierTo }
109     * {@link CTPath2DArcTo }
110     * {@link CTPath2DClose }
111     * {@link CTPath2DMoveTo }
112     * {@link CTPath2DCubicBezierTo }
113     *
114     *
115     */
116    public List<Object> getCloseOrMoveToOrLnTo() {
117        if (closeOrMoveToOrLnTo == null) {
118            closeOrMoveToOrLnTo = new ArrayList<Object>();
119        }
120        return this.closeOrMoveToOrLnTo;
121    }
122
123    /**
124     * Gets the value of the w property.
125     *
126     * @return
127     *     possible object is
128     *     {@link Long }
129     *     
130     */
131    public long getW() {
132        if (w == null) {
133            return  0L;
134        } else {
135            return w;
136        }
137    }
138
139    /**
140     * Sets the value of the w property.
141     *
142     * @param value
143     *     allowed object is
144     *     {@link Long }
145     *     
146     */
147    public void setW(Long value) {
148        this.w = value;
149    }
150
151    /**
152     * Gets the value of the h property.
153     *
154     * @return
155     *     possible object is
156     *     {@link Long }
157     *     
158     */
159    public long getH() {
160        if (h == null) {
161            return  0L;
162        } else {
163            return h;
164        }
165    }
166
167    /**
168     * Sets the value of the h property.
169     *
170     * @param value
171     *     allowed object is
172     *     {@link Long }
173     *     
174     */
175    public void setH(Long value) {
176        this.h = value;
177    }
178
179    /**
180     * Gets the value of the fill property.
181     *
182     * @return
183     *     possible object is
184     *     {@link STPathFillMode }
185     *     
186     */
187    public STPathFillMode getFill() {
188        if (fill == null) {
189            return STPathFillMode.NORM;
190        } else {
191            return fill;
192        }
193    }
194
195    /**
196     * Sets the value of the fill property.
197     *
198     * @param value
199     *     allowed object is
200     *     {@link STPathFillMode }
201     *     
202     */
203    public void setFill(STPathFillMode value) {
204        this.fill = value;
205    }
206
207    /**
208     * Gets the value of the stroke property.
209     *
210     * @return
211     *     possible object is
212     *     {@link Boolean }
213     *     
214     */
215    public boolean isStroke() {
216        if (stroke == null) {
217            return true;
218        } else {
219            return stroke;
220        }
221    }
222
223    /**
224     * Sets the value of the stroke property.
225     *
226     * @param value
227     *     allowed object is
228     *     {@link Boolean }
229     *     
230     */
231    public void setStroke(Boolean value) {
232        this.stroke = value;
233    }
234
235    /**
236     * Gets the value of the extrusionOk property.
237     *
238     * @return
239     *     possible object is
240     *     {@link Boolean }
241     *     
242     */
243    public boolean isExtrusionOk() {
244        if (extrusionOk == null) {
245            return true;
246        } else {
247            return extrusionOk;
248        }
249    }
250
251    /**
252     * Sets the value of the extrusionOk property.
253     *
254     * @param value
255     *     allowed object is
256     *     {@link Boolean }
257     *     
258     */
259    public void setExtrusionOk(Boolean value) {
260        this.extrusionOk = value;
261    }
262
263}
Note: See TracBrowser for help on using the repository browser.