| 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_Wrap. |
|---|
| 31 | * |
|---|
| 32 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 33 | * <p> |
|---|
| 34 | * <pre> |
|---|
| 35 | * <simpleType name="ST_Wrap"> |
|---|
| 36 | * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> |
|---|
| 37 | * <enumeration value="auto"/> |
|---|
| 38 | * <enumeration value="notBeside"/> |
|---|
| 39 | * <enumeration value="around"/> |
|---|
| 40 | * <enumeration value="tight"/> |
|---|
| 41 | * <enumeration value="through"/> |
|---|
| 42 | * <enumeration value="none"/> |
|---|
| 43 | * </restriction> |
|---|
| 44 | * </simpleType> |
|---|
| 45 | * </pre> |
|---|
| 46 | * |
|---|
| 47 | */ |
|---|
| 48 | @XmlType(name = "ST_Wrap") |
|---|
| 49 | @XmlEnum |
|---|
| 50 | public enum STWrap { |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | /** |
|---|
| 54 | * Default Text Wrapping Around |
|---|
| 55 | * Frame |
|---|
| 56 | * |
|---|
| 57 | */ |
|---|
| 58 | @XmlEnumValue("auto") |
|---|
| 59 | AUTO("auto"), |
|---|
| 60 | |
|---|
| 61 | /** |
|---|
| 62 | * No Text Wrapping Beside |
|---|
| 63 | * Frame |
|---|
| 64 | * |
|---|
| 65 | */ |
|---|
| 66 | @XmlEnumValue("notBeside") |
|---|
| 67 | NOT_BESIDE("notBeside"), |
|---|
| 68 | |
|---|
| 69 | /** |
|---|
| 70 | * Allow Text Wrapping Around |
|---|
| 71 | * Frame |
|---|
| 72 | * |
|---|
| 73 | */ |
|---|
| 74 | @XmlEnumValue("around") |
|---|
| 75 | AROUND("around"), |
|---|
| 76 | |
|---|
| 77 | /** |
|---|
| 78 | * Tight Text Wrapping Around |
|---|
| 79 | * Frame |
|---|
| 80 | * |
|---|
| 81 | */ |
|---|
| 82 | @XmlEnumValue("tight") |
|---|
| 83 | TIGHT("tight"), |
|---|
| 84 | |
|---|
| 85 | /** |
|---|
| 86 | * Through Text Wrapping Around |
|---|
| 87 | * Frame |
|---|
| 88 | * |
|---|
| 89 | */ |
|---|
| 90 | @XmlEnumValue("through") |
|---|
| 91 | THROUGH("through"), |
|---|
| 92 | |
|---|
| 93 | /** |
|---|
| 94 | * No Text Wrapping Around |
|---|
| 95 | * Frame |
|---|
| 96 | * |
|---|
| 97 | */ |
|---|
| 98 | @XmlEnumValue("none") |
|---|
| 99 | NONE("none"); |
|---|
| 100 | private final String value; |
|---|
| 101 | |
|---|
| 102 | STWrap(String v) { |
|---|
| 103 | value = v; |
|---|
| 104 | } |
|---|
| 105 | |
|---|
| 106 | public String value() { |
|---|
| 107 | return value; |
|---|
| 108 | } |
|---|
| 109 | |
|---|
| 110 | public static STWrap fromValue(String v) { |
|---|
| 111 | for (STWrap c: STWrap.values()) { |
|---|
| 112 | if (c.value.equals(v)) { |
|---|
| 113 | return c; |
|---|
| 114 | } |
|---|
| 115 | } |
|---|
| 116 | throw new IllegalArgumentException(v); |
|---|
| 117 | } |
|---|
| 118 | |
|---|
| 119 | } |
|---|