source: trunk/docx4j/src/main/java/org/docx4j/wml/JcEnumeration.java @ 1664

Revision 1664, 3.1 KB checked in by jharrop, 8 months ago (diff)

Include Asian options previously dropped from JcEnumeration?

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
21package org.docx4j.wml;
22
23import javax.xml.bind.annotation.XmlEnum;
24import javax.xml.bind.annotation.XmlEnumValue;
25import javax.xml.bind.annotation.XmlType;
26
27
28/**
29 * <p>Java class for JcEnumeration.
30 *
31 * <p>The following schema fragment specifies the expected content contained within this class.
32 * <p>
33 * <pre>
34 * &lt;simpleType name="JcEnumeration">
35 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
36 *     &lt;enumeration value="left"/>
37 *     &lt;enumeration value="center"/>
38 *     &lt;enumeration value="right"/>
39 *     &lt;enumeration value="both"/>
40 *     &lt;enumeration value="mediumKashida"/>
41 *     &lt;enumeration value="distribute"/>
42 *     &lt;enumeration value="numTab"/>
43 *     &lt;enumeration value="highKashida"/>
44 *     &lt;enumeration value="lowKashida"/>
45 *     &lt;enumeration value="thaiDistribute"/>
46 *   &lt;/restriction>
47 * &lt;/simpleType>
48 * </pre>
49 *
50 */
51@XmlType(name = "JcEnumeration")
52@XmlEnum
53public enum JcEnumeration {
54
55
56    /**
57     * Align Left
58     *
59     */
60    @XmlEnumValue("left")
61    LEFT("left"),
62
63    /**
64     * Align Center
65     *
66     */
67    @XmlEnumValue("center")
68    CENTER("center"),
69
70    /**
71     * Align Right
72     *
73     */
74    @XmlEnumValue("right")
75    RIGHT("right"),
76
77    /**
78     * Justified
79     *
80     */
81    @XmlEnumValue("both")
82    BOTH("both"),
83
84    /**
85     * Medium Kashida Length
86     *
87     */
88    @XmlEnumValue("mediumKashida")
89    MEDIUM_KASHIDA("mediumKashida"),
90
91    /**
92     * Distribute All Characters Equally
93     *                                 
94     *
95     */
96    @XmlEnumValue("distribute")
97    DISTRIBUTE("distribute"),
98
99    /**
100     * Align to List Tab
101     *
102     */
103    @XmlEnumValue("numTab")
104    NUM_TAB("numTab"),
105
106    /**
107     * Widest Kashida Length
108     *
109     */
110    @XmlEnumValue("highKashida")
111    HIGH_KASHIDA("highKashida"),
112
113    /**
114     * Low Kashida Length
115     *
116     */
117    @XmlEnumValue("lowKashida")
118    LOW_KASHIDA("lowKashida"),
119
120    /**
121     * Thai Language Justification
122     *
123     */
124    @XmlEnumValue("thaiDistribute")
125    THAI_DISTRIBUTE("thaiDistribute");
126    private final String value;
127
128    JcEnumeration(String v) {
129        value = v;
130    }
131
132    public String value() {
133        return value;
134    }
135
136    public static JcEnumeration fromValue(String v) {
137        for (JcEnumeration c: JcEnumeration.values()) {
138            if (c.value.equals(v)) {
139                return c;
140            }
141        }
142        throw new IllegalArgumentException(v);
143    }
144
145}
Note: See TracBrowser for help on using the repository browser.