org.apache.batik.css.engine
Class StyleSheet

java.lang.Object
  extended by org.apache.batik.css.engine.StyleSheet
Direct Known Subclasses:
MediaRule

public class StyleSheet
extends Object

This class represents a list of rules.


Field Summary
protected  boolean alternate
          Whether or not this stylesheet is alternate.
protected  org.w3c.css.sac.SACMediaList media
          The media to use to cascade properties.
protected  StyleSheet parent
          The parent sheet, if any.
protected  Rule[] rules
          The rules.
protected  int size
          The number of rules.
protected  String title
          The style sheet title.
 
Constructor Summary
StyleSheet()
           
 
Method Summary
 void append(Rule r)
          Appends a rule to the stylesheet.
 void clear()
          Clears the content.
 org.w3c.css.sac.SACMediaList getMedia()
          Returns the media to use to compute the styles.
 StyleSheet getParent()
          Returns the parent sheet.
 Rule getRule(int i)
          Returns the rule at the given index.
 int getSize()
          Returns the number of rules.
 String getTitle()
          Returns the title of this style-sheet.
 boolean isAlternate()
          Tells whether or not this stylesheet is alternate.
 void setAlternate(boolean b)
          Sets the 'alternate' attribute of this style-sheet.
 void setMedia(org.w3c.css.sac.SACMediaList m)
          Sets the media to use to compute the styles.
 void setParent(StyleSheet ss)
          Sets the parent sheet.
 void setTitle(String t)
          Sets the 'title' attribute of this style-sheet.
 String toString(CSSEngine eng)
          Returns a printable representation of this style-sheet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rules

protected Rule[] rules
The rules.


size

protected int size
The number of rules.


parent

protected StyleSheet parent
The parent sheet, if any.


alternate

protected boolean alternate
Whether or not this stylesheet is alternate.


media

protected org.w3c.css.sac.SACMediaList media
The media to use to cascade properties.


title

protected String title
The style sheet title.

Constructor Detail

StyleSheet

public StyleSheet()
Method Detail

setMedia

public void setMedia(org.w3c.css.sac.SACMediaList m)
Sets the media to use to compute the styles.


getMedia

public org.w3c.css.sac.SACMediaList getMedia()
Returns the media to use to compute the styles.


getParent

public StyleSheet getParent()
Returns the parent sheet.


setParent

public void setParent(StyleSheet ss)
Sets the parent sheet.


setAlternate

public void setAlternate(boolean b)
Sets the 'alternate' attribute of this style-sheet.


isAlternate

public boolean isAlternate()
Tells whether or not this stylesheet is alternate.


setTitle

public void setTitle(String t)
Sets the 'title' attribute of this style-sheet.


getTitle

public String getTitle()
Returns the title of this style-sheet.


getSize

public int getSize()
Returns the number of rules.


getRule

public Rule getRule(int i)
Returns the rule at the given index.


clear

public void clear()
Clears the content.


append

public void append(Rule r)
Appends a rule to the stylesheet.


toString

public String toString(CSSEngine eng)
Returns a printable representation of this style-sheet.



Copyright © 2008 Apache Software Foundation. All Rights Reserved.