1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.uruma.component.jface;
17
18 import java.util.ArrayList;
19 import java.util.Collections;
20 import java.util.List;
21
22 import org.eclipse.swt.widgets.TableItem;
23 import org.seasar.uruma.annotation.ComponentAttribute;
24 import org.seasar.uruma.annotation.ComponentElement;
25 import org.seasar.uruma.annotation.FieldDescription;
26 import org.seasar.uruma.annotation.RenderingPolicy;
27 import org.seasar.uruma.annotation.RenderingPolicy.ConversionType;
28 import org.seasar.uruma.annotation.RenderingPolicy.TargetType;
29 import org.seasar.uruma.component.base.AbstractItemComponent;
30
31
32
33
34
35
36 @ComponentElement
37 public class TableItemComponent extends AbstractItemComponent {
38
39 private List<TableCellComponent> tableCells = new ArrayList<TableCellComponent>();
40
41 @RenderingPolicy(conversionType = ConversionType.COLOR)
42 @ComponentAttribute
43 @FieldDescription("背景色")
44 public String background;
45
46 @RenderingPolicy(conversionType = ConversionType.BOOLEAN)
47 @ComponentAttribute
48 @FieldDescription("チェック状態")
49 public String checked;
50
51 @RenderingPolicy(targetType = TargetType.NONE)
52 @ComponentAttribute
53 @FieldDescription("フォント高さ")
54 public String fontHeight;
55
56 @RenderingPolicy(targetType = TargetType.NONE)
57 @ComponentAttribute
58 @FieldDescription("フォント名称")
59 public String fontName;
60
61 @RenderingPolicy(targetType = TargetType.NONE)
62 @ComponentAttribute
63 @FieldDescription("フォントスタイル")
64 public String fontStyle;
65
66 @RenderingPolicy(conversionType = ConversionType.COLOR)
67 @ComponentAttribute
68 @FieldDescription("前景色")
69 public String foreground;
70
71 @RenderingPolicy(conversionType = ConversionType.BOOLEAN)
72 @ComponentAttribute
73 @FieldDescription("グレーアウト状態")
74 public String grayed;
75
76 @RenderingPolicy(targetType = TargetType.NONE)
77 @ComponentAttribute
78 @FieldDescription("イメージパス")
79 public String image;
80
81 @RenderingPolicy(targetType = TargetType.NONE)
82 @ComponentAttribute
83 @FieldDescription("テキスト")
84 public String text;
85
86
87
88
89
90
91
92 public void addTableCell(final TableCellComponent cell) {
93 this.tableCells.add(cell);
94 }
95
96
97
98
99
100
101 public List<TableCellComponent> getTableCells() {
102 return Collections.unmodifiableList(tableCells);
103 }
104 }