info.informatica.doc.style.css.dom
Class BaseCSSRule

java.lang.Object
  extended by info.informatica.doc.style.css.dom.BaseCSSRule
All Implemented Interfaces:
org.w3c.dom.css.CSSRule
Direct Known Subclasses:
DOMCSSFontFaceRule, DOMCSSImportRule, DOMCSSMediaRule, DOMCSSPageRule, DOMCSSUnknownRule

public abstract class BaseCSSRule
extends Object
implements org.w3c.dom.css.CSSRule

Abstract class to be inherited by all CSS rules.

Author:
Carlos Amengual (amengual at informatica.info)

Field Summary
protected  int insertionIndex
          Contains the index at which this rule was inserted in parent sheet.
 
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
BaseCSSRule(org.w3c.dom.css.CSSStyleSheet parentSheet, short type)
           
 
Method Summary
static org.w3c.dom.css.CSSRule createCSSRule(org.w3c.dom.css.CSSStyleSheet parentSheet, int type)
          Factory method that creates a CSS rule according to given CSS type.
abstract  String getCssText()
           
 org.w3c.dom.css.CSSRule getParentRule()
           
 org.w3c.dom.css.CSSStyleSheet getParentStyleSheet()
           
 short getType()
           
abstract  void setCssText(String cssText)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

insertionIndex

protected int insertionIndex
Contains the index at which this rule was inserted in parent sheet.

Constructor Detail

BaseCSSRule

public BaseCSSRule(org.w3c.dom.css.CSSStyleSheet parentSheet,
                   short type)
Method Detail

getType

public short getType()
Specified by:
getType in interface org.w3c.dom.css.CSSRule

getCssText

public abstract String getCssText()
Specified by:
getCssText in interface org.w3c.dom.css.CSSRule

setCssText

public abstract void setCssText(String cssText)
                         throws DOMException
Specified by:
setCssText in interface org.w3c.dom.css.CSSRule
Throws:
DOMException

getParentStyleSheet

public org.w3c.dom.css.CSSStyleSheet getParentStyleSheet()
Specified by:
getParentStyleSheet in interface org.w3c.dom.css.CSSRule

getParentRule

public org.w3c.dom.css.CSSRule getParentRule()
Specified by:
getParentRule in interface org.w3c.dom.css.CSSRule

createCSSRule

public static org.w3c.dom.css.CSSRule createCSSRule(org.w3c.dom.css.CSSStyleSheet parentSheet,
                                                    int type)
Factory method that creates a CSS rule according to given CSS type.

Parameters:
parentSheet - the parent CSS sheet of the rule.
type - the type of rule according to the values defined in org.w3c.dom.css.CSSRule.
Returns:
the rule.


Copyright © 2011 informatica.info. All Rights Reserved.