Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/print/attribute/standard/MediaTray.java
38918 views
/*1* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/24package javax.print.attribute.standard;2526import java.util.Locale;2728import javax.print.attribute.Attribute;29import javax.print.attribute.EnumSyntax;303132/**33* Class MediaTray is a subclass of Media.34* Class MediaTray is a printing attribute class, an enumeration, that35* specifies the media tray or bin for the job.36* This attribute can be used instead of specifying MediaSize or MediaName.37* <p>38* Class MediaTray declares keywords for standard media kind values.39* Implementation- or site-defined names for a media kind attribute may also40* be created by defining a subclass of class MediaTray.41* <P>42* <B>IPP Compatibility:</B> MediaTray is a representation class for43* values of the IPP "media" attribute which name paper trays.44* <P>45*46*/47public class MediaTray extends Media implements Attribute {4849private static final long serialVersionUID = -982503611095214703L;5051/**52* The top input tray in the printer.53*/54public static final MediaTray TOP = new MediaTray(0);5556/**57* The middle input tray in the printer.58*/59public static final MediaTray MIDDLE = new MediaTray(1);6061/**62* The bottom input tray in the printer.63*/64public static final MediaTray BOTTOM = new MediaTray(2);6566/**67* The envelope input tray in the printer.68*/69public static final MediaTray ENVELOPE = new MediaTray(3);7071/**72* The manual feed input tray in the printer.73*/74public static final MediaTray MANUAL = new MediaTray(4);7576/**77* The large capacity input tray in the printer.78*/79public static final MediaTray LARGE_CAPACITY = new MediaTray(5);8081/**82* The main input tray in the printer.83*/84public static final MediaTray MAIN = new MediaTray(6);8586/**87* The side input tray.88*/89public static final MediaTray SIDE = new MediaTray(7);9091/**92* Construct a new media tray enumeration value with the given integer93* value.94*95* @param value Integer value.96*/97protected MediaTray(int value) {98super (value);99}100101private static final String[] myStringTable ={102"top",103"middle",104"bottom",105"envelope",106"manual",107"large-capacity",108"main",109"side"110};111112private static final MediaTray[] myEnumValueTable = {113TOP,114MIDDLE,115BOTTOM,116ENVELOPE,117MANUAL,118LARGE_CAPACITY,119MAIN,120SIDE121};122123/**124* Returns the string table for class MediaTray.125*/126protected String[] getStringTable()127{128return (String[])myStringTable.clone();129}130131/**132* Returns the enumeration value table for class MediaTray.133*/134protected EnumSyntax[] getEnumValueTable() {135return (EnumSyntax[])myEnumValueTable.clone();136}137138139}140141142