|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gwtext.client.util.CSS
public class CSS
Utility class for manipulating CSS rules.
Constructor Summary | |
---|---|
CSS()
|
Method Summary | |
---|---|
static void |
createStyleSheet(java.lang.String cssText,
java.lang.String id)
Very simple dynamic creation of stylesheets from a text blob of rules. |
static CSSRule |
getRule(java.lang.String selector,
boolean refreshCache)
Gets an an individual CSS rule by selector(s). |
static void |
refreshCache()
Refresh the rule cache if you have dynamically added stylesheets. |
static void |
removeStyleSheet(java.lang.String id)
Removes a style or link tag by id |
static void |
swapStyleSheet(java.lang.String id,
java.lang.String url)
Dynamically swaps an existing stylesheet reference for a new one. |
static void |
updateRule(java.lang.String selector,
java.lang.String property,
java.lang.String value)
Updates a rule property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSS()
Method Detail |
---|
public static void createStyleSheet(java.lang.String cssText, java.lang.String id)
cssText
- the text containing the css rulesid
- an id to add to the stylesheet for later removalpublic static CSSRule getRule(java.lang.String selector, boolean refreshCache)
selector
- the CSS selector or an array of selectors to try. The first selector that is found is returnedrefreshCache
- true to refresh the internal cache if you have recently updated any rules or added styles dynamically
public static void refreshCache()
public static void removeStyleSheet(java.lang.String id)
id
- stylesheet idpublic static void swapStyleSheet(java.lang.String id, java.lang.String url)
id
- the id of an existing link tag to removeurl
- the href of the new stylesheet to includepublic static void updateRule(java.lang.String selector, java.lang.String property, java.lang.String value)
selector
- the seelctor. Stops immediately once one is found.property
- the css propertyvalue
- the new value for the property
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |