1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif;
17
18 import java.text.MessageFormat;
19
20
21
22
23
24
25 public class CssConstants {
26
27 public static final String DISPLAY = "display: ";
28
29 public static class Displays {
30 public static final String BLOCK = DISPLAY + "block;";
31 public static final String INLINE = DISPLAY + "inline;";
32 public static final String INLINE_BLOCK = DISPLAY + "inline-block;";
33 public static final String NONE = DISPLAY + "none;";
34 }
35
36 public static final String TEXT_ALIGN = "text-align: ";
37
38 public static class TextAligns {
39 public static final String LEFT = TEXT_ALIGN + "left;";
40 public static final String RIGHT = TEXT_ALIGN + "right;";
41 public static final String CENTER = TEXT_ALIGN + "center;";
42 public static final String JUSTIFY = TEXT_ALIGN + "justify;";
43 public static final String INHERIT = TEXT_ALIGN + "inherit;";
44 }
45
46 public static final String VERTICAL_ALIGN = "vertical-align: ";
47
48 public static class VerticalAligns {
49 public static final String BASELINE = VERTICAL_ALIGN + "Baseline;";
50 public static final String BOTTOM = VERTICAL_ALIGN + "bottom;";
51 public static final String MIDDLE = VERTICAL_ALIGN + "middle;";
52 public static final String TOP = VERTICAL_ALIGN + "top;";
53 }
54
55 public static class Margins {
56 public static final String MARGIN_LEFT = "margin-left: {0};";
57 public static final String MARGIN_RIGHT = "margin-right: {0};";
58 public static final String MARGIN_TOP = "margin-top: {0};";
59 public static final String MARGIN_BOTTOM = "margin-bottom: {0};";
60 }
61
62 public static class Padding {
63 public static final String PADDING_LEFT = "padding-left: {0};";
64 public static final String PADDING_RIGHT = "padding-right: {0};";
65 public static final String PADDING_TOP = "padding-top: {0};";
66 public static final String PADDING_BOTTOM = "padding-bottom: {0};";
67 }
68
69 public static final String WIDTH = "width: ";
70 public static final String HEIGHT = "height: ";
71 public static final String OVERFLOW = "overflow: ";
72
73
74
75
76
77
78
79
80
81
82
83 public static final String getCssStyle(String style, String... parameters) {
84 MessageFormat cssStyle = new MessageFormat(style);
85
86 return cssStyle.format(parameters);
87 }
88 }