Package io.sf.carte.doc.style.css.om
Class RGBColorDeclarationFormattingContext
java.lang.Object
io.sf.carte.doc.style.css.om.DefaultDeclarationFormattingContext
io.sf.carte.doc.style.css.om.RGBColorDeclarationFormattingContext
- All Implemented Interfaces:
DeclarationFormattingContext
,Serializable
DeclarationFormattingContext that serializes colors as RGB (sRGB).
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
writeMinifiedValue
(io.sf.carte.util.SimpleWriter wri, String propertyName, CSSValue value) Write a minified css value to the given writer.void
writeValue
(io.sf.carte.util.SimpleWriter wri, String propertyName, CSSValue value) Write a css value to the given writer.Methods inherited from class io.sf.carte.doc.style.css.om.DefaultDeclarationFormattingContext
endPropertyDeclaration, startPropertyDeclaration, writeColon, writeComma, writeFullIndent, writeSemiColon, writeURL
-
Constructor Details
-
RGBColorDeclarationFormattingContext
public RGBColorDeclarationFormattingContext()
-
-
Method Details
-
writeValue
public void writeValue(io.sf.carte.util.SimpleWriter wri, String propertyName, CSSValue value) throws IOException Description copied from interface:DeclarationFormattingContext
Write a css value to the given writer.The default implementation calls
CSSValue.writeCssText(SimpleWriter)
.- Parameters:
wri
- the writer.propertyName
- the name of the property whose value is being printed.value
- the value to write.- Throws:
IOException
- if an error happened while writing.
-
writeMinifiedValue
public void writeMinifiedValue(io.sf.carte.util.SimpleWriter wri, String propertyName, CSSValue value) throws IOException Description copied from interface:DeclarationFormattingContext
Write a minified css value to the given writer.Note that in order to guarantee some consistency, shorthands may not use this method to minify values.
The default implementation just writes
CSSValue.getMinifiedCssText(String)
.- Parameters:
wri
- the writer.propertyName
- the name of the property whose value is being printed.value
- the value to write.- Throws:
IOException
- if an error happened while writing.
-