org.jfree.layouting.input.style

Class StyleSheet

Implemented Interfaces:
Cloneable, Serializable

public class StyleSheet
extends java.lang.Object
implements Cloneable, Serializable

A CSS stylesheet. Unlike the W3C stylesheet classes, this class is a minimal set of attributes, designed with usablity and performance in mind.

Stylesheets are resolved by looking at the elements. For the sake of simplicity, stylesheet objects itself do not hold references to their parent stylesheets.

The W3C media list is omited - this library assumes the visual/print media. The media would have been specified in the document anyway, so we do not care.

This class is a union of the W3C CSSStyleSheet and the CSSStyleRuleList. It makes no sense to separate them in this context.

Author:
Thomas Morgner

Constructor Summary

StyleSheet()

Method Summary

void
addNamespace(String prefix, String uri)
void
addRule(StyleRule rule)
void
addStyleSheet(StyleSheet styleSheet)
Object
clone()
void
deleteRule(int index)
String[]
getNamespacePrefixes()
String
getNamespaceURI(String prefix)
Map
getNamespaces()
ResourceManager
getResourceManager()
StyleRule
getRule(int index)
int
getRuleCount()
ResourceKey
getSource()
StyleKeyRegistry
getStyleKeyRegistry()
StyleSheet
getStyleSheet(int index)
int
getStyleSheetCount()
void
insertRule(int index, StyleRule rule)
boolean
isReadOnly()
void
removeStyleSheet(StyleSheet styleSheet)
protected void
setReadOnly(boolean readOnly)
void
setResourceManager(ResourceManager resourceManager)
void
setSource(ResourceKey href)

Constructor Details

StyleSheet

public StyleSheet()

Method Details

addNamespace

public void addNamespace(String prefix,
                         String uri)

addRule

public void addRule(StyleRule rule)

addStyleSheet

public void addStyleSheet(StyleSheet styleSheet)

clone

public Object clone()
            throws CloneNotSupportedException

deleteRule

public void deleteRule(int index)

getNamespacePrefixes

public String[] getNamespacePrefixes()

getNamespaceURI

public String getNamespaceURI(String prefix)

getNamespaces

public Map getNamespaces()

getResourceManager

public ResourceManager getResourceManager()

getRule

public StyleRule getRule(int index)

getRuleCount

public int getRuleCount()

getSource

public ResourceKey getSource()

getStyleKeyRegistry

public StyleKeyRegistry getStyleKeyRegistry()

getStyleSheet

public StyleSheet getStyleSheet(int index)

getStyleSheetCount

public int getStyleSheetCount()

insertRule

public void insertRule(int index,
                       StyleRule rule)

isReadOnly

public boolean isReadOnly()

removeStyleSheet

public void removeStyleSheet(StyleSheet styleSheet)

setReadOnly

protected void setReadOnly(boolean readOnly)

setResourceManager

public void setResourceManager(ResourceManager resourceManager)

setSource

public void setSource(ResourceKey href)