public void renderInitialization(Widget widget) throws IOException { ControlDecorator decorator = (ControlDecorator) widget; IClientObject clientObject = ClientObjectFactory.getClientObject(decorator); clientObject.create(TYPE); clientObject.set("parent", WidgetUtil.getId(decorator.getParent())); clientObject.set("style", WidgetLCAUtil.getStyles(decorator, ALLOWED_STYLES)); }
public void preserveValues(Widget widget) { ControlDecorator decorator = (ControlDecorator) widget; WidgetLCAUtil.preserveBounds(decorator, decorator.getBounds()); preserveProperty(decorator, PROP_TEXT, decorator.getText()); preserveProperty(decorator, PROP_IMAGE, decorator.getImage()); preserveProperty(decorator, PROP_VISIBLE, decorator.isVisible()); preserveProperty(decorator, PROP_SHOW_HOVER, decorator.getShowHover()); preserveListener(decorator, PROP_SELECTION_LISTENER, SelectionEvent.hasListener(decorator)); }
public void renderChanges(Widget widget) throws IOException { ControlDecorator decorator = (ControlDecorator) widget; WidgetLCAUtil.renderBounds(decorator, decorator.getBounds()); renderProperty(decorator, PROP_TEXT, decorator.getText(), ""); renderProperty(decorator, PROP_IMAGE, decorator.getImage(), null); renderProperty(decorator, PROP_VISIBLE, decorator.isVisible(), false); renderProperty(decorator, PROP_SHOW_HOVER, decorator.getShowHover(), true); renderListener( decorator, PROP_SELECTION_LISTENER, SelectionEvent.hasListener(decorator), false); }