View Javadoc

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  public class KSHeader extends Composite {
15  
16  	private static KSHeaderUiBinder uiBinder = GWT
17  			.create(KSHeaderUiBinder.class);
18  
19  	interface KSHeaderUiBinder extends UiBinder<Widget, KSHeader> {
20  	}
21  
22  	@UiField
23      public FlowPanel hiPanel;
24  
25      @UiField
26      public FlowPanel userNamePanel;
27      
28      @UiField
29      public FlowPanel logoutPanel;
30      
31      @UiField
32      public FlowPanel leftPartPanel;
33  
34      @UiField
35      public Label applicationTitleLabel;
36      
37      @UiField
38      public FlowPanel bottomContainer;
39  
40      
41      protected Label userNameLabel = new Label("");
42      protected Label hiLabel = new Label("Hi,");
43  	public KSHeader() {
44          initialize();
45      }
46  
47      protected void initialize() {
48          initWidget(uiBinder.createAndBindUi(this));
49  		hiPanel.add(hiLabel);
50  		userNamePanel.add(userNameLabel);
51  		applicationTitleLabel.setText("Kuali Student");
52  		//logoutPanel.add(new Anchor("LL"));
53  		//leftPartPanel.add(new StylishDropDown("Navigation"));
54      }
55  	public void addLogout(Widget w){
56  	    logoutPanel.add(w);
57  	}
58  	public void addNavigation(StylishDropDown dropDown){
59  	    leftPartPanel.add(dropDown);
60  	}
61  	
62  	public void setHiLabelText(String hi){
63  	    hiLabel.setText(hi);
64  	}
65      public void setUserName(String name){
66          userNameLabel.setText(name);
67      }
68  
69      public void addBottomContainerWidget(Widget w){
70      	bottomContainer.add(w);
71      }
72      
73      public Panel getBottomContainer(){
74      	return bottomContainer;
75      }
76      
77      public void setApplicationTitle(String title) {
78      	applicationTitleLabel.setText(title);
79      }
80  }