public void activate(StyleSheet styleSheet) {
List rules = styleSheet.getRules();
for (Iterator i = rules.iterator(); i.hasNext();) {
Rule rule = (Rule) i.next();
MutableStyleProperties properties = (MutableStyleProperties)
rule.getProperties();
// Although it is a little stupid it is allowed, at least for now
// to have no properties for a selector.
if (properties != null) {
Iterator p = properties.propertyValueIterator();
while (p.hasNext()) {
PropertyValue propertyValue = (PropertyValue) p.next();
StyleProperty property = propertyValue.getProperty();
StyleValue value = propertyValue.getValue();
StyleValue activated = activateStyleValue(property, value);
if (activated != value) {
propertyValue =
ThemeFactory.getDefaultInstance().createPropertyValue(
property, activated,
propertyValue.getPriority());
properties.setPropertyValue(propertyValue);
}
}
}
}
}