public class IlpMutableStyleSheet extends IlvMutableStyleSheet
The stylable that uses this mutable style sheet is automatically notified of any change.
In order to set the style sheet, use for example:
IlpMutableStyleSheet styleSheet = new IlpMutableStyleSheet(stylable); ... stylable.setStyleSheets(new String[] { styleSheet.toString() }); ... styleSheet.setDeclaration(selector, property, value); ... styleSheet.removeDeclaration(selector, property); ... styleSheet.removeRule(selector); ...
In order to visit the entire contents of the style sheet, you need to:
IlpMutableStyleSheet styleSheet = ... ... Iterator iterator1 = styleSheet.getRuleSelectors(); while (iterator1.hasNext()) { String selector = (String)iterator1.next(); Iterator iterator2 = styleSheet.getDeclaredProperties(selector); while (iterator2.hasNext()) { String property = (String)iterator2.next(); String value = styleSheet.getDeclaration(selector, property); ... } }
IlpStylable
,
IlvMutableStyleSheet
,
IlvStylable.setStyleSheets(java.lang.String[])
Constructor and Description |
---|
IlpMutableStyleSheet(IlpStylable s)
Creates a new mutable style sheet.
|
Modifier and Type | Method and Description |
---|---|
int |
getUpdateMask()
Returns the mask that indicates the components to be changed by
this mutable style sheet.
|
protected void |
propertyChanged()
Notifies the stylable that the style sheet has changed.
|
void |
setUpdateMask(int mask)
Sets the mask that indicates the components to be changed by
this mutable style sheet.
|
containsDeclaration, containsRule, getDeclaration, getDeclaredProperties, getRuleSelectors, getStylable, getUpdatedStyleSheets, isAdjusting, readStyleSheet, readStyleSheet, readStyleSheet, readStyleSheet, removeAllRules, removeDeclaration, removeRule, setAdjusting, setDeclaration, toString
public IlpMutableStyleSheet(IlpStylable s)
s
- The stylable that uses this style sheet.public void setUpdateMask(int mask)
mask
- Update mask.IlpStylable.UPDATE_COMPONENT_MASK
,
IlpStylable.UPDATE_OBJECTS_MASK
,
IlpStylable.UPDATE_ALL_MASK
,
IlpStylable.UPDATE_NONE_MASK
public int getUpdateMask()
IlpStylable.UPDATE_COMPONENT_MASK
,
IlpStylable.UPDATE_OBJECTS_MASK
,
IlpStylable.UPDATE_ALL_MASK
,
IlpStylable.UPDATE_NONE_MASK
protected void propertyChanged()
propertyChanged
in class IlvMutableStyleSheet
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.