Package org.daisy.dotify.api.paper
Class SheetPaperFormat
- java.lang.Object
-
- org.daisy.dotify.api.paper.AbstractPageFormat
-
- org.daisy.dotify.api.paper.SheetPaperFormat
-
- All Implemented Interfaces:
PageFormat
public class SheetPaperFormat extends AbstractPageFormat
Provides a paper format for cut-sheet paper.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SheetPaperFormat.Orientation
The width/height orientation of the page-
Nested classes/interfaces inherited from interface org.daisy.dotify.api.paper.PageFormat
PageFormat.Type
-
-
Constructor Summary
Constructors Constructor Description SheetPaperFormat(Length pageWidth, Length pageHeight)
Creates a new cut-sheet paper.SheetPaperFormat(Length pageWidth, Length pageHeight, SheetPaperFormat.Orientation orientation)
Creates a new cut-sheet paper.SheetPaperFormat(SheetPaper paper, SheetPaperFormat.Orientation orientation)
Creates a new cut-sheet paper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SheetPaperFormat
asSheetPaperFormat()
Returns this PageFormat as a SheetPaperFormatSheetPaperFormat.Orientation
getOrientation()
Gets the orientation of this paper format.PageFormat.Type
getPageFormatType()
Gets the paper in this paper formatLength
getPageHeight()
Gets the page height with respect to the orientation of the paper formatLength
getPageWidth()
Gets the page width with respect to the orientation of the paper formatString
toString()
-
Methods inherited from class org.daisy.dotify.api.paper.AbstractPageFormat
asRollPaperFormat, asTractorPaperFormat
-
-
-
-
Constructor Detail
-
SheetPaperFormat
public SheetPaperFormat(SheetPaper paper, SheetPaperFormat.Orientation orientation)
Creates a new cut-sheet paper.- Parameters:
paper
- the paper to useorientation
- the orientation of the paper
-
SheetPaperFormat
public SheetPaperFormat(Length pageWidth, Length pageHeight)
Creates a new cut-sheet paper.- Parameters:
pageWidth
- the paper width in the default orientationpageHeight
- the paper height in the default orientation
-
SheetPaperFormat
public SheetPaperFormat(Length pageWidth, Length pageHeight, SheetPaperFormat.Orientation orientation)
Creates a new cut-sheet paper.- Parameters:
pageWidth
- the paper width in the default orientationpageHeight
- the paper height in the default orientationorientation
- the orientation
-
-
Method Detail
-
getOrientation
public SheetPaperFormat.Orientation getOrientation()
Gets the orientation of this paper format.- Returns:
- returns the orientation
-
getPageWidth
public Length getPageWidth()
Gets the page width with respect to the orientation of the paper format- Returns:
- returns the width.
-
getPageHeight
public Length getPageHeight()
Gets the page height with respect to the orientation of the paper format- Returns:
- returns the height.
-
getPageFormatType
public PageFormat.Type getPageFormatType()
Description copied from interface:PageFormat
Gets the paper in this paper format- Returns:
- returns the type
-
asSheetPaperFormat
public SheetPaperFormat asSheetPaperFormat()
Description copied from interface:PageFormat
Returns this PageFormat as a SheetPaperFormat- Specified by:
asSheetPaperFormat
in interfacePageFormat
- Overrides:
asSheetPaperFormat
in classAbstractPageFormat
- Returns:
- returns the SheetPaperFormat
-
-