/** * Instantiates a new color popup. * * @param relative the relative * @param allowNone the allow none */ public ColorPopup(Element relative, boolean allowNone) { colorPicker = ComplexColorPicker.getInstance(); colorPicker.setAllowNone(allowNone); PopupChrome chrome = PopupChromeFactory.createPopupChrome(); popup = PopupFactory.createPopup(relative, AlignedPopupPositioner.ABOVE_RIGHT, chrome, true); popup.add(colorPicker); }
/** Creates a profile card. */ public ProfilePopupWidget(Element relative, RelativePopupPositioner positioner) { initWidget(BINDER.createAndBindUi(this)); // Wrap in a popup. PopupChrome chrome = PopupChromeFactory.createPopupChrome(); popup = PopupFactory.createPopup(relative, positioner, chrome, true); popup.add(this); popup.addPopupEventListener(this); }
/** Shows in a popup, and returns the popup. */ public UniversalPopup showInPopup() { PopupChrome chrome = PopupChromeFactory.createPopupChrome(); UniversalPopup popup = PopupFactory.createPopup(null, new CenterPopupPositioner(), chrome, true); TitleBar titleBar = popup.getTitleBar(); titleBar.setTitleText("Select Gadget"); popup.add(GadgetSelectorWidget.this); popup.show(); gadgetUrl.focus(); return popup; }