|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xhtmlrenderer.context.StylesheetFactoryImpl
public class StylesheetFactoryImpl
A Factory class for Cascading Style Sheets. Sheets are parsed using a single parser instance for all sheets. Sheets are cached by URI using a LRU test, but timestamp of file is not checked.
| Constructor Summary | |
|---|---|
StylesheetFactoryImpl(UserAgentCallback userAgentCallback)
|
|
| Method Summary | |
|---|---|
boolean |
containsStylesheet(Object key)
|
void |
flushCachedStylesheets()
|
Stylesheet |
getCachedStylesheet(Object key)
Returns a cached sheet by its key; null if no entry for that key. |
Stylesheet |
getStylesheet(StylesheetInfo info)
Returns a cached sheet by its key; loads and caches it if not in cache; null if not able to load |
Stylesheet |
parse(Reader reader,
StylesheetInfo info)
|
Ruleset |
parseStyleDeclaration(int origin,
String styleDeclaration)
|
void |
putStylesheet(Object key,
Stylesheet sheet)
Adds a stylesheet to the factory cache. |
Object |
removeCachedStylesheet(Object key)
Removes a cached sheet by its key. |
void |
setSupportCMYKColors(boolean b)
|
void |
setUserAgentCallback(UserAgentCallback userAgent)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StylesheetFactoryImpl(UserAgentCallback userAgentCallback)
| Method Detail |
|---|
public Stylesheet parse(Reader reader,
StylesheetInfo info)
parse in interface StylesheetFactory
public Ruleset parseStyleDeclaration(int origin,
String styleDeclaration)
parseStyleDeclaration in interface StylesheetFactory
public void putStylesheet(Object key,
Stylesheet sheet)
key - Key to use to reference sheet later; must be unique in
factory.sheet - The sheet to cache.public boolean containsStylesheet(Object key)
key -
public Stylesheet getCachedStylesheet(Object key)
key - The key for this sheet; same as key passed to
putStylesheet();
public Object removeCachedStylesheet(Object key)
key - The key for this sheet; same as key passed to
putStylesheet();public void flushCachedStylesheets()
public Stylesheet getStylesheet(StylesheetInfo info)
getStylesheet in interface StylesheetFactoryinfo - The StylesheetInfo for this sheet
public void setUserAgentCallback(UserAgentCallback userAgent)
public void setSupportCMYKColors(boolean b)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||