- All Implemented Interfaces:
DeclarationFormattingContext,StyleFormattingContext,Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidendCurrentContext(CSSRule rule) Notify this context that the contents of the given rule, either a declaration or a rule list, were serialized.voidEnd an inline property declaration.voidEnds a property declaration in a rule style (does not apply to inline styles).voidendRule(SimpleWriter wri, List<String> trailingComments) Ends the serialization of a rule.voidupdateContext(CSSRule rule) Update this context for the given rule.voidwriteComment(SimpleWriter wri, String comment) Serialize a comment that precedes a rule, with the appropriate indent.voidSerialize a full paragraph indent to aSimpleWriter.voidSerialize a left curly bracket to aSimpleWriter.voidSerialize one level of indentation to aSimpleWriter.voidSerialize a semicolon to aSimpleWriter.Methods inherited from class io.sf.carte.doc.style.css.om.DefaultStyleFormattingContext
deepenCurrentContext, endRuleList, endStyleDeclaration, setParentContext, startRule, startStyleDeclaration, writeImportantPriority, writeRightCurlyBracket, writeURLMethods inherited from class io.sf.carte.doc.style.css.om.DefaultDeclarationFormattingContext
startPropertyDeclaration, writeColon, writeCommaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.sf.carte.doc.style.css.DeclarationFormattingContext
startPropertyDeclaration, writeColon, writeComma, writeMinifiedValue, writeValueMethods inherited from interface io.sf.carte.doc.style.css.StyleFormattingContext
writeShorthandValue
-
Constructor Details
-
InlineStyleFormattingContext
public InlineStyleFormattingContext()
-
-
Method Details
-
endCurrentContext
Description copied from interface:StyleFormattingContextNotify this context that the contents of the given rule, either a declaration or a rule list, were serialized.It is generally called before
StyleFormattingContext.endStyleDeclaration(SimpleWriter)andStyleFormattingContext.endRuleList(SimpleWriter).- Specified by:
endCurrentContextin interfaceStyleFormattingContext- Overrides:
endCurrentContextin classDefaultStyleFormattingContext- Parameters:
rule- the rule being serialized.
-
endPropertyDeclaration
Description copied from interface:DeclarationFormattingContextEnds a property declaration in a rule style (does not apply to inline styles).It is called after
DeclarationFormattingContext.writeSemiColon(SimpleWriter).- Specified by:
endPropertyDeclarationin interfaceDeclarationFormattingContext- Overrides:
endPropertyDeclarationin classDefaultStyleFormattingContext- Parameters:
wri- the writer.- Throws:
IOException- if an I/O problem happens while writing to theSimpleWriter.
-
endInlinePropertyDeclaration
Description copied from interface:StyleFormattingContextEnd an inline property declaration.Called after
DeclarationFormattingContext.writeSemiColon(SimpleWriter), only from inline styles.- Specified by:
endInlinePropertyDeclarationin interfaceStyleFormattingContext- Overrides:
endInlinePropertyDeclarationin classDefaultStyleFormattingContext- Parameters:
wri- the writer to write to.- Throws:
IOException- if an I/O problem happens while writing to theSimpleWriter.
-
endRule
Description copied from interface:StyleFormattingContextEnds the serialization of a rule.It is called after
StyleFormattingContext.writeRightCurlyBracket(SimpleWriter).- Specified by:
endRulein interfaceStyleFormattingContext- Overrides:
endRulein classDefaultStyleFormattingContext- Parameters:
wri- the writer to write to.trailingComments- the comments that go after the rule.- Throws:
IOException- if an I/O problem happens while writing to theSimpleWriter.
-
updateContext
Description copied from interface:StyleFormattingContextUpdate this context for the given rule.For style rules, it is called after serializing the selector list and before
StyleFormattingContext.writeLeftCurlyBracket(SimpleWriter). At-rules call it after writing the rule name.May be used for indentation.
- Specified by:
updateContextin interfaceStyleFormattingContext- Overrides:
updateContextin classDefaultStyleFormattingContext- Parameters:
rule- the rule being serialized.
-
writeComment
Description copied from interface:StyleFormattingContextSerialize a comment that precedes a rule, with the appropriate indent.Trailing comments are generally written directly by
StyleFormattingContext.endRule(SimpleWriter, List)because no indent is necessary.- Specified by:
writeCommentin interfaceStyleFormattingContext- Overrides:
writeCommentin classDefaultStyleFormattingContext- Parameters:
wri- the writer to write to.comment- the comment to serialize.- Throws:
IOException- if an I/O problem happens while writing to theSimpleWriter.
-
writeFullIndent
Description copied from interface:DeclarationFormattingContextSerialize a full paragraph indent to aSimpleWriter.- Specified by:
writeFullIndentin interfaceDeclarationFormattingContext- Overrides:
writeFullIndentin classDefaultStyleFormattingContext- Parameters:
wri- the writer.- Throws:
IOException- if an I/O problem happens while writing to theSimpleWriter.
-
writeLeftCurlyBracket
Description copied from interface:StyleFormattingContextSerialize a left curly bracket to aSimpleWriter.Called after
StyleFormattingContext.updateContext(CSSRule)and beforeStyleFormattingContext.startStyleDeclaration(SimpleWriter).- Specified by:
writeLeftCurlyBracketin interfaceStyleFormattingContext- Overrides:
writeLeftCurlyBracketin classDefaultStyleFormattingContext- Parameters:
wri- the writer.- Throws:
IOException- if an I/O problem happens while writing to theSimpleWriter.
-
writeLevelIndent
Description copied from interface:StyleFormattingContextSerialize one level of indentation to aSimpleWriter.- Specified by:
writeLevelIndentin interfaceStyleFormattingContext- Overrides:
writeLevelIndentin classDefaultStyleFormattingContext- Parameters:
wri- the writer.- Throws:
IOException- if an I/O problem happens while writing to theSimpleWriter.
-
writeSemiColon
Description copied from interface:DeclarationFormattingContextSerialize a semicolon to aSimpleWriter.Called after writing the property name.
- Specified by:
writeSemiColonin interfaceDeclarationFormattingContext- Overrides:
writeSemiColonin classDefaultStyleFormattingContext- Parameters:
wri- the writer.- Throws:
IOException- if an I/O problem happens while writing to theSimpleWriter.
-