1
2
3
4
5
6
7
8
9
10
11 package de.jaret.util.ui.table.renderer;
12
13 import org.eclipse.swt.graphics.FontData;
14 import org.eclipse.swt.graphics.RGB;
15
16 import de.jaret.util.misc.PropertyObservable;
17 import de.jaret.util.ui.table.model.ITableViewState;
18
19 /***
20 * Interface describing the style of a cell.
21 *
22 * @author Peter Kliem
23 * @version $Id: ICellStyle.java 347 2007-04-07 15:01:10Z olk $
24 */
25 public interface ICellStyle extends PropertyObservable {
26 /*** property name. */
27 String HORIZONTAL_ALIGNMENT = "HorizontalAlignment";
28
29 /*** property name. */
30 String VERTICAL_ALIGNMENT = "VerticalAlignment";
31
32 /*** property name. */
33 String BACKGROUNDCOLOR = "BackgroundColor";
34
35 /*** property name. */
36 String FOREGROUNDCOLOR = "ForegroundColor";
37
38 /*** property name. */
39 String FONT = "Font";
40
41 /*** property name. */
42 String BORDERCONFIGURATION = "BorderConfiguration";
43
44 /*** property name. */
45 String BORDERCOLOR = "BorderColor";
46
47 /***
48 * Retrieve the border configuration.
49 *
50 * @return the border configuration
51 */
52 IBorderConfiguration getBorderConfiguration();
53
54 /***
55 * Set the border configuration.
56 *
57 * @param borderConfiguration the onfiguration to use
58 */
59 void setBorderConfiguration(IBorderConfiguration borderConfiguration);
60
61 /***
62 * Retrieve the border color.
63 *
64 * @return border color
65 */
66 RGB getBorderColor();
67
68 /***
69 * Set the border color.
70 *
71 * @param bordercolor border color
72 */
73 void setBorderColor(RGB bordercolor);
74
75 /***
76 * Retrieve the foreground color.
77 *
78 * @return the foreground color
79 */
80 RGB getForegroundColor();
81
82 /***
83 * Set the foreground color.
84 *
85 * @param foreground the fore ground colro to use
86 */
87 void setForegroundColor(RGB foreground);
88
89 /***
90 * Retrieve the background color.
91 *
92 * @return the background color
93 */
94 RGB getBackgroundColor();
95
96 /***
97 * Set the background color.
98 *
99 * @param background the color to use
100 */
101 void setBackgroundColor(RGB background);
102
103 /***
104 * Retrieve the font.
105 *
106 * @return the font data for the font to use
107 */
108 FontData getFont();
109
110 /***
111 * Set the font.
112 *
113 * @param fontdata font data of the font
114 */
115 void setFont(FontData fontdata);
116
117 /***
118 * Retrieve the horizontal alignment.
119 *
120 * @return the horizontal alignment
121 */
122 ITableViewState.HAlignment getHorizontalAlignment();
123
124 /***
125 * Set the horizontal alignment.
126 *
127 * @param alignment the horizontal alignment
128 */
129 void setHorizontalAlignment(ITableViewState.HAlignment alignment);
130
131 /***
132 * Retrieve the vertical alignment.
133 *
134 * @return the vertical alignment
135 */
136 ITableViewState.VAlignment getVerticalAlignment();
137
138 /***
139 * Set the vertical alignemnt.
140 *
141 * @param alignment the vertical alignment
142 */
143 void setVerticalAlignment(ITableViewState.VAlignment alignment);
144
145 boolean getMultiLine();
146
147 void setMultiLine(boolean multiLine);
148
149 /***
150 * Copy the cell style.
151 *
152 * @return a copy of the cell style
153 */
154 ICellStyle copy();
155 }