- 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 TypeMethodDescriptionvoid
void
endCurrentContext
(CSSRule rule) void
void
void
endRule
(SimpleWriter wri) void
endRuleList
(SimpleWriter wri) void
void
newLine
(SimpleWriter wri) void
setParentContext
(CSSRule rule) void
void
startRule
(SimpleWriter wri) void
void
updateContext
(CSSRule rule) void
writeColon
(SimpleWriter wri) void
writeComma
(SimpleWriter wri) void
writeComment
(SimpleWriter wri, String comment) void
void
void
void
void
void
void
writeShorthandValue
(SimpleWriter wri, String shorthandName, CSSShorthandValue value) Serialize a css shorthand value to the given writer.void
writeURL
(SimpleWriter wri, String href) void
writeValue
(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
CSSShorthandValue
type 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.
-