Example usage for javax.print.attribute.standard MediaSize getY

List of usage examples for javax.print.attribute.standard MediaSize getY

Introduction

In this page you can find the example usage for javax.print.attribute.standard MediaSize getY.

Prototype

public float getY(int units) 

Source Link

Document

Returns this two-dimensional size attribute's Y dimension in the given units as a floating-point value.

Usage

From source file:org.pentaho.reporting.engine.classic.extensions.modules.java14print.Java14PrintUtil.java

private static Paper createPaper(final MediaSize mediaSize, final MediaPrintableArea printableArea) {
    final Paper paper = new Paper();
    if (mediaSize != null) {
        paper.setSize(mediaSize.getX(Size2DSyntax.INCH) * POINTS_PER_INCH,
                mediaSize.getY(Size2DSyntax.INCH) * POINTS_PER_INCH);
    }/*w  ww  .j a v a  2 s. co m*/
    if (printableArea != null) {
        paper.setImageableArea(printableArea.getX(Size2DSyntax.INCH) * POINTS_PER_INCH,
                printableArea.getY(Size2DSyntax.INCH) * POINTS_PER_INCH,
                printableArea.getWidth(Size2DSyntax.INCH) * POINTS_PER_INCH,
                printableArea.getHeight(Size2DSyntax.INCH) * POINTS_PER_INCH);
    }
    return paper;
}