Package org.daisy.dotify.api.formatter
Interface BlockContentBuilder
-
- All Known Subinterfaces:
BlockBuilder
,ContentCollection
,FormatterCore
,FormatterSequence
,TableOfContents
,VolumeContentBuilder
public interface BlockContentBuilder
Provides methods that supply content to a block.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChars(CharSequence chars, TextProperties props)
Add chars to the current blockvoid
endSpan()
Ends a previously opened span sectionvoid
endStyle()
Ends a previously opened style sectionvoid
insertAnchor(String ref)
Insert an anchor at the current position in the flowvoid
insertEvaluate(DynamicContent exp, TextProperties t)
Inserts an expression to evaluate.void
insertLeader(Leader leader)
Insert a leader at the current position in the flowvoid
insertMarker(Marker marker)
Insert a marker at the current position in the flowvoid
insertReference(String identifier, NumeralStyle numeralStyle)
Adds the page number of a reference.void
newLine()
Explicitly break the current line, even if the line has space left for more characters.void
startSpan(SpanProperties props)
Starts a span sectionvoid
startStyle(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
-
-