ice.pilots.html4
Class DCSSRule

java.lang.Object
  extended byice.pilots.html4.DCSSRule
All Implemented Interfaces:
CSSCharsetRule, CSSFontFaceRule, CSSImportRule, CSSMediaRule, CSSPageRule, CSSRule, CSSStyleRule

public class DCSSRule
extends Object
implements CSSRule, CSSStyleRule, CSSCharsetRule, CSSImportRule, CSSMediaRule, CSSFontFaceRule, CSSPageRule


Field Summary
 
Fields inherited from interface org.w3c.dom.css.CSSRule
CHARSET_RULE, FONT_FACE_RULE, IMPORT_RULE, MEDIA_RULE, PAGE_RULE, STYLE_RULE, UNKNOWN_RULE
 
Method Summary
 void deleteRule(int index)
          Used to delete a rule from the media block.
protected  void dispatchDOMEvent(short type, String name, String value)
          Utility to dispatch the CSSModified MutationEvent on Element closest to this rule.
 CSSRuleList getCssRules()
          A list of all CSS rules contained within the media block.
 String getCssText()
          The parsable textual representation of the rule.
 String getEncoding()
          The encoding information used in this @charset rule.
 String getHref()
          The location of the style sheet to be imported.
 MediaList getMedia()
          A list of media types for which this style sheet may be used.
 CSSRule getParentRule()
          If this rule is contained inside another rule (e.g.
 CSSStyleSheet getParentStyleSheet()
          The style sheet that contains this rule.
 String getSelectorText()
          The textual representation of the selector for the rule set.
 CSSStyleDeclaration getStyle()
          The declaration-block of this rule set.
 CSSStyleSheet getStyleSheet()
          The style sheet referred to by this rule, if it has been loaded.
 short getType()
          The type of the rule, as defined above.
 int insertRule(String rule, int index)
          Used to insert a new rule into the media block.
 void setCssText(String cssText)
           
 void setEncoding(String encoding)
           
 void setSelectorText(String selectorText)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getType

public short getType()
Description copied from interface: CSSRule
The type of the rule, as defined above. The expectation is that binding-specific casting methods can be used to cast down from an instance of the CSSRule interface to the specific derived interface implied by the type.

Specified by:
getType in interface CSSRule

getCssText

public String getCssText()
Description copied from interface: CSSRule
The parsable textual representation of the rule. This reflects the current state of the rule and not its initial value.

Specified by:
getCssText in interface CSSRule

setCssText

public void setCssText(String cssText)
Specified by:
setCssText in interface CSSRule

getParentStyleSheet

public CSSStyleSheet getParentStyleSheet()
Description copied from interface: CSSRule
The style sheet that contains this rule.

Specified by:
getParentStyleSheet in interface CSSRule

getParentRule

public CSSRule getParentRule()
Description copied from interface: CSSRule
If this rule is contained inside another rule (e.g. a style rule inside an @media block), this is the containing rule. If this rule is not nested inside any other rules, this returns null.

Specified by:
getParentRule in interface CSSRule

getSelectorText

public String getSelectorText()
Description copied from interface: CSSStyleRule
The textual representation of the selector for the rule set. The implementation may have stripped out insignificant whitespace while parsing the selector.

Specified by:
getSelectorText in interface CSSStyleRule

setSelectorText

public void setSelectorText(String selectorText)
Specified by:
setSelectorText in interface CSSStyleRule

getStyle

public CSSStyleDeclaration getStyle()
Description copied from interface: CSSStyleRule
The declaration-block of this rule set.

Specified by:
getStyle in interface CSSStyleRule

getMedia

public MediaList getMedia()
Description copied from interface: CSSImportRule
A list of media types for which this style sheet may be used.

Specified by:
getMedia in interface CSSImportRule

getCssRules

public CSSRuleList getCssRules()
Description copied from interface: CSSMediaRule
A list of all CSS rules contained within the media block.

Specified by:
getCssRules in interface CSSMediaRule

insertRule

public int insertRule(String rule,
                      int index)
Description copied from interface: CSSMediaRule
Used to insert a new rule into the media block.

Specified by:
insertRule in interface CSSMediaRule
Parameters:
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.
Returns:
The index within the media block's rule collection of the newly inserted rule.

deleteRule

public void deleteRule(int index)
Description copied from interface: CSSMediaRule
Used to delete a rule from the media block.

Specified by:
deleteRule in interface CSSMediaRule
Parameters:
index - The index within the media block's rule collection of the rule to remove.

getHref

public String getHref()
Description copied from interface: CSSImportRule
The location of the style sheet to be imported. The attribute will not contain the "url(...)" specifier around the URI.

Specified by:
getHref in interface CSSImportRule

getStyleSheet

public CSSStyleSheet getStyleSheet()
Description copied from interface: CSSImportRule
The style sheet referred to by this rule, if it has been loaded. The value of this attribute is null if the style sheet has not yet been loaded or if it will not be loaded (e.g. if the style sheet is for a media type not supported by the user agent).

Specified by:
getStyleSheet in interface CSSImportRule

getEncoding

public String getEncoding()
Description copied from interface: CSSCharsetRule
The encoding information used in this @charset rule.

Specified by:
getEncoding in interface CSSCharsetRule

setEncoding

public void setEncoding(String encoding)
Specified by:
setEncoding in interface CSSCharsetRule

toString

public String toString()

dispatchDOMEvent

protected final void dispatchDOMEvent(short type,
                                      String name,
                                      String value)
Utility to dispatch the CSSModified MutationEvent on Element closest to this rule.

Parameters:
type - The exact type of style-change
name - The name of the style which was affected
value - The new value