Class BlockContentManager
- java.lang.Object
-
- org.daisy.dotify.formatter.impl.row.AbstractBlockContentManager
-
- org.daisy.dotify.formatter.impl.row.BlockContentManager
-
- All Implemented Interfaces:
BlockStatistics
public class BlockContentManager extends AbstractBlockContentManager
BlockHandler is responsible for breaking blocks of text into rows. BlockProperties such as list numbers, leaders and margins are resolved in the process. The input text is filtered using the supplied StringFilter before breaking into rows, since the length of the text could change.
-
-
Constructor Summary
Constructors Constructor Description BlockContentManager(String blockId, int flowWidth, List<Segment> segments, RowDataProperties rdp, CrossReferenceHandler refs, DefaultContext context, FormatterCoreContext fcontext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractBlockContentManagercopy()intgetForceBreakCount()Gets the number of forced line breaks.List<String>getGroupAnchors()List<String>getGroupIdentifiers()List<Marker>getGroupMarkers()Get markers that are not attached to a row, i.e.Optional<RowImpl>getNext(LineProperties lineProps)intgetRowCount()Gets the number of rows produced.booleanhasNext()Returns true if the manager has more rows.booleanhasSignificantContent()Returns true if the manager has some "significant" content.voidreset()Resets the state of the content manager to the first row.voidsetContext(DefaultContext context)booleansupportsVariableWidth()Returns true if this manager supports rows with variable maximum width, false otherwise.-
Methods inherited from class org.daisy.dotify.formatter.impl.row.AbstractBlockContentManager
getCollapsiblePreContentRows, getInnerPreContentRows, getLeftMarginParent, getMinimumAvailableWidth, getNext, getPostContentRows, getRightMarginParent, getSkippablePostContentRows, hasCollapsiblePreContentRows, hasInnerPreContentRows, hasPostContentRows, hasSkippablePostContentRows
-
-
-
-
Constructor Detail
-
BlockContentManager
public BlockContentManager(String blockId, int flowWidth, List<Segment> segments, RowDataProperties rdp, CrossReferenceHandler refs, DefaultContext context, FormatterCoreContext fcontext)
-
-
Method Detail
-
setContext
public void setContext(DefaultContext context)
- Specified by:
setContextin classAbstractBlockContentManager
-
copy
public AbstractBlockContentManager copy()
- Specified by:
copyin classAbstractBlockContentManager
-
getRowCount
public int getRowCount()
Description copied from interface:BlockStatisticsGets the number of rows produced.- Returns:
- the number of rows produced
-
supportsVariableWidth
public boolean supportsVariableWidth()
Description copied from class:AbstractBlockContentManagerReturns true if this manager supports rows with variable maximum width, false otherwise.- Specified by:
supportsVariableWidthin classAbstractBlockContentManager- Returns:
- true if variable maximum width is supported, false otherwise
-
reset
public void reset()
Description copied from class:AbstractBlockContentManagerResets the state of the content manager to the first row.- Specified by:
resetin classAbstractBlockContentManager
-
hasNext
public boolean hasNext()
Description copied from class:AbstractBlockContentManagerReturns true if the manager has more rows.- Specified by:
hasNextin classAbstractBlockContentManager- Returns:
- returns true if there are more rows, false otherwise
-
getNext
public Optional<RowImpl> getNext(LineProperties lineProps)
- Specified by:
getNextin classAbstractBlockContentManager
-
getForceBreakCount
public int getForceBreakCount()
Description copied from interface:BlockStatisticsGets the number of forced line breaks.- Returns:
- the number of forced line breaks
-
getGroupMarkers
public List<Marker> getGroupMarkers()
Description copied from class:AbstractBlockContentManagerGet markers that are not attached to a row, i.e. markers that proceeds any text contents- Specified by:
getGroupMarkersin classAbstractBlockContentManager- Returns:
- returns markers that proceeds this FlowGroups text contents
-
getGroupAnchors
public List<String> getGroupAnchors()
- Specified by:
getGroupAnchorsin classAbstractBlockContentManager
-
getGroupIdentifiers
public List<String> getGroupIdentifiers()
- Specified by:
getGroupIdentifiersin classAbstractBlockContentManager
-
hasSignificantContent
public boolean hasSignificantContent()
Description copied from class:AbstractBlockContentManagerReturns true if the manager has some "significant" content.- Specified by:
hasSignificantContentin classAbstractBlockContentManager- Returns:
- returns true if there is significant content, false otherwise.
-
-