Package javax.print.attribute.standard

Examples of javax.print.attribute.standard.Destination


            }
            return printableArea;
        } else if (category == SunAlternateMedia.class) {
            return null;
        } else if (category == Destination.class) {
            return new Destination((new File("out.prn")).toURI());
        } else if (category == Sides.class) {
            switch(defSides) {
            case DMDUP_VERTICAL :
                return Sides.TWO_SIDED_LONG_EDGE;
            case DMDUP_HORIZONTAL :
View Full Code Here


                }
            } else {
                return null;
            }
        } else if (category == Destination.class) {
            return new Destination((new File("out.prn")).toURI());
        } else if (category == OrientationRequested.class) {
            if (flavor == null ||
                flavor.equals(DocFlavor.SERVICE_FORMATTED.PAGEABLE) ||
                flavor.equals(DocFlavor.SERVICE_FORMATTED.PRINTABLE) ||
                flavor.equals(DocFlavor.INPUT_STREAM.GIF) ||
View Full Code Here

            return new Copies(1);
        } else if (category == Chromaticity.class) {
            return Chromaticity.COLOR;
        } else if (category == Destination.class) {
            try {
                return new Destination((new File("out.ps")).toURI());
            } catch (SecurityException se) {
                try {
                    return new Destination(new URI("file:out.ps"));
                } catch (URISyntaxException e) {
                    return null;
                }
            }
        } else if (category == Fidelity.class) {
View Full Code Here

            } else {
                return null;
            }
        } else if (category == Destination.class) {
            try {
                return new Destination((new File("out.ps")).toURI());
            } catch (SecurityException se) {
                try {
                    return new Destination(new URI("file:out.ps"));
                } catch (URISyntaxException e) {
                    return null;
                }
            }
        } else if (category == JobName.class) {
View Full Code Here

        return new MediaPrintableArea(area.get_X()/100, area.get_Y()/100, area.get_Width()/100, area.get_Height()/100, MediaPrintableArea.INCH);
      }
      if (category == Destination.class) {
        String path = "out.prn";
        try {
          return new Destination( ( new File( path ) ).toURI() );
        } catch (SecurityException se) {
          try {
            return new Destination( new URI( "file:" + path) );
          } catch (URISyntaxException e) {
            return null;
          }
        }
      }
View Full Code Here

TOP

Related Classes of javax.print.attribute.standard.Destination

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.