Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/javax/print/applet/applet3/Applet3PrintService.java
38853 views
/*1* Copyright (c) 2001, 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.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223import javax.print.*;24import javax.print.attribute.*;25import javax.print.event.*;2627public class Applet3PrintService implements PrintService {282930public Applet3PrintService() {31}3233public String getName() {34return "Applet 3 Printer";35}3637public DocPrintJob createPrintJob() {38return null;39}4041public PrintServiceAttributeSet getUpdatedAttributes() {42return null;43}4445public void addPrintServiceAttributeListener(46PrintServiceAttributeListener listener) {47return;48}4950public void removePrintServiceAttributeListener(51PrintServiceAttributeListener listener) {52return;53}5455public PrintServiceAttribute getAttribute(Class category) {56return null;57}5859public PrintServiceAttributeSet getAttributes() {60return null;61}6263public DocFlavor[] getSupportedDocFlavors() {64return null;65}6667public boolean isDocFlavorSupported(DocFlavor flavor) {68return false;69}7071public Class[] getSupportedAttributeCategories() {72return null;73}7475public boolean isAttributeCategorySupported(Class category) {76return false;77}7879public Object getDefaultAttributeValue(Class category) {80return null;81}8283public Object getSupportedAttributeValues(Class category,84DocFlavor flavor,85AttributeSet attributes) {86return null;87}8889public boolean isAttributeValueSupported(Attribute attr,90DocFlavor flavor,91AttributeSet attributes) {92return false;93}9495public AttributeSet getUnsupportedAttributes(DocFlavor flavor,96AttributeSet attributes) {9798return null;99}100public ServiceUIFactory getServiceUIFactory() {101return null;102}103104public String toString() {105return "Printer : " + getName();106}107108public boolean equals(Object obj) {109return (obj == this ||110(obj instanceof Applet3PrintService &&111((Applet3PrintService)obj).getName().equals(getName())));112}113114public int hashCode() {115return this.getClass().hashCode()+getName().hashCode();116}117118}119120121