| 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_TblStyleOverrideType. |
|---|
| 31 | * |
|---|
| 32 | * <p>The following schema fragment specifies the expected content contained within this class. |
|---|
| 33 | * <p> |
|---|
| 34 | * <pre> |
|---|
| 35 | * <simpleType name="ST_TblStyleOverrideType"> |
|---|
| 36 | * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> |
|---|
| 37 | * <enumeration value="wholeTable"/> |
|---|
| 38 | * <enumeration value="firstRow"/> |
|---|
| 39 | * <enumeration value="lastRow"/> |
|---|
| 40 | * <enumeration value="firstCol"/> |
|---|
| 41 | * <enumeration value="lastCol"/> |
|---|
| 42 | * <enumeration value="band1Vert"/> |
|---|
| 43 | * <enumeration value="band2Vert"/> |
|---|
| 44 | * <enumeration value="band1Horz"/> |
|---|
| 45 | * <enumeration value="band2Horz"/> |
|---|
| 46 | * <enumeration value="neCell"/> |
|---|
| 47 | * <enumeration value="nwCell"/> |
|---|
| 48 | * <enumeration value="seCell"/> |
|---|
| 49 | * <enumeration value="swCell"/> |
|---|
| 50 | * </restriction> |
|---|
| 51 | * </simpleType> |
|---|
| 52 | * </pre> |
|---|
| 53 | * |
|---|
| 54 | */ |
|---|
| 55 | @XmlType(name = "ST_TblStyleOverrideType") |
|---|
| 56 | @XmlEnum |
|---|
| 57 | public enum STTblStyleOverrideType { |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | /** |
|---|
| 61 | * Whole table formatting |
|---|
| 62 | * |
|---|
| 63 | */ |
|---|
| 64 | @XmlEnumValue("wholeTable") |
|---|
| 65 | WHOLE_TABLE("wholeTable"), |
|---|
| 66 | |
|---|
| 67 | /** |
|---|
| 68 | * First Row Conditional |
|---|
| 69 | * Formatting |
|---|
| 70 | * |
|---|
| 71 | */ |
|---|
| 72 | @XmlEnumValue("firstRow") |
|---|
| 73 | FIRST_ROW("firstRow"), |
|---|
| 74 | |
|---|
| 75 | /** |
|---|
| 76 | * Last table row |
|---|
| 77 | * formatting |
|---|
| 78 | * |
|---|
| 79 | */ |
|---|
| 80 | @XmlEnumValue("lastRow") |
|---|
| 81 | LAST_ROW("lastRow"), |
|---|
| 82 | |
|---|
| 83 | /** |
|---|
| 84 | * First Column Conditional |
|---|
| 85 | * Formatting |
|---|
| 86 | * |
|---|
| 87 | */ |
|---|
| 88 | @XmlEnumValue("firstCol") |
|---|
| 89 | FIRST_COL("firstCol"), |
|---|
| 90 | |
|---|
| 91 | /** |
|---|
| 92 | * Last table column |
|---|
| 93 | * formatting |
|---|
| 94 | * |
|---|
| 95 | */ |
|---|
| 96 | @XmlEnumValue("lastCol") |
|---|
| 97 | LAST_COL("lastCol"), |
|---|
| 98 | |
|---|
| 99 | /** |
|---|
| 100 | * Banded Column Conditional |
|---|
| 101 | * Formatting |
|---|
| 102 | * |
|---|
| 103 | */ |
|---|
| 104 | @XmlEnumValue("band1Vert") |
|---|
| 105 | BAND_1_VERT("band1Vert"), |
|---|
| 106 | |
|---|
| 107 | /** |
|---|
| 108 | * Even Column Stripe Conditional |
|---|
| 109 | * Formatting |
|---|
| 110 | * |
|---|
| 111 | */ |
|---|
| 112 | @XmlEnumValue("band2Vert") |
|---|
| 113 | BAND_2_VERT("band2Vert"), |
|---|
| 114 | |
|---|
| 115 | /** |
|---|
| 116 | * Banded Row Conditional |
|---|
| 117 | * Formatting |
|---|
| 118 | * |
|---|
| 119 | */ |
|---|
| 120 | @XmlEnumValue("band1Horz") |
|---|
| 121 | BAND_1_HORZ("band1Horz"), |
|---|
| 122 | |
|---|
| 123 | /** |
|---|
| 124 | * Even Row Stripe Conditional |
|---|
| 125 | * Formatting |
|---|
| 126 | * |
|---|
| 127 | */ |
|---|
| 128 | @XmlEnumValue("band2Horz") |
|---|
| 129 | BAND_2_HORZ("band2Horz"), |
|---|
| 130 | |
|---|
| 131 | /** |
|---|
| 132 | * Top right table cell |
|---|
| 133 | * formatting |
|---|
| 134 | * |
|---|
| 135 | */ |
|---|
| 136 | @XmlEnumValue("neCell") |
|---|
| 137 | NE_CELL("neCell"), |
|---|
| 138 | |
|---|
| 139 | /** |
|---|
| 140 | * Top left table cell |
|---|
| 141 | * formatting |
|---|
| 142 | * |
|---|
| 143 | */ |
|---|
| 144 | @XmlEnumValue("nwCell") |
|---|
| 145 | NW_CELL("nwCell"), |
|---|
| 146 | |
|---|
| 147 | /** |
|---|
| 148 | * Bottom right table cell |
|---|
| 149 | * formatting |
|---|
| 150 | * |
|---|
| 151 | */ |
|---|
| 152 | @XmlEnumValue("seCell") |
|---|
| 153 | SE_CELL("seCell"), |
|---|
| 154 | |
|---|
| 155 | /** |
|---|
| 156 | * Bottom left table cell |
|---|
| 157 | * formatting |
|---|
| 158 | * |
|---|
| 159 | */ |
|---|
| 160 | @XmlEnumValue("swCell") |
|---|
| 161 | SW_CELL("swCell"); |
|---|
| 162 | private final String value; |
|---|
| 163 | |
|---|
| 164 | STTblStyleOverrideType(String v) { |
|---|
| 165 | value = v; |
|---|
| 166 | } |
|---|
| 167 | |
|---|
| 168 | public String value() { |
|---|
| 169 | return value; |
|---|
| 170 | } |
|---|
| 171 | |
|---|
| 172 | public static STTblStyleOverrideType fromValue(String v) { |
|---|
| 173 | for (STTblStyleOverrideType c: STTblStyleOverrideType.values()) { |
|---|
| 174 | if (c.value.equals(v)) { |
|---|
| 175 | return c; |
|---|
| 176 | } |
|---|
| 177 | } |
|---|
| 178 | throw new IllegalArgumentException(v); |
|---|
| 179 | } |
|---|
| 180 | |
|---|
| 181 | } |
|---|