1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.common.ui.client.widgets;
17
18 import org.kuali.student.common.ui.client.widgets.layout.VerticalFlowPanel;
19
20 import com.google.gwt.user.client.ui.Composite;
21
22 public class KSTitleDescPanel extends Composite{
23 private VerticalFlowPanel layout = new VerticalFlowPanel();
24 private KSLabel title = new KSLabel();
25 private KSLabel desc = new KSLabel();
26
27 public KSTitleDescPanel(String title, String desc){
28 this.title.setText(title);
29 this.desc.setText(desc);
30 this.title.setStyleName("KS-Common-Title");
31 this.desc.setStyleName("KS-Common-Desc");
32 layout.add(this.title);
33 layout.add(this.desc);
34 this.initWidget(layout);
35 }
36
37 public KSTitleDescPanel(String title){
38 this.title.setText(title);
39 this.title.setStyleName("KS-Common-Title");
40 this.desc.setStyleName("KS-Common-Desc");
41 layout.add(this.title);
42 layout.add(this.desc);
43 this.desc.setVisible(false);
44 this.initWidget(layout);
45 }
46
47 public KSTitleDescPanel(){
48 layout.add(this.title);
49 layout.add(this.desc);
50 this.title.setStyleName("KS-Common-Title");
51 this.desc.setStyleName("KS-Common-Desc");
52 this.desc.setVisible(false);
53 this.title.setVisible(false);
54 this.initWidget(layout);
55 }
56
57 public void setTitleText(String title){
58 this.title.setText(title);
59 this.title.setVisible(true);
60 }
61
62 public void setDesc(String desc){
63 this.desc.setText(desc);
64 this.desc.setVisible(true);
65 }
66
67 public KSLabel getTitleWidget() {
68 return title;
69 }
70
71 public KSLabel getDescWidget(){
72 return desc;
73 }
74
75
76 }