/** IMPORTANT: This method should only be called while onRender is being fired. See SVY-2571. */ void resetProperties() { Iterator<String> propertiesIte = properties.keySet().iterator(); String property; while (propertiesIte.hasNext()) { property = propertiesIte.next(); if (PROPERTY_BGCOLOR.equals(property)) { renderable.setBgcolor((String) properties.get(PROPERTY_BGCOLOR)); } else if (PROPERTY_BORDER.equals(property)) { renderable.setBorder((String) properties.get(PROPERTY_BORDER)); } else if (PROPERTY_ENABLED.equals(property)) { renderable.setEnabled(((Boolean) properties.get(PROPERTY_ENABLED)).booleanValue()); } else if (PROPERTY_FGCOLOR.equals(property)) { renderable.setFgcolor((String) properties.get(PROPERTY_FGCOLOR)); } else if (PROPERTY_FONT.equals(property)) { renderable.setFont((String) properties.get(PROPERTY_FONT)); } else if (PROPERTY_TOOLTIP.equals(property)) { renderable.setToolTipText((String) properties.get(PROPERTY_TOOLTIP)); } else if (PROPERTY_TRANSPARENT.equals(property)) { renderable.setTransparent(((Boolean) properties.get(PROPERTY_TRANSPARENT)).booleanValue()); } else if (PROPERTY_VISIBLE.equals(property)) { renderable.setVisible(((Boolean) properties.get(PROPERTY_VISIBLE)).booleanValue()); } else if (PROPERTY_FORMAT.equals(property)) { if (renderable instanceof HasRuntimeFormat) { ((HasRuntimeFormat) renderable).setFormat((String) properties.get(PROPERTY_FORMAT)); } } else if (PROPERTY_IMAGE_URL.equals(property)) { if (renderable instanceof HasRuntimeImageURL) { ((HasRuntimeImageURL) renderable) .setImageURL((String) properties.get(PROPERTY_IMAGE_URL)); } } } properties.clear(); }
@Override public void setImageURL(String text_url) { if (renderable instanceof HasRuntimeImageURL) { if (!properties.containsKey(PROPERTY_IMAGE_URL)) { properties.put(PROPERTY_IMAGE_URL, ((HasRuntimeImageURL) renderable).getImageURL()); } ((HasRuntimeImageURL) renderable).setImageURL(text_url); } }