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
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
// 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
@Inject public GwtPopup(Resources resources, Viewport viewport) { this(new PopupPanel(), viewport); control.setGlassEnabled(true); resources.css().ensureInjected(); control.setGlassStyleName(resources.css().popupGlass()); }
PopupPanel popup = new PopupPanel(); Frame frame = new Frame("http://www.yourlink.com/"); popup.setWidget(frame); popup.setGlassEnabled(true); popup.center();
protected void initWidget(T widget) { super.initWidget(widget); // All popups are modal by default widget.setModal(true); // Enable background glass by default widget.setGlassEnabled(true); // Add popup widget style widget.addStyleName(POPUP_CONTENT_STYLE_NAME); widget.removeStyleName(GWT_POPUPPANEL); widget.getElement().getStyle().setZIndex(PatternflyConstants.ZINDEX_MODAL); }
/*************************************** * @see Component#setVisible(boolean) */ @Override public void setVisible(boolean bVisible) { if (bVisible && getViewStyle().hasFlag(ViewStyle.Flag.MODAL)) { IsChildViewWidget rPanel = getChildViewWidget(); if (rPanel instanceof PopupPanel) { ((PopupPanel) rPanel).setGlassEnabled(true); } } super.setVisible(bVisible); } }
/*************************************** * Displays this message box instance centered on the screen. */ void show() { aDialog.show(); if (aDialog instanceof PopupPanel) { PopupPanel rPopupPanel = (PopupPanel) aDialog; rPopupPanel.setGlassEnabled(true); UserInterfaceContext.setPopupBounds(rPopupPanel, Window.getClientWidth() / 2, Window.getClientHeight() / 3, AlignedPosition.CENTER, true); } }
/** * 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(); }
public ModalUploadStatus() { super(); super.asWidget().addStyleName("upld-status"); box.add(super.asWidget()); box.setGlassEnabled(true); box.setStyleName("upld-modal"); box.setGlassStyleName("upld-modal-glass"); ((Element) box.getElement().getFirstChild()).setClassName("GWTUpld"); }
aFilterPopup.setGlassEnabled(true); aFilterPopup.setWidget(aFilterCriteriaPanel); aFilterPopup.addCloseHandler(new CloseHandler<PopupPanel>()