- All Known Implementing Classes:
DefaultStyleFormattingContext,InlineStyleFormattingContext
public interface StyleFormattingContext
Define methods for style text formatting.
Different implementations of this interface can provide different style text formattings.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidendCurrentContext(CSSRule rule) voidvoidvoidendRule(SimpleWriter wri) voidendRuleList(SimpleWriter wri) voidvoidnewLine(SimpleWriter wri) voidsetParentContext(CSSRule rule) voidvoidstartRule(SimpleWriter wri) voidvoidupdateContext(CSSRule rule) voidwriteColon(SimpleWriter wri) voidwriteComma(SimpleWriter wri) voidwriteComment(SimpleWriter wri, String comment) voidvoidvoidvoidvoidvoidvoidwriteShorthandValue(SimpleWriter wri, String shorthandName, CSSShorthandValue value) Serialize a css shorthand value to the given writer.voidwriteURL(SimpleWriter wri, String href) voidwriteValue(SimpleWriter wri, String propertyName, ExtendedCSSValue value) Write a css value to the given writer.
-
Method Details
-
deepenCurrentContext
void deepenCurrentContext() -
endCurrentContext
-
endPropertyDeclaration
- Throws:
IOException
-
endInlinePropertyDeclaration
- Throws:
IOException
-
endRule
- Throws:
IOException
-
endRuleList
- Throws:
IOException
-
endStyleDeclaration
- Throws:
IOException
-
newLine
- Throws:
IOException
-
setParentContext
-
startPropertyDeclaration
- Throws:
IOException
-
startRule
- Throws:
IOException
-
startStyleDeclaration
- Throws:
IOException
-
updateContext
-
writeColon
- Throws:
IOException
-
writeComment
- Throws:
IOException
-
writeComma
- Throws:
IOException
-
writeFullIndent
- Throws:
IOException
-
writeImportantPriority
- Throws:
IOException
-
writeLeftCurlyBracket
- Throws:
IOException
-
writeLevelIndent
- Throws:
IOException
-
writeRightCurlyBracket
- Throws:
IOException
-
writeSemiColon
- Throws:
IOException
-
writeURL
- Throws:
IOException
-
writeValue
Write a css value to the given writer.- 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.
-
writeShorthandValue
void writeShorthandValue(SimpleWriter wri, String shorthandName, CSSShorthandValue value) throws IOException Serialize a css shorthand value to the given writer.Although the
CSSShorthandValuetype contains priority information, this method only writes the value.- Parameters:
wri- the writer.shorthandName- the name of the shorthand property whose value is being printed.value- the value to write.- Throws:
IOException- if an error happened while writing.
-