Class Sheet
- java.lang.Object
-
- org.daisy.dotify.formatter.impl.sheet.Sheet
-
- All Implemented Interfaces:
SplitPointUnit
public class Sheet extends Object implements SplitPointUnit
Provides a sheet data type. A sheet represents a physical paper and just like a physical sheet, it can hold one or two pages.
Sheet is the unit used when calculating volume breaks. For this reason, Sheet implements
SplitPointUnit
. The last sheet of the volume may be modified after the volume break has been calculated.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
collapsesWith(Object obj)
Returns true if this unit can collapse with the other object.static int
countPages(List<Sheet> sheets)
Counts the number of pages.VolumeKeepPriority
getAvoidVolumeBreakAfterPriority()
float
getLastUnitSize()
Gets the size of the unit if it is the last unit.List<PageImpl>
getPages()
SectionProperties
getSectionProperties()
List<String>
getSupplementaryIDs()
Gets the supplementary IDs for this unit.float
getUnitSize()
Gets the size of the unit.boolean
isBreakable()
Returns true if this unit is allowed to be the last unit in a result.boolean
isCollapsible()
Returns true if this unit can be excluded if an adjoining objectcollapsesWith
this unit, but has a greater size.boolean
isSkippable()
Returns true if this unit is skippable if it overflows the result.String
toString()
-
-
-
Method Detail
-
getSectionProperties
public SectionProperties getSectionProperties()
-
isBreakable
public boolean isBreakable()
Description copied from interface:SplitPointUnit
Returns true if this unit is allowed to be the last unit in a result.- Specified by:
isBreakable
in interfaceSplitPointUnit
- Returns:
- returns true if the unit is breakable, false otherwise
-
isSkippable
public boolean isSkippable()
Description copied from interface:SplitPointUnit
Returns true if this unit is skippable if it overflows the result.- Specified by:
isSkippable
in interfaceSplitPointUnit
- Returns:
- returns true if the unit is skippable, false otherwise
-
isCollapsible
public boolean isCollapsible()
Description copied from interface:SplitPointUnit
Returns true if this unit can be excluded if an adjoining objectcollapsesWith
this unit, but has a greater size.- Specified by:
isCollapsible
in interfaceSplitPointUnit
- Returns:
- true if the unit is collapsible, false otherwise
-
getUnitSize
public float getUnitSize()
Description copied from interface:SplitPointUnit
Gets the size of the unit.- Specified by:
getUnitSize
in interfaceSplitPointUnit
- Returns:
- returns the size of the unit
-
getLastUnitSize
public float getLastUnitSize()
Description copied from interface:SplitPointUnit
Gets the size of the unit if it is the last unit.- Specified by:
getLastUnitSize
in interfaceSplitPointUnit
- Returns:
- returns the size of the unit when placed last in the result.
-
getAvoidVolumeBreakAfterPriority
public VolumeKeepPriority getAvoidVolumeBreakAfterPriority()
-
collapsesWith
public boolean collapsesWith(Object obj)
Description copied from interface:SplitPointUnit
Returns true if this unit can collapse with the other object.- Specified by:
collapsesWith
in interfaceSplitPointUnit
- Parameters:
obj
- the other object- Returns:
- true if the objects can collapse, false otherwise
-
getSupplementaryIDs
public List<String> getSupplementaryIDs()
Description copied from interface:SplitPointUnit
Gets the supplementary IDs for this unit.- Specified by:
getSupplementaryIDs
in interfaceSplitPointUnit
- Returns:
- returns a list of the supplementary IDs
-
-