OSDN Git Service

初期インポート
[u6kcommons/weekly-report.git] / weekly-report / src / jp / co / showa_sys_eng / weekly_report / gwt / client / widget / IconLabel.java
1 \r
2 package jp.co.showa_sys_eng.weekly_report.gwt.client.widget;\r
3 \r
4 import com.extjs.gxt.ui.client.widget.Composite;\r
5 import com.extjs.gxt.ui.client.widget.LayoutContainer;\r
6 import com.extjs.gxt.ui.client.widget.Text;\r
7 import com.extjs.gxt.ui.client.widget.form.LabelField;\r
8 import com.extjs.gxt.ui.client.widget.layout.TableLayout;\r
9 \r
10 public class IconLabel extends Composite {\r
11 \r
12     private Text icon;\r
13 \r
14     private LabelField text;\r
15 \r
16     public IconLabel() {\r
17         LayoutContainer c = new LayoutContainer();\r
18         c.setLayout(new TableLayout(2));\r
19 \r
20         this.icon = new Text();\r
21         this.icon.setWidth(20);\r
22         c.add(this.icon);\r
23 \r
24         this.text = new LabelField();\r
25         c.add(this.text);\r
26 \r
27         this.initComponent(c);\r
28     }\r
29 \r
30     public String getIconStyle() {\r
31         return this.icon.getStyleName();\r
32     }\r
33 \r
34     public void setIconStyle(String styleName) {\r
35         this.icon.setStyleName(styleName);\r
36     }\r
37 \r
38     public int getIconWidth() {\r
39         return this.icon.getWidth();\r
40     }\r
41 \r
42     public void setIconWidth(int iconWidth) {\r
43         this.icon.setWidth(iconWidth);\r
44     }\r
45 \r
46     public String getText() {\r
47         return this.text.getText();\r
48     }\r
49 \r
50     public void setText(String text) {\r
51         this.text.setText(text);\r
52     }\r
53 \r
54     public String getTextStyleName() {\r
55         return this.text.getStyleName();\r
56     }\r
57 \r
58     public void setTextStyleName(String styleName) {\r
59         this.text.setStyleName(styleName);\r
60     }\r
61 \r
62 }\r