|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.informatica.doc.style.css.dom.BaseCSSStyleSheet
public class BaseCSSStyleSheet
CSS Style Sheet Object Model implementation base class.
| Field Summary | |
|---|---|
protected CSSRuleArrayList |
cssRules
|
protected int |
currentInsertionIndex
|
protected String |
targetMedium
|
| Constructor Summary | |
|---|---|
protected |
BaseCSSStyleSheet(CSSStyleSheetFactory factory,
org.w3c.dom.stylesheets.MediaList media)
|
protected |
BaseCSSStyleSheet(CSSStyleSheetFactory factory,
org.w3c.dom.stylesheets.MediaList media,
org.w3c.dom.css.CSSRule ownerRule)
|
| Method Summary | |
|---|---|
void |
addRule(BaseCSSRule cssrule)
Inserts a rule in the current insertion point (generally after the last rule). |
void |
addStyleSheet(BaseCSSStyleSheet sheet)
|
protected ComputedCSSStyle |
computeStyle(ComputedCSSStyle style,
SelectorMatcher matcher,
ComputedCSSStyle inlineStyle,
String pseudoElt)
Compute the style for an element. |
protected static org.w3c.css.sac.Parser |
createSACParser()
|
void |
deleteRule(int index)
Deletes a rule from the style sheet. |
org.w3c.dom.css.CSSRuleList |
getCssRules()
|
boolean |
getDisabled()
|
URL |
getDocumentBaseURL()
Gets the base URL for the source document of this sheet |
String |
getHref()
|
org.w3c.dom.stylesheets.MediaList |
getMedia()
|
String |
getNamespaceURI()
Gets the namespace URI to which this style applies. |
Node |
getOwnerNode()
|
org.w3c.dom.css.CSSRule |
getOwnerRule()
|
org.w3c.dom.stylesheets.StyleSheet |
getParentStyleSheet()
|
CSSStyleSheetFactory |
getStyleSheetFactory()
|
String |
getTargetMedium()
Gets the target medium for this sheet. |
String |
getTitle()
Gets the advisory title. |
String |
getType()
|
int |
insertRule(String rule,
int index)
Used to insert a new rule into the style sheet. |
void |
parseCSSStyleSheet(org.w3c.css.sac.InputSource source)
Parses a style sheet. |
void |
setDisabled(boolean disabled)
|
void |
setHref(String href)
|
void |
setNamespaceURI(String uri)
Sets the namespace URI to which this style applies. |
void |
setParentStyleSheet(org.w3c.dom.stylesheets.StyleSheet parent)
|
void |
setTargetMedium(String medium)
Sets the medium that is expected by the user agent, and will be used for computed styles. |
void |
setTitle(String title)
Sets the advisory title. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected CSSRuleArrayList cssRules
protected int currentInsertionIndex
protected String targetMedium
| Constructor Detail |
|---|
protected BaseCSSStyleSheet(CSSStyleSheetFactory factory,
org.w3c.dom.stylesheets.MediaList media,
org.w3c.dom.css.CSSRule ownerRule)
protected BaseCSSStyleSheet(CSSStyleSheetFactory factory,
org.w3c.dom.stylesheets.MediaList media)
| Method Detail |
|---|
public CSSStyleSheetFactory getStyleSheetFactory()
public org.w3c.dom.css.CSSRule getOwnerRule()
getOwnerRule in interface org.w3c.dom.css.CSSStyleSheetpublic Node getOwnerNode()
getOwnerNode in interface org.w3c.dom.stylesheets.StyleSheetpublic org.w3c.dom.css.CSSRuleList getCssRules()
getCssRules in interface org.w3c.dom.css.CSSStyleSheet
public int insertRule(String rule,
int index)
throws DOMException
insertRule in interface org.w3c.dom.css.CSSStyleSheetrule - 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 style sheet's rule list of the rule
before which to insert the specified rule. If the specified index
is equal to the length of the style sheet's rule collection, the
rule will be added to the end of the style sheet.
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 addRule(BaseCSSRule cssrule)
cssrule - the rule to be inserted.
public void deleteRule(int index)
throws DOMException
deleteRule in interface org.w3c.dom.css.CSSStyleSheetindex - The index within the style sheet's rule list of the rule
to remove.
DOMException - INDEX_SIZE_ERR: Raised if the specified index does not correspond to
a rule in the style sheet's rule list.
public void addStyleSheet(BaseCSSStyleSheet sheet)
public String getType()
getType in interface org.w3c.dom.stylesheets.StyleSheetpublic String getNamespaceURI()
public void setNamespaceURI(String uri)
uri - the namespace URI.public boolean getDisabled()
getDisabled in interface org.w3c.dom.stylesheets.StyleSheetpublic void setDisabled(boolean disabled)
setDisabled in interface org.w3c.dom.stylesheets.StyleSheetpublic org.w3c.dom.stylesheets.StyleSheet getParentStyleSheet()
getParentStyleSheet in interface org.w3c.dom.stylesheets.StyleSheetpublic void setParentStyleSheet(org.w3c.dom.stylesheets.StyleSheet parent)
public String getHref()
getHref in interface org.w3c.dom.stylesheets.StyleSheetpublic void setHref(String href)
public URL getDocumentBaseURL()
public String getTitle()
getTitle in interface org.w3c.dom.stylesheets.StyleSheetpublic void setTitle(String title)
title - the title.
public void setTargetMedium(String medium)
throws CSSMediaException
Must be one of the mediums in the media list returned by getMedia().
medium - the name of the medium, like 'screen' or 'print'.
CSSMediaExceptionpublic String getTargetMedium()
public org.w3c.dom.stylesheets.MediaList getMedia()
getMedia in interface org.w3c.dom.stylesheets.StyleSheetpublic String toString()
toString in class Object
protected ComputedCSSStyle computeStyle(ComputedCSSStyle style,
SelectorMatcher matcher,
ComputedCSSStyle inlineStyle,
String pseudoElt)
style - a base, empty style to be filled with the computed style.matcher - the selector matcher.inlineStyle - the inline style for the element.pseudoElt - the pseudo-element.
protected static org.w3c.css.sac.Parser createSACParser()
throws DOMException
DOMException
public void parseCSSStyleSheet(org.w3c.css.sac.InputSource source)
throws DOMException,
IOException
source - the SAC input source.
DOMException - if a DOM problem is found parsing the sheet.
org.w3c.css.sac.CSSException - if a non-DOM problem is found parsing the sheet.
IOException - if a problem is found reading the sheet.CSSStyleSheetFactory.createStyleSheet()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||