Package org.daisy.paper
Class SheetPaperFormat
java.lang.Object
org.daisy.paper.AbstractPageFormat
org.daisy.paper.SheetPaperFormat
- All Implemented Interfaces:
PageFormat
Provides a paper format for cut-sheet paper.
- Author:
- Joel HÃ¥kansson
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The width/height orientation of the pageNested classes/interfaces inherited from interface org.daisy.paper.PageFormat
PageFormat.Type
-
Constructor Summary
ConstructorDescriptionSheetPaperFormat
(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
Modifier and TypeMethodDescriptionReturns this PageFormat as a SheetPaperFormatGets the orientation of this paper format.Gets the paper in this paper formatGets the page height with respect to the orientation of the paper formatGets the page width with respect to the orientation of the paper formattoString()
Methods inherited from class org.daisy.paper.AbstractPageFormat
asRollPaperFormat, asTractorPaperFormat
-
Constructor Details
-
SheetPaperFormat
Creates a new cut-sheet paper.- Parameters:
paper
- the paper to useorientation
- the orientation of the paper
-
SheetPaperFormat
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 Details
-
getOrientation
Gets the orientation of this paper format.- Returns:
- returns the orientation
-
getPageWidth
Gets the page width with respect to the orientation of the paper format- Returns:
- returns the width.
-
getPageHeight
Gets the page height with respect to the orientation of the paper format- Returns:
- returns the height.
-
getPageFormatType
Description copied from interface:PageFormat
Gets the paper in this paper format- Returns:
- returns the type
-
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
-
toString
-