Java Printer Usage getOrientationRequested(int value)

Here you can find the source of getOrientationRequested(int value)

Description

get Orientation Requested

License

Open Source License

Declaration

public static OrientationRequested getOrientationRequested(int value) 

Method Source Code

//package com.java2s;

import javax.print.attribute.standard.OrientationRequested;

public class Main {
    public static OrientationRequested getOrientationRequested(int value) {
        if (OrientationRequested.LANDSCAPE.getValue() == value)
            return OrientationRequested.LANDSCAPE;

        if (OrientationRequested.PORTRAIT.getValue() == value)
            return OrientationRequested.PORTRAIT;

        if (OrientationRequested.REVERSE_LANDSCAPE.getValue() == value)
            return OrientationRequested.REVERSE_LANDSCAPE;

        if (OrientationRequested.REVERSE_PORTRAIT.getValue() == value)
            return OrientationRequested.REVERSE_PORTRAIT;

        return OrientationRequested.LANDSCAPE;
    }/*from w ww.j a v  a  2  s .c  om*/
}

Related

  1. getDefaultPrinterName()
  2. getDefaultPrintRequestAttributes()
  3. getEnumAttribute(String name, Object value)
  4. getIntegerAttribute(String name, int value)
  5. getJobPriority(int pages, int copies, boolean withDialog)
  6. getPaperTraysArray(PrintService ps)
  7. getPrinterAttributes(PrintService printer)
  8. getPrinterJobProperties(PrintService ps)
  9. getPrinterNames()