/** * setProperty * * @param propertyId * @param value */ public void setProperty(String propertyId, Object value) throws XMLConfigurationException { fConfigUpdated = true; // forward to every XML 1.0 component int count = fComponents.size(); for (int i = 0; i < count; i++) { XMLComponent c = (XMLComponent) fComponents.get(i); c.setProperty(propertyId, value); } // forward it to every common Component count = fCommonComponents.size(); for (int i = 0; i < count; i++) { XMLComponent c = (XMLComponent) fCommonComponents.get(i); c.setProperty(propertyId, value); } // forward it to every XML 1.1 component count = fXML11Components.size(); for (int i = 0; i < count; i++) { XMLComponent c = (XMLComponent) fXML11Components.get(i); try { c.setProperty(propertyId, value); } catch (Exception e) { // ignore it } } // store value if noone "objects" super.setProperty(propertyId, value); } // setProperty(String,Object)
/** Sets a property. */ public void setProperty(String propertyId, Object value) throws XMLConfigurationException { super.setProperty(propertyId, value); if (propertyId.equals(FILTERS)) { XMLDocumentFilter[] filters = (XMLDocumentFilter[]) getProperty(FILTERS); if (filters != null) { for (int i = 0; i < filters.length; i++) { XMLDocumentFilter filter = filters[i]; if (filter instanceof HTMLComponent) { addComponent((HTMLComponent) filter); } } } } int size = fHTMLComponents.size(); for (int i = 0; i < size; i++) { HTMLComponent component = (HTMLComponent) fHTMLComponents.elementAt(i); component.setProperty(propertyId, value); } } // setProperty(String,Object)