|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.css.AbstractCSSRule | +--org.apache.batik.css.CSSOMMediaRule
This class implements the CSSMediaRule
interface.
Inner Class Summary | |
protected class |
CSSOMMediaRule.MediaRuleHandler
To handle the parsing of a media rule. |
Field Summary | |
protected CSSOMRuleList |
cssRules
The rule list. |
protected ValueFactoryMap |
factories
The value factory map. |
protected MediaList |
media
The media. |
protected Parser |
parser
The CSS parser. |
protected DocumentHandler |
ruleHandler
The CSS document handler. |
Fields inherited from class org.apache.batik.css.AbstractCSSRule |
CONDITION_FACTORY, parentRule, parentStyleSheet, SELECTOR_FACTORY |
Fields inherited from interface org.w3c.dom.css.CSSRule |
CHARSET_RULE, FONT_FACE_RULE, IMPORT_RULE, MEDIA_RULE, PAGE_RULE, STYLE_RULE, UNKNOWN_RULE |
Constructor Summary | |
CSSOMMediaRule(CSSStyleSheet parent,
CSSRule pr,
MediaList media,
Parser p,
ValueFactoryMap m)
Creates a new media rule. |
Method Summary | |
void |
appendRule(CSSRule r)
Appends a rule. |
void |
deleteRule(int index)
DOM: Implements CSSMediaRule.deleteRule(int) . |
CSSRuleList |
getCssRules()
DOM: Implements CSSMediaRule.getCssRules() . |
java.lang.String |
getCssText()
DOM: Implements CSSRule.getCssText() . |
MediaList |
getMedia()
DOM: Implements CSSMediaRule.getMedia() . |
Parser |
getParser()
Returns the parser used to read style sheets. |
short |
getType()
DOM: Implements CSSRule.getType() . |
ValueFactoryMap |
getValueFactoryMap()
Returns the map of value factories. |
int |
insertRule(java.lang.String rule,
int index)
DOM: Implements CSSMediaRule.insertRule(String,int) . |
void |
setCssText(java.lang.String cssText)
DOM: Implements CSSRule.setCssText(String) . |
Methods inherited from class org.apache.batik.css.AbstractCSSRule |
getParentRule, getParentStyleSheet |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.css.CSSRule |
getParentRule, getParentStyleSheet |
Field Detail |
protected CSSOMRuleList cssRules
protected Parser parser
protected ValueFactoryMap factories
protected MediaList media
protected DocumentHandler ruleHandler
Constructor Detail |
public CSSOMMediaRule(CSSStyleSheet parent, CSSRule pr, MediaList media, Parser p, ValueFactoryMap m)
Method Detail |
public Parser getParser()
getParser
in interface CSSRuleListOwner
public ValueFactoryMap getValueFactoryMap()
getValueFactoryMap
in interface CSSRuleListOwner
public short getType()
CSSRule.getType()
.getType
in interface CSSRule
public java.lang.String getCssText()
CSSRule.getCssText()
.getCssText
in interface CSSRule
org.w3c.dom.css.CSSRule
DOMException
- SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.
public void setCssText(java.lang.String cssText) throws DOMException
CSSRule.setCssText(String)
.setCssText
in interface CSSRule
org.w3c.dom.css.CSSRule
DOMException
- SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.
public MediaList getMedia()
CSSMediaRule.getMedia()
.getMedia
in interface CSSMediaRule
public CSSRuleList getCssRules()
CSSMediaRule.getCssRules()
.getCssRules
in interface CSSMediaRule
public int insertRule(java.lang.String rule, int index) throws DOMException
CSSMediaRule.insertRule(String,int)
.insertRule
in interface CSSMediaRule
org.w3c.dom.css.CSSMediaRule
rule
- The parsable text representing the rule. For rule sets
this contains both the selector and the style declaration. For
at-rules, this specifies both the at-identifier and the rule
content.index
- The index within the media block's rule collection of
the rule before which to insert the specified rule. If the
specified index is equal to the length of the media blocks's rule
collection, the rule will be added to the end of the media block.DOMException
- HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the
specified index, e.g., if an @import
rule is inserted
after a standard rule set or other at-rule.
public void deleteRule(int index) throws DOMException
CSSMediaRule.deleteRule(int)
.deleteRule
in interface CSSMediaRule
org.w3c.dom.css.CSSMediaRule
index
- The index within the media block's rule collection of
the rule to remove.DOMException
- INDEX_SIZE_ERR: Raised if the specified index does not correspond to
a rule in the media rule list.
public void appendRule(CSSRule r)
appendRule
in interface CSSRuleListOwner
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |