Package org.apache.batik.css.engine
Class StyleSheet
- java.lang.Object
-
- org.apache.batik.css.engine.StyleSheet
-
- Direct Known Subclasses:
MediaRule
public class StyleSheet extends java.lang.ObjectThis class represents a list of rules.- Version:
- $Id: StyleSheet.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanalternateWhether or not this stylesheet is alternate.protected org.w3c.css.sac.SACMediaListmediaThe media to use to cascade properties.protected StyleSheetparentThe parent sheet, if any.protected Rule[]rulesThe rules.protected intsizeThe number of rules.protected java.lang.StringtitleThe style sheet title.
-
Constructor Summary
Constructors Constructor Description StyleSheet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(Rule r)Appends a rule to the stylesheet.voidclear()Clears the content.org.w3c.css.sac.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.java.lang.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(org.w3c.css.sac.SACMediaList m)Sets the media to use to compute the styles.voidsetParent(StyleSheet ss)Sets the parent sheet.voidsetTitle(java.lang.String t)Sets the 'title' attribute of this style-sheet.java.lang.StringtoString(CSSEngine eng)Returns a printable representation of this style-sheet.
-
-
-
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 java.lang.String title
The style sheet title.
-
-
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(java.lang.String t)
Sets the 'title' attribute of this style-sheet.
-
getTitle
public java.lang.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 java.lang.String toString(CSSEngine eng)
Returns a printable representation of this style-sheet.
-
-