Rev 1962 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package in.shop2020.catalog.dashboard.client;import com.google.gwt.core.client.GWT;import com.google.gwt.event.dom.client.ClickEvent;import com.google.gwt.uibinder.client.UiBinder;import com.google.gwt.uibinder.client.UiField;import com.google.gwt.uibinder.client.UiHandler;import com.google.gwt.user.client.Window;import com.google.gwt.user.client.ui.Anchor;import com.google.gwt.user.client.ui.Composite;import com.google.gwt.user.client.ui.HTML;import com.google.gwt.user.client.ui.Widget;/*** The top panel, which contains the 'welcome' message and various links.*/public class TopPanel extends Composite {interface Binder extends UiBinder<Widget, TopPanel> { }private static final Binder binder = GWT.create(Binder.class);@UiField Anchor signOutLink;@UiField Anchor aboutLink;@UiField HTML greetingLabel;public TopPanel() {initWidget(binder.createAndBindUi(this));}@UiHandler("aboutLink")void onAboutClicked(ClickEvent event) {// When the 'About' item is selected, show the AboutDialog.// Note that showing a dialog box does not block -- execution continues// normally, and the dialog fires an event when it is closed.StatusDialog dlg = new StatusDialog();dlg.setText("Catalog Dashboard.\nYou can edit the item details here.");dlg.show();dlg.center();}public void changeGreeting(String greeting){greetingLabel.setText("Aloha! "+ greeting);}public Anchor getSignOutLink(){return signOutLink;}}