| 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.dml; |
|---|
| 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_PresetLineDashVal. |
|---|
| 31 | * |
|---|
| 32 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 33 | * <p> |
|---|
| 34 | * <pre> |
|---|
| 35 | * <simpleType name="ST_PresetLineDashVal"> |
|---|
| 36 | * <restriction base="{http://www.w3.org/2001/XMLSchema}token"> |
|---|
| 37 | * <enumeration value="solid"/> |
|---|
| 38 | * <enumeration value="dot"/> |
|---|
| 39 | * <enumeration value="dash"/> |
|---|
| 40 | * <enumeration value="lgDash"/> |
|---|
| 41 | * <enumeration value="dashDot"/> |
|---|
| 42 | * <enumeration value="lgDashDot"/> |
|---|
| 43 | * <enumeration value="lgDashDotDot"/> |
|---|
| 44 | * <enumeration value="sysDash"/> |
|---|
| 45 | * <enumeration value="sysDot"/> |
|---|
| 46 | * <enumeration value="sysDashDot"/> |
|---|
| 47 | * <enumeration value="sysDashDotDot"/> |
|---|
| 48 | * </restriction> |
|---|
| 49 | * </simpleType> |
|---|
| 50 | * </pre> |
|---|
| 51 | * |
|---|
| 52 | */ |
|---|
| 53 | @XmlType(name = "ST_PresetLineDashVal") |
|---|
| 54 | @XmlEnum |
|---|
| 55 | public enum STPresetLineDashVal { |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | /** |
|---|
| 59 | * Solid |
|---|
| 60 | * |
|---|
| 61 | */ |
|---|
| 62 | @XmlEnumValue("solid") |
|---|
| 63 | SOLID("solid"), |
|---|
| 64 | |
|---|
| 65 | /** |
|---|
| 66 | * Dot |
|---|
| 67 | * |
|---|
| 68 | */ |
|---|
| 69 | @XmlEnumValue("dot") |
|---|
| 70 | DOT("dot"), |
|---|
| 71 | |
|---|
| 72 | /** |
|---|
| 73 | * Dash |
|---|
| 74 | * |
|---|
| 75 | */ |
|---|
| 76 | @XmlEnumValue("dash") |
|---|
| 77 | DASH("dash"), |
|---|
| 78 | |
|---|
| 79 | /** |
|---|
| 80 | * Large Dash |
|---|
| 81 | * |
|---|
| 82 | */ |
|---|
| 83 | @XmlEnumValue("lgDash") |
|---|
| 84 | LG_DASH("lgDash"), |
|---|
| 85 | |
|---|
| 86 | /** |
|---|
| 87 | * Dash Dot |
|---|
| 88 | * |
|---|
| 89 | */ |
|---|
| 90 | @XmlEnumValue("dashDot") |
|---|
| 91 | DASH_DOT("dashDot"), |
|---|
| 92 | |
|---|
| 93 | /** |
|---|
| 94 | * Large Dash Dot |
|---|
| 95 | * |
|---|
| 96 | */ |
|---|
| 97 | @XmlEnumValue("lgDashDot") |
|---|
| 98 | LG_DASH_DOT("lgDashDot"), |
|---|
| 99 | |
|---|
| 100 | /** |
|---|
| 101 | * Large Dash Dot Dot |
|---|
| 102 | * |
|---|
| 103 | */ |
|---|
| 104 | @XmlEnumValue("lgDashDotDot") |
|---|
| 105 | LG_DASH_DOT_DOT("lgDashDotDot"), |
|---|
| 106 | |
|---|
| 107 | /** |
|---|
| 108 | * System Dash |
|---|
| 109 | * |
|---|
| 110 | */ |
|---|
| 111 | @XmlEnumValue("sysDash") |
|---|
| 112 | SYS_DASH("sysDash"), |
|---|
| 113 | |
|---|
| 114 | /** |
|---|
| 115 | * System Dot |
|---|
| 116 | * |
|---|
| 117 | */ |
|---|
| 118 | @XmlEnumValue("sysDot") |
|---|
| 119 | SYS_DOT("sysDot"), |
|---|
| 120 | |
|---|
| 121 | /** |
|---|
| 122 | * System Dash Dot |
|---|
| 123 | * |
|---|
| 124 | */ |
|---|
| 125 | @XmlEnumValue("sysDashDot") |
|---|
| 126 | SYS_DASH_DOT("sysDashDot"), |
|---|
| 127 | |
|---|
| 128 | /** |
|---|
| 129 | * System Dash Dot Dot |
|---|
| 130 | * |
|---|
| 131 | */ |
|---|
| 132 | @XmlEnumValue("sysDashDotDot") |
|---|
| 133 | SYS_DASH_DOT_DOT("sysDashDotDot"); |
|---|
| 134 | private final String value; |
|---|
| 135 | |
|---|
| 136 | STPresetLineDashVal(String v) { |
|---|
| 137 | value = v; |
|---|
| 138 | } |
|---|
| 139 | |
|---|
| 140 | public String value() { |
|---|
| 141 | return value; |
|---|
| 142 | } |
|---|
| 143 | |
|---|
| 144 | public static STPresetLineDashVal fromValue(String v) { |
|---|
| 145 | for (STPresetLineDashVal c: STPresetLineDashVal.values()) { |
|---|
| 146 | if (c.value.equals(v)) { |
|---|
| 147 | return c; |
|---|
| 148 | } |
|---|
| 149 | } |
|---|
| 150 | throw new IllegalArgumentException(v); |
|---|
| 151 | } |
|---|
| 152 | |
|---|
| 153 | } |
|---|