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

Revision 359, 4.1 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.util.ArrayList;
25import java.util.List;
26import javax.xml.bind.Unmarshaller;
27import javax.xml.bind.annotation.XmlAccessType;
28import javax.xml.bind.annotation.XmlAccessorType;
29import javax.xml.bind.annotation.XmlAttribute;
30import javax.xml.bind.annotation.XmlTransient;
31import javax.xml.bind.annotation.XmlType;
32import org.jvnet.jaxb2_commons.ppp.Child;
33
34
35/**
36 * <p>Java class for CT_SdtDropDownList complex type.
37 *
38 * <p>The following schema fragment specifies the expected content contained within this class.
39 *
40 * <pre>
41 * &lt;complexType name="CT_SdtDropDownList">
42 *   &lt;complexContent>
43 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
44 *       &lt;sequence>
45 *         &lt;element name="listItem" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_SdtListItem" maxOccurs="unbounded" minOccurs="0"/>
46 *       &lt;/sequence>
47 *       &lt;attribute name="lastValue" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_String" />
48 *     &lt;/restriction>
49 *   &lt;/complexContent>
50 * &lt;/complexType>
51 * </pre>
52 *
53 *
54 */
55@XmlAccessorType(XmlAccessType.FIELD)
56@XmlType(name = "CT_SdtDropDownList", propOrder = {
57    "listItem"
58})
59public class CTSdtDropDownList
60    implements Child
61{
62
63    protected List<CTSdtListItem> listItem;
64    @XmlAttribute(namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")
65    protected String lastValue;
66    @XmlTransient
67    private Object parent;
68
69    /**
70     * Gets the value of the listItem property.
71     *
72     * <p>
73     * This accessor method returns a reference to the live list,
74     * not a snapshot. Therefore any modification you make to the
75     * returned list will be present inside the JAXB object.
76     * This is why there is not a <CODE>set</CODE> method for the listItem property.
77     *
78     * <p>
79     * For example, to add a new item, do as follows:
80     * <pre>
81     *    getListItem().add(newItem);
82     * </pre>
83     *
84     *
85     * <p>
86     * Objects of the following type(s) are allowed in the list
87     * {@link CTSdtListItem }
88     *
89     *
90     */
91    public List<CTSdtListItem> getListItem() {
92        if (listItem == null) {
93            listItem = new ArrayList<CTSdtListItem>();
94        }
95        return this.listItem;
96    }
97
98    /**
99     * Gets the value of the lastValue property.
100     *
101     * @return
102     *     possible object is
103     *     {@link String }
104     *     
105     */
106    public String getLastValue() {
107        return lastValue;
108    }
109
110    /**
111     * Sets the value of the lastValue property.
112     *
113     * @param value
114     *     allowed object is
115     *     {@link String }
116     *     
117     */
118    public void setLastValue(String value) {
119        this.lastValue = value;
120    }
121
122    /**
123     * Gets the parent object in the object tree representing the unmarshalled xml document.
124     *
125     * @return
126     *     The parent object.
127     */
128    public Object getParent() {
129        return this.parent;
130    }
131
132    public void setParent(Object parent) {
133        this.parent = parent;
134    }
135
136    /**
137     * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
138     *
139     * @param parent
140     *     The parent object in the object tree.
141     * @param unmarshaller
142     *     The unmarshaller that generated the instance.
143     */
144    public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
145        setParent(parent);
146    }
147
148}
Note: See TracBrowser for help on using the repository browser.