org.apache.batik.css.engine

Class StyleSheet

public class StyleSheet extends Object

This class represents a list of rules.
Field Summary
protected booleanalternate
Whether or not this stylesheet is alternate.
protected SACMediaListmedia
The media to use to cascade properties.
protected StyleSheetparent
The parent sheet, if any.
protected Rule[]rules
The rules.
protected intsize
The number of rules.
protected Stringtitle
The style sheet title.
Method Summary
voidappend(Rule r)
Appends a rule to the stylesheet.
voidclear()
Clears the content.
SACMediaListgetMedia()
Returns the media to use to compute the styles.
StyleSheetgetParent()
Returns the parent sheet.
RulegetRule(int i)
Returns the rule at the given index.
intgetSize()
Returns the number of rules.
StringgetTitle()
Returns the title of this style-sheet.
booleanisAlternate()
Tells whether or not this stylesheet is alternate.
voidsetAlternate(boolean b)
Sets the 'alternate' attribute of this style-sheet.
voidsetMedia(SACMediaList m)
Sets the media to use to compute the styles.
voidsetParent(StyleSheet ss)
Sets the parent sheet.
voidsetTitle(String t)
Sets the 'title' attribute of this style-sheet.
StringtoString(CSSEngine eng)
Returns a printable representation of this style-sheet.

Field Detail

alternate

protected boolean alternate
Whether or not this stylesheet is alternate.

media

protected SACMediaList media
The media to use to cascade properties.

parent

protected StyleSheet parent
The parent sheet, if any.

rules

protected Rule[] rules
The rules.

size

protected int size
The number of rules.

title

protected String title
The style sheet title.

Method Detail

append

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

clear

public void clear()
Clears the content.

getMedia

public SACMediaList getMedia()
Returns the media to use to compute the styles.

getParent

public StyleSheet getParent()
Returns the parent sheet.

getRule

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

getSize

public int getSize()
Returns the number of rules.

getTitle

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

isAlternate

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

setAlternate

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

setMedia

public void setMedia(SACMediaList m)
Sets the media to use to compute the styles.

setParent

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

setTitle

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

toString

public String toString(CSSEngine eng)
Returns a printable representation of this style-sheet.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.