/** * A simple way to create a PopupPanel. Note that the minimal representation * may not be dynamically updated, in order to achieve this create your own * Content object and use {@link PopupView#PopupView(Content)}. * * @param small * the minimal textual representation as HTML * @param large * the full, Component-type representation */ public PopupView(final String small, final Component large) { this(createContent(small, large)); }
/** * This is an internal constructor. Use * {@link PopupView#PopupView(String, Component)} instead. * * @since 7.5.0 */ @Deprecated public PopupView() { registerRpc(rpc); setHideOnMouseOut(true); setContent(createContent("", new Label(""))); }
@Override public void readDesign(Element design, DesignContext designContext) { // Read content first to avoid NPE when setting popup visible Component popupContent = null; String minimizedValue = ""; for (Node childNode : design.childNodes()) { if (childNode instanceof Element) { Element child = (Element) childNode; if (child.tagName().equals("popup-content")) { popupContent = designContext.readDesign(child.child(0)); } else { minimizedValue += child.toString(); } } else { minimizedValue += childNode.toString(); } } setContent(createContent(minimizedValue.trim(), popupContent)); super.readDesign(design, designContext); }