Class SheetGroupManager
- java.lang.Object
-
- org.daisy.dotify.formatter.impl.sheet.SheetGroupManager
-
public class SheetGroupManager extends Object
Provides a manager for
SheetGroup
.Used by
VolumeProvider
.
-
-
Constructor Summary
Constructors Constructor Description SheetGroupManager()
Creates a new sheet group manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SheetGroup
add()
Creates a new sheet group, adds it to the manager and returns it.SheetGroup
atIndex(int index)
Gets the sheet group at the given index, zero based.int
countTotalSheets()
Counts the total number of sheets.SheetGroup
currentGroup()
Gets the currently active group.int
getVolumeCount()
Gets the total number of volumes.boolean
hasNext()
Returns true if there is content left.void
nextVolume()
Informs the manager that a new volume has started.void
resetAll()
Resets the state of this manager.
-
-
-
Method Detail
-
add
public SheetGroup add()
Creates a new sheet group, adds it to the manager and returns it.- Returns:
- returns the new sheet group
-
atIndex
public SheetGroup atIndex(int index)
Gets the sheet group at the given index, zero based.- Parameters:
index
- the index, zero based- Returns:
- returns the sheet group
-
currentGroup
public SheetGroup currentGroup()
Gets the currently active group.- Returns:
- returns the current group
-
nextVolume
public void nextVolume()
Informs the manager that a new volume has started. If the current group's splitter has reached its target number of volumes (as counted by previous calls to this method), the group following that is activated.
-
resetAll
public void resetAll()
Resets the state of this manager.
-
hasNext
public boolean hasNext()
Returns true if there is content left.- Returns:
- returns true if the manager has content, false otherwise
-
countTotalSheets
public int countTotalSheets()
Counts the total number of sheets. Note: only use after all volumes have been calculated.- Returns:
- returns the sheet count
-
getVolumeCount
public int getVolumeCount()
Gets the total number of volumes.- Returns:
- returns the total number of volumes
-
-