| 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 | |
|---|
| 22 | package org.docx4j.wml; |
|---|
| 23 | |
|---|
| 24 | import javax.xml.bind.annotation.XmlEnum; |
|---|
| 25 | import javax.xml.bind.annotation.XmlEnumValue; |
|---|
| 26 | import 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 | * <simpleType name="ST_ThemeColor"> |
|---|
| 36 | * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> |
|---|
| 37 | * <enumeration value="dark1"/> |
|---|
| 38 | * <enumeration value="light1"/> |
|---|
| 39 | * <enumeration value="dark2"/> |
|---|
| 40 | * <enumeration value="light2"/> |
|---|
| 41 | * <enumeration value="accent1"/> |
|---|
| 42 | * <enumeration value="accent2"/> |
|---|
| 43 | * <enumeration value="accent3"/> |
|---|
| 44 | * <enumeration value="accent4"/> |
|---|
| 45 | * <enumeration value="accent5"/> |
|---|
| 46 | * <enumeration value="accent6"/> |
|---|
| 47 | * <enumeration value="hyperlink"/> |
|---|
| 48 | * <enumeration value="followedHyperlink"/> |
|---|
| 49 | * <enumeration value="none"/> |
|---|
| 50 | * <enumeration value="background1"/> |
|---|
| 51 | * <enumeration value="text1"/> |
|---|
| 52 | * <enumeration value="background2"/> |
|---|
| 53 | * <enumeration value="text2"/> |
|---|
| 54 | * </restriction> |
|---|
| 55 | * </simpleType> |
|---|
| 56 | * </pre> |
|---|
| 57 | * |
|---|
| 58 | */ |
|---|
| 59 | @XmlType(name = "ST_ThemeColor") |
|---|
| 60 | @XmlEnum |
|---|
| 61 | public 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 | } |
|---|