/** * 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); }
/** * Show the popup with the color picker. * * @param listener the listener */ public void show(OnColorChooseListener listener) { colorPicker.setListener(listener); colorPicker.show(); popup.show(); }