1 package org.kuali.student.common.ui.client.widgets.headers;
2
3 import org.kuali.student.common.ui.client.widgets.StylishDropDown;
4
5 import com.google.gwt.core.client.GWT;
6 import com.google.gwt.uibinder.client.UiBinder;
7 import com.google.gwt.uibinder.client.UiField;
8 import com.google.gwt.user.client.ui.Composite;
9 import com.google.gwt.user.client.ui.FlowPanel;
10 import com.google.gwt.user.client.ui.Label;
11 import com.google.gwt.user.client.ui.Panel;
12 import com.google.gwt.user.client.ui.Widget;
13
14 @Deprecated
15 public class KSHeader extends Composite {
16
17 private static KSHeaderUiBinder uiBinder = GWT
18 .create(KSHeaderUiBinder.class);
19
20 interface KSHeaderUiBinder extends UiBinder<Widget, KSHeader> {
21 }
22
23 @UiField
24 public FlowPanel hiPanel;
25
26 @UiField
27 public FlowPanel userNamePanel;
28
29 @UiField
30 public FlowPanel logoutPanel;
31
32 @UiField
33 public FlowPanel leftPartPanel;
34
35 @UiField
36 public Label applicationTitleLabel;
37
38 @UiField
39 public FlowPanel bottomContainer;
40
41
42 protected Label userNameLabel = new Label("");
43 protected Label hiLabel = new Label("Hi,");
44 public KSHeader() {
45 initialize();
46 }
47
48 protected void initialize() {
49 initWidget(uiBinder.createAndBindUi(this));
50 hiPanel.add(hiLabel);
51 userNamePanel.add(userNameLabel);
52 applicationTitleLabel.setText("Kuali Student");
53
54
55 }
56 public void addLogout(Widget w){
57 logoutPanel.add(w);
58 }
59 public void addNavigation(StylishDropDown dropDown){
60 leftPartPanel.add(dropDown);
61 }
62
63 public void setHiLabelText(String hi){
64 hiLabel.setText(hi);
65 }
66 public void setUserName(String name){
67 userNameLabel.setText(name);
68 }
69
70 public void addBottomContainerWidget(Widget w){
71 bottomContainer.add(w);
72 }
73
74 public Panel getBottomContainer(){
75 return bottomContainer;
76 }
77
78 public void setApplicationTitle(String title) {
79 applicationTitleLabel.setText(title);
80 }
81 }