Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
306 ashish 1
package in.shop2020.hotspot.dashbaord.client.inbox;
2
 
3
import com.google.gwt.core.client.GWT;
4
import com.google.gwt.event.dom.client.ClickEvent;
5
import com.google.gwt.uibinder.client.UiBinder;
6
import com.google.gwt.uibinder.client.UiField;
7
import com.google.gwt.uibinder.client.UiHandler;
8
import com.google.gwt.user.client.Window;
9
import com.google.gwt.user.client.ui.Anchor;
10
import com.google.gwt.user.client.ui.Composite;
11
import com.google.gwt.user.client.ui.HTML;
12
import com.google.gwt.user.client.ui.Widget;
13
 
14
/**
15
 * The top panel, which contains the 'welcome' message and various links.
16
 */
17
public class TopPanel extends Composite {
18
 
19
  interface Binder extends UiBinder<Widget, TopPanel> { }
20
  private static final Binder binder = GWT.create(Binder.class);
21
 
22
  @UiField Anchor signOutLink;
23
  @UiField Anchor aboutLink;
24
  @UiField HTML greetingLabel;
25
 
26
  public TopPanel() {
27
 
28
    initWidget(binder.createAndBindUi(this));
29
  }
30
 
31
  @UiHandler("aboutLink")
32
  void onAboutClicked(ClickEvent event) {
33
    // When the 'About' item is selected, show the AboutDialog.
34
    // Note that showing a dialog box does not block -- execution continues
35
    // normally, and the dialog fires an event when it is closed.
36
    StatusDialog dlg = new StatusDialog();
37
    dlg.setText("Hotspot Order life cycle dashboard built by Shop2020");
38
    dlg.show();
39
    dlg.center();
40
  }
41
 
42
  public void changeGreeting(String greeting){
43
	  greetingLabel.setText("Aloha! "+ greeting);
44
  }
45
 
46
  public Anchor getSignOutLink(){
47
	  return signOutLink;
48
  }
49
}