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); }