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 classSheetPaperFormat.OrientationThe 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 SheetPaperFormatasSheetPaperFormat()Returns this PageFormat as a SheetPaperFormatSheetPaperFormat.OrientationgetOrientation()Gets the orientation of this paper format.PageFormat.TypegetPageFormatType()Gets the paper in this paper formatLengthgetPageHeight()Gets the page height with respect to the orientation of the paper formatLengthgetPageWidth()Gets the page width with respect to the orientation of the paper formatStringtoString()-
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:PageFormatGets the paper in this paper format- Returns:
- returns the type
-
asSheetPaperFormat
public SheetPaperFormat asSheetPaperFormat()
Description copied from interface:PageFormatReturns this PageFormat as a SheetPaperFormat- Specified by:
asSheetPaperFormatin interfacePageFormat- Overrides:
asSheetPaperFormatin classAbstractPageFormat- Returns:
- returns the SheetPaperFormat
-
-