Example usage for javax.print.attribute.standard Sides TWO_SIDED_LONG_EDGE

List of usage examples for javax.print.attribute.standard Sides TWO_SIDED_LONG_EDGE

Introduction

In this page you can find the example usage for javax.print.attribute.standard Sides TWO_SIDED_LONG_EDGE.

Prototype

Sides TWO_SIDED_LONG_EDGE

To view the source code for javax.print.attribute.standard Sides TWO_SIDED_LONG_EDGE.

Click Source Link

Document

Imposes each consecutive pair of print-stream pages upon front and back sides of consecutive media sheets, such that the orientation of each pair of print-stream pages on the medium would be correct for the reader as if for binding on the long edge.

Usage

From source file:org.apache.camel.component.printer.PrinterConfiguration.java

public Sides assignSides(String sidesString) {
    Sides answer;// w  w w .j  ava 2 s .c om

    if (sidesString == null) {
        // default to one side if no slides configured
        answer = Sides.ONE_SIDED;
    } else if (sidesString.equalsIgnoreCase("one-sided")) {
        answer = Sides.ONE_SIDED;
    } else if (sidesString.equalsIgnoreCase("duplex")) {
        answer = Sides.DUPLEX;
    } else if (sidesString.equalsIgnoreCase("tumble")) {
        answer = Sides.TUMBLE;
    } else if (sidesString.equalsIgnoreCase("two-sided-short-edge")) {
        answer = Sides.TWO_SIDED_SHORT_EDGE;
    } else if (sidesString.equalsIgnoreCase("two-sided-long-edge")) {
        answer = Sides.TWO_SIDED_LONG_EDGE;
    } else {
        answer = Sides.ONE_SIDED;
    }

    return answer;
}