Class AbstractBlockContentManager
- java.lang.Object
-
- org.daisy.dotify.formatter.impl.row.AbstractBlockContentManager
-
- All Implemented Interfaces:
BlockStatistics
- Direct Known Subclasses:
BlockContentManager
public abstract class AbstractBlockContentManager extends Object implements BlockStatistics
TODO: Write java doc.
-
-
Field Summary
Fields Modifier and Type Field Description protected FormatterCoreContextfcontextprotected intflowWidthprotected BlockMarginmarginsprotected RowDataPropertiesrdpprotected org.daisy.dotify.formatter.impl.row.BlockSpacingspacing
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractBlockContentManager(int flowWidth, RowDataProperties rdp, FormatterCoreContext fcontext, Integer minWidth)protectedAbstractBlockContentManager(AbstractBlockContentManager template)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AbstractBlockContentManagercopy()List<RowImpl>getCollapsiblePreContentRows()abstract List<String>getGroupAnchors()abstract List<String>getGroupIdentifiers()abstract List<Marker>getGroupMarkers()Get markers that are not attached to a row, i.e.List<RowImpl>getInnerPreContentRows()MarginPropertiesgetLeftMarginParent()intgetMinimumAvailableWidth()Gets the minimum width available for content (excluding margins).Optional<RowImpl>getNext()Gets the next row from the manager with the specified width.abstract Optional<RowImpl>getNext(LineProperties lineProps)List<RowImpl>getPostContentRows()MarginPropertiesgetRightMarginParent()List<RowImpl>getSkippablePostContentRows()booleanhasCollapsiblePreContentRows()booleanhasInnerPreContentRows()abstract booleanhasNext()Returns true if the manager has more rows.booleanhasPostContentRows()abstract booleanhasSignificantContent()Returns true if the manager has some "significant" content.booleanhasSkippablePostContentRows()abstract voidreset()Resets the state of the content manager to the first row.abstract voidsetContext(DefaultContext context)abstract booleansupportsVariableWidth()Returns true if this manager supports rows with variable maximum width, false otherwise.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.daisy.dotify.formatter.impl.row.BlockStatistics
getForceBreakCount, getRowCount
-
-
-
-
Field Detail
-
flowWidth
protected final int flowWidth
-
rdp
protected final RowDataProperties rdp
-
margins
protected final BlockMargin margins
-
spacing
protected final org.daisy.dotify.formatter.impl.row.BlockSpacing spacing
-
fcontext
protected final FormatterCoreContext fcontext
-
-
Constructor Detail
-
AbstractBlockContentManager
protected AbstractBlockContentManager(int flowWidth, RowDataProperties rdp, FormatterCoreContext fcontext, Integer minWidth)
-
AbstractBlockContentManager
protected AbstractBlockContentManager(AbstractBlockContentManager template)
-
-
Method Detail
-
copy
public abstract AbstractBlockContentManager copy()
-
setContext
public abstract void setContext(DefaultContext context)
-
hasNext
public abstract boolean hasNext()
Returns true if the manager has more rows.- Returns:
- returns true if there are more rows, false otherwise
-
hasSignificantContent
public abstract boolean hasSignificantContent()
Returns true if the manager has some "significant" content.- Returns:
- returns true if there is significant content, false otherwise.
-
getNext
public Optional<RowImpl> getNext()
Gets the next row from the manager with the specified width.- Returns:
- returns the next row
-
getNext
public abstract Optional<RowImpl> getNext(LineProperties lineProps)
-
supportsVariableWidth
public abstract boolean supportsVariableWidth()
Returns true if this manager supports rows with variable maximum width, false otherwise.- Returns:
- true if variable maximum width is supported, false otherwise
-
reset
public abstract void reset()
Resets the state of the content manager to the first row.
-
getLeftMarginParent
public MarginProperties getLeftMarginParent()
-
getRightMarginParent
public MarginProperties getRightMarginParent()
-
hasCollapsiblePreContentRows
public boolean hasCollapsiblePreContentRows()
-
hasInnerPreContentRows
public boolean hasInnerPreContentRows()
-
hasPostContentRows
public boolean hasPostContentRows()
-
hasSkippablePostContentRows
public boolean hasSkippablePostContentRows()
-
getMinimumAvailableWidth
public int getMinimumAvailableWidth()
Description copied from interface:BlockStatisticsGets the minimum width available for content (excluding margins).- Specified by:
getMinimumAvailableWidthin interfaceBlockStatistics- Returns:
- returns the available width, in characters
-
getGroupMarkers
public abstract List<Marker> getGroupMarkers()
Get markers that are not attached to a row, i.e. markers that proceeds any text contents- Returns:
- returns markers that proceeds this FlowGroups text contents
-
-