1 /* 2 * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package sun.print; 27 28 import javax.print.attribute.standard.MediaTray; 29 import javax.print.attribute.EnumSyntax; 30 import java.util.ArrayList; 31 32 /** 33 * Class Win32MediaTray is a subclass of MediaTray which declares 34 * Windows media trays or bins not covered by MediaTray's standard values. 35 * It also implements driver-defined trays. 36 **/ 37 38 public class Win32MediaTray extends MediaTray { 39 40 static final Win32MediaTray ENVELOPE_MANUAL = new Win32MediaTray(0, 41 6); //DMBIN_ENVMANUAL 42 static final Win32MediaTray AUTO = new Win32MediaTray(1, 43 7); //DMBIN_AUTO 44 static final Win32MediaTray TRACTOR = new Win32MediaTray(2, 45 8); //DMBIN_TRACTOR 46 static final Win32MediaTray SMALL_FORMAT = new Win32MediaTray(3, 47 9); //DMBIN_SMALLFMT 48 static final Win32MediaTray LARGE_FORMAT = new Win32MediaTray(4, 49 10); //DMBIN_LARGEFMT 50 static final Win32MediaTray FORMSOURCE = new Win32MediaTray(5, 51 15); //DMBIN_FORMSOURCE 52 53 private static ArrayList winStringTable = new ArrayList(); 54 private static ArrayList winEnumTable = new ArrayList(); 55 public int winID; 56 57 private Win32MediaTray(int value, int id) { | 1 /* 2 * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package sun.print; 27 28 import javax.print.attribute.standard.MediaTray; 29 import javax.print.attribute.EnumSyntax; 30 import java.util.ArrayList; 31 32 /** 33 * Class Win32MediaTray is a subclass of MediaTray which declares 34 * Windows media trays or bins not covered by MediaTray's standard values. 35 * It also implements driver-defined trays. 36 **/ 37 @SuppressWarnings("serial") // JDK implementation class 38 public class Win32MediaTray extends MediaTray { 39 40 static final Win32MediaTray ENVELOPE_MANUAL = new Win32MediaTray(0, 41 6); //DMBIN_ENVMANUAL 42 static final Win32MediaTray AUTO = new Win32MediaTray(1, 43 7); //DMBIN_AUTO 44 static final Win32MediaTray TRACTOR = new Win32MediaTray(2, 45 8); //DMBIN_TRACTOR 46 static final Win32MediaTray SMALL_FORMAT = new Win32MediaTray(3, 47 9); //DMBIN_SMALLFMT 48 static final Win32MediaTray LARGE_FORMAT = new Win32MediaTray(4, 49 10); //DMBIN_LARGEFMT 50 static final Win32MediaTray FORMSOURCE = new Win32MediaTray(5, 51 15); //DMBIN_FORMSOURCE 52 53 private static ArrayList winStringTable = new ArrayList(); 54 private static ArrayList winEnumTable = new ArrayList(); 55 public int winID; 56 57 private Win32MediaTray(int value, int id) { |