@Override public void onLayout() { super.onLayout(); control.center(); }
/** * show/hide the modal dialog. */ @Override public void setVisible(boolean b) { if (b) { box.center(); } else { box.hide(); } } }
PopupPanel errorValidatorPopUp = new PopupPanel(); errorValidatorPopUp.center();// to show the popup at centre of page or else you can setPosition errorValidatorPopUp.setGlassEnabled(true);//for Modal" effect blocking background /** your Logic for error validator **/ Create a Panel with error validator widgets on it Once done add to the errorValidatorPopup eg : all your widgets on an errorPanel, errorValidatorPopup.add(errorPanel); errorValidatorPopup.show(); //to show popup
// A popup that doesn't auto-hide, and doesn't let the // user click on anything else. PopupPanel popup = new PopupPanel(false,true); popup.setGlassEnabled(); // Dims the rest of the page popup.setWidget(new Image(res.loader())); popup.center(); // Show popup centered
final PopupPanel popup = new PopupPanel(false, true); // Create a modal dialog box that will not auto-hide popup.add(new Label("Please wait")); popup.setGlassEnabled(true); // Enable the glass panel popup.center(); // Center the popup and make it visible
@Override public void execute() { Widget rViewWidget = rView.getWidget(); rView.setVisible(true); if (rViewWidget instanceof PopupPanel) { ((PopupPanel) rView.getWidget()).center(); } } });
PopupPanel popup = new PopupPanel(); Frame frame = new Frame("http://www.yourlink.com/"); popup.setWidget(frame); popup.setGlassEnabled(true); popup.center();
PopupPanel popup = new PopupPanel(true); FlowPanel panel = new FlowPanel(); //add Button etc popup.setSize("1100px","500px"); popup.clear(); popup.add(panel); popup.show(); popup.center();
/** * Initiate. */ public ReestablishConnection(Throwable failure) { this.failure = failure; // Initiate the panel this.panel = new PopupPanel(); this.panel.setModal(true); this.panel.setGlassEnabled(true); // Provide detail of failure Label reestablish = new Label("Re-establishing connection ..."); this.panel.add(reestablish); reestablish.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { // Display the error Window.alert("COMET SUBSCRIBE FAILURE: " + ReestablishConnection.this.failure.getMessage() + " [" + ReestablishConnection.this.failure.getClass() .getName() + "]"); } }); // Display re-establishing connection this.panel.center(); }
callback.setHeight(height+"px"); callback.center();