|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lightdev.app.shtm.CSSWriter
public class CSSWriter
A writer for creating a cascading style sheet (CSS) file
from a StyleSheet
.
Constructor Summary | |
---|---|
CSSWriter(java.io.Writer writer,
javax.swing.text.html.StyleSheet styles)
construct a new CSSWriter |
Method Summary | |
---|---|
void |
write()
write the style sheet to the given writer |
void |
writeRule(java.lang.String ruleName)
write out a rule with a given name |
void |
writeRule(java.lang.String ruleName,
javax.swing.text.AttributeSet rule)
write out a rule with a given name and style |
boolean |
writeStyle(javax.swing.text.AttributeSet style)
write a given style |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSSWriter(java.io.Writer writer, javax.swing.text.html.StyleSheet styles)
writer
- the writer to write tostyles
- the StyleSheet to writeMethod Detail |
---|
public void write() throws java.io.IOException
java.io.IOException
public void writeRule(java.lang.String ruleName) throws java.io.IOException
Takes the style with the given name from the style sheet passed in the constructor and writes it to the writer passed in the constructor.
.
ruleName
- the name of the rule to write out
java.io.IOException
- if i/o failspublic void writeRule(java.lang.String ruleName, javax.swing.text.AttributeSet rule) throws java.io.IOException
Takes the style passed in paramter 'rule' and writes it under the given name to the writer passed in the constructor.
.
ruleName
- the name of the rule to write out
java.io.IOException
- if i/o failspublic boolean writeStyle(javax.swing.text.AttributeSet style) throws java.io.IOException
A style is an AttributeSet which can have other AttributeSets in the value field of one of its Attributes. Therefore this is recursively called whenever an Attribute contains another AttributeSet.
style
- the Style
to write
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |