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 FormatterCoreContext
fcontext
protected int
flowWidth
protected BlockMargin
margins
protected RowDataProperties
rdp
protected org.daisy.dotify.formatter.impl.row.BlockSpacing
spacing
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBlockContentManager(int flowWidth, RowDataProperties rdp, FormatterCoreContext fcontext, Integer minWidth)
protected
AbstractBlockContentManager(AbstractBlockContentManager template)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AbstractBlockContentManager
copy()
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()
MarginProperties
getLeftMarginParent()
int
getMinimumAvailableWidth()
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()
MarginProperties
getRightMarginParent()
List<RowImpl>
getSkippablePostContentRows()
boolean
hasCollapsiblePreContentRows()
boolean
hasInnerPreContentRows()
abstract boolean
hasNext()
Returns true if the manager has more rows.boolean
hasPostContentRows()
abstract boolean
hasSignificantContent()
Returns true if the manager has some "significant" content.boolean
hasSkippablePostContentRows()
abstract void
reset()
Resets the state of the content manager to the first row.abstract void
setContext(DefaultContext context)
abstract boolean
supportsVariableWidth()
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:BlockStatistics
Gets the minimum width available for content (excluding margins).- Specified by:
getMinimumAvailableWidth
in 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
-
-