source: trunk/docx4j/src/main/java/org/docx4j/wml/STThemeColor.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 javax.xml.bind.annotation.XmlEnum;
25import javax.xml.bind.annotation.XmlEnumValue;
26import javax.xml.bind.annotation.XmlType;
27
28
29/**
30 * <p>Java class for ST_ThemeColor.
31 *
32 * <p>The following schema fragment specifies the expected content contained within this class.
33 * <p>
34 * <pre>
35 * &lt;simpleType name="ST_ThemeColor">
36 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
37 *     &lt;enumeration value="dark1"/>
38 *     &lt;enumeration value="light1"/>
39 *     &lt;enumeration value="dark2"/>
40 *     &lt;enumeration value="light2"/>
41 *     &lt;enumeration value="accent1"/>
42 *     &lt;enumeration value="accent2"/>
43 *     &lt;enumeration value="accent3"/>
44 *     &lt;enumeration value="accent4"/>
45 *     &lt;enumeration value="accent5"/>
46 *     &lt;enumeration value="accent6"/>
47 *     &lt;enumeration value="hyperlink"/>
48 *     &lt;enumeration value="followedHyperlink"/>
49 *     &lt;enumeration value="none"/>
50 *     &lt;enumeration value="background1"/>
51 *     &lt;enumeration value="text1"/>
52 *     &lt;enumeration value="background2"/>
53 *     &lt;enumeration value="text2"/>
54 *   &lt;/restriction>
55 * &lt;/simpleType>
56 * </pre>
57 *
58 */
59@XmlType(name = "ST_ThemeColor")
60@XmlEnum
61public enum STThemeColor {
62
63
64    /**
65     * Dark 1 Theme Color
66     *
67     */
68    @XmlEnumValue("dark1")
69    DARK_1("dark1"),
70
71    /**
72     * Light 1 Theme Color
73     *
74     */
75    @XmlEnumValue("light1")
76    LIGHT_1("light1"),
77
78    /**
79     * Dark 2 Theme Color
80     *
81     */
82    @XmlEnumValue("dark2")
83    DARK_2("dark2"),
84
85    /**
86     * Light 2 Theme Color
87     *
88     */
89    @XmlEnumValue("light2")
90    LIGHT_2("light2"),
91
92    /**
93     * Accent 1 Theme Color
94     *
95     */
96    @XmlEnumValue("accent1")
97    ACCENT_1("accent1"),
98
99    /**
100     * Accent 2 Theme Color
101     *
102     */
103    @XmlEnumValue("accent2")
104    ACCENT_2("accent2"),
105
106    /**
107     * Accent 3 Theme Color
108     *
109     */
110    @XmlEnumValue("accent3")
111    ACCENT_3("accent3"),
112
113    /**
114     * Accent 4 Theme Color
115     *
116     */
117    @XmlEnumValue("accent4")
118    ACCENT_4("accent4"),
119
120    /**
121     * Accent 5 Theme Color
122     *
123     */
124    @XmlEnumValue("accent5")
125    ACCENT_5("accent5"),
126
127    /**
128     * Accent 6 Theme Color
129     *
130     */
131    @XmlEnumValue("accent6")
132    ACCENT_6("accent6"),
133
134    /**
135     * Hyperlink Theme Color
136     *
137     */
138    @XmlEnumValue("hyperlink")
139    HYPERLINK("hyperlink"),
140
141    /**
142     * Followed Hyperlink Theme
143     *                                          Color
144     *
145     */
146    @XmlEnumValue("followedHyperlink")
147    FOLLOWED_HYPERLINK("followedHyperlink"),
148
149    /**
150     * No Theme Color
151     *
152     */
153    @XmlEnumValue("none")
154    NONE("none"),
155
156    /**
157     * Background 1 Theme Color
158     *
159     */
160    @XmlEnumValue("background1")
161    BACKGROUND_1("background1"),
162
163    /**
164     * Text 1 Theme Color
165     *
166     */
167    @XmlEnumValue("text1")
168    TEXT_1("text1"),
169
170    /**
171     * Background 2 Theme Color
172     *
173     */
174    @XmlEnumValue("background2")
175    BACKGROUND_2("background2"),
176
177    /**
178     * Text 2 Theme Color
179     *
180     */
181    @XmlEnumValue("text2")
182    TEXT_2("text2");
183    private final String value;
184
185    STThemeColor(String v) {
186        value = v;
187    }
188
189    public String value() {
190        return value;
191    }
192
193    public static STThemeColor fromValue(String v) {
194        for (STThemeColor c: STThemeColor.values()) {
195            if (c.value.equals(v)) {
196                return c;
197            }
198        }
199        throw new IllegalArgumentException(v);
200    }
201
202}
Note: See TracBrowser for help on using the repository browser.