01: /*
02: * Copyright 2004-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.springframework.binding.format;
17:
18: import java.text.DateFormat;
19:
20: import org.springframework.core.enums.StaticLabeledEnum;
21:
22: /**
23: * Format styles, similar to those defined by {@link java.text.DateFormat}.
24: *
25: * @author Keith Donald
26: */
27: public class Style extends StaticLabeledEnum {
28:
29: /**
30: * See {@link java.text.DateFormat#FULL}.
31: */
32: public static final Style FULL = new Style(DateFormat.FULL, "Full");
33:
34: /**
35: * See {@link java.text.DateFormat#LONG}.
36: */
37: public static final Style LONG = new Style(DateFormat.LONG, "Long");
38:
39: /**
40: * See {@link java.text.DateFormat#MEDIUM}.
41: */
42: public static final Style MEDIUM = new Style(DateFormat.MEDIUM,
43: "Medium");
44:
45: /**
46: * See {@link java.text.DateFormat#SHORT}.
47: */
48: public static final Style SHORT = new Style(DateFormat.SHORT,
49: "Short");
50:
51: /**
52: * Private constructor since this is a type-safe enum.
53: */
54: private Style(int code, String label) {
55: super(code, label);
56: }
57: }
|