|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.util.styling.IlvMutableStyleSheet
ilog.cpl.css.IlpMutableStyleSheet
public class IlpMutableStyleSheet
This is a mutable style sheet. It is designed to be used in a memory. It is possible to add, change and remove rules in the style sheet.
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 Summary | |
|---|---|
IlpMutableStyleSheet(IlpStylable s)
Creates a new mutable style sheet. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class ilog.views.util.styling.IlvMutableStyleSheet |
|---|
containsDeclaration, containsRule, getDeclaration, getDeclaredProperties, getRuleSelectors, getStylable, getUpdatedStyleSheets, isAdjusting, readStyleSheet, removeAllRules, removeDeclaration, removeRule, setAdjusting, setDeclaration, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IlpMutableStyleSheet(IlpStylable s)
s - The stylable that uses this style sheet.| Method Detail |
|---|
public void setUpdateMask(int mask)
mask - Update mask.IlpStylable.UPDATE_COMPONENT_MASK,
IlpStylable.UPDATE_OBJECTS_MASK,
IlpStylable.UPDATE_ALL_MASK,
IlpStylable.UPDATE_NONE_MASKpublic int getUpdateMask()
IlpStylable.UPDATE_COMPONENT_MASK,
IlpStylable.UPDATE_OBJECTS_MASK,
IlpStylable.UPDATE_ALL_MASK,
IlpStylable.UPDATE_NONE_MASKprotected void propertyChanged()
propertyChanged in class IlvMutableStyleSheet
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||