super.start(panel, eventBus);
final PopupView view = clientFactory.getPopupView();
view.getHeader().setText("Popups");
addHandlerRegistration(view.getConfirmButton().addTapHandler(new TapHandler() {
@Override
public void onTap(TapEvent event) {
view.confirmSomeStuff("Confirm this", "Confirm some more stuff", new ConfirmCallback() {
@Override
public void onOk() {
}
@Override
public void onCancel() {
}
});
}
}));
addHandlerRegistration(view.getSlideUpButton().addTapHandler(new TapHandler() {
@Override
public void onTap(TapEvent event) {
List<OptionsDialogEntry> list = new ArrayList<OptionsDialogEntry>();
list.add(new OptionsDialogEntry("Confirm", ButtonType.CONFIRM));
list.add(new OptionsDialogEntry("Cancel", ButtonType.NORMAL));
list.add(new OptionsDialogEntry("Delete", ButtonType.IMPORTANT));
view.showSomeOptions(list, new OptionCallback() {
@Override
public void onOptionSelected(int index) {
}
});
}
}));
addHandlerRegistration(view.getAlertButton().addTapHandler(new TapHandler() {
@Override
public void onTap(TapEvent event) {
view.alertSomeStuff("Hi", "How are you doing?");
}