Package org.daisy.dotify.api.formatter
Interface BlockContentBuilder
-
- All Known Subinterfaces:
BlockBuilder,ContentCollection,FormatterCore,FormatterSequence,TableOfContents,VolumeContentBuilder
public interface BlockContentBuilderProvides methods that supply content to a block.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChars(CharSequence chars, TextProperties props)Add chars to the current blockvoidendSpan()Ends a previously opened span sectionvoidendStyle()Ends a previously opened style sectionvoidinsertAnchor(String ref)Insert an anchor at the current position in the flowvoidinsertEvaluate(DynamicContent exp, TextProperties t)Inserts an expression to evaluate.voidinsertLeader(Leader leader)Insert a leader at the current position in the flowvoidinsertMarker(Marker marker)Insert a marker at the current position in the flowvoidinsertReference(String identifier, NumeralStyle numeralStyle)Adds the page number of a reference.voidnewLine()Explicitly break the current line, even if the line has space left for more characters.voidstartSpan(SpanProperties props)Starts a span sectionvoidstartStyle(String style)Starts a style section
-
-
-
Method Detail
-
insertMarker
void insertMarker(Marker marker)
Insert a marker at the current position in the flow- Parameters:
marker- the marker to insert- Throws:
IllegalStateException- if the current state does not allow this call to be made
-
insertAnchor
void insertAnchor(String ref)
Insert an anchor at the current position in the flow- Parameters:
ref- anchor name- Throws:
IllegalStateException- if the current state does not allow this call to be made
-
insertLeader
void insertLeader(Leader leader)
Insert a leader at the current position in the flow- Parameters:
leader- the leader to insert- Throws:
IllegalStateException- if the current state does not allow this call to be made
-
addChars
void addChars(CharSequence chars, TextProperties props)
Add chars to the current block- Parameters:
chars- the characters to add to the flowprops- the SpanProperties for the characters- Throws:
IllegalStateException- if the current state does not allow this call to be made
-
startStyle
void startStyle(String style)
Starts a style section- Parameters:
style- the name of the style- Throws:
IllegalStateException- if the current state does not allow this call to be made
-
endStyle
void endStyle()
Ends a previously opened style section- Throws:
IllegalStateException- if the current state does not allow this call to be made
-
startSpan
void startSpan(SpanProperties props)
Starts a span section- Parameters:
props- the span properties
-
endSpan
void endSpan()
Ends a previously opened span section- Throws:
IllegalStateException- if the current state does not allow this call to be made
-
newLine
void newLine()
Explicitly break the current line, even if the line has space left for more characters. The current block remains open.- Throws:
IllegalStateException- if the current state does not allow this call to be made
-
insertReference
void insertReference(String identifier, NumeralStyle numeralStyle)
Adds the page number of a reference.- Parameters:
identifier- the element of interestnumeralStyle- the numeral style- Throws:
IllegalStateException- if the current state does not allow this call to be made
-
insertEvaluate
void insertEvaluate(DynamicContent exp, TextProperties t)
Inserts an expression to evaluate.- Parameters:
exp- the expressiont- the text properties
-
-