Package javax.print.attribute.standard

Examples of javax.print.attribute.standard.JobName


    {
      final String jobName = report.getReportConfiguration().getConfigProperty
          (PrintUtil.PRINTER_JOB_NAME_KEY, report.getTitle());
      if (jobName != null)
      {
        attributes.add(new JobName(jobName, null));
      }
    }
    if (attributes.containsKey(Copies.class) == false)
    {
      final int numberOfCopies =
View Full Code Here


      // Background this, as it takes a while.
      new Thread() {
        public void run() {
          try {
            PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
            pras.add(new JobName(entry.getCiteKey(), null));
            previewPane.print(null, null, true, null, pras, false);

          } catch (PrinterException e) {

            // Inform the user... we don't know what to do.
View Full Code Here

        attr.add(myOrientation == PageFormat.LANDSCAPE ?
               OrientationRequested.LANDSCAPE :
                   OrientationRequested.PORTRAIT);
        Document doc = myProject.getDocument();
        if (doc != null)
            attr.add(new JobName(doc.getDescription(), language.getLocale()));

        if (prnJob.printDialog(attr)) {
            try {
                prnJob.print(attr);
                setVisible(false);
View Full Code Here

                        MediaSizeName.ISO_A3,
                        new Destination(uri1),
                        new Destination(uri2),
                        new Destination(uri3),
                        new DocumentName("xyz", Locale.US),
                        new JobName("xyz", Locale.US),
                        new RequestingUserName("xyz", Locale.US),
                        Sides.DUPLEX,
                        Sides.ONE_SIDED,
                        Sides.TUMBLE,
                        Sides.TWO_SIDED_LONG_EDGE,
View Full Code Here

    {
      final String jobName = report.getReportConfiguration().getConfigProperty
          (PrintUtil.PRINTER_JOB_NAME_KEY, report.getTitle());
      if (jobName != null)
      {
        attributes.add(new JobName(jobName, null));
      }
    }
    if (attributes.containsKey(Copies.class) == false)
    {
      final int numberOfCopies =
View Full Code Here

     * @see org.apache.harmony.x.print.PrintClient#getDefaultAttributeValue(
     * java.lang.Class)
     */
    public Object getDefaultAttributeValue(Class category) {
        if (category.equals(JobName.class)) {
            return new JobName("Java GDI client print job", Locale.US);
        } else if (category.equals(RequestingUserName.class)) {
            return new RequestingUserName(System.getProperty("user.name"),
                    Locale.US);
        } else if (category.equals(Destination.class)) {
            File file = new File(System.getProperty("user.dir") +
View Full Code Here

    }

    String getJobName(PrintRequestAttributeSet attrs) {
        if (attrs != null) {
            if (attrs.containsKey(JobName.class)) {
                JobName name = (JobName)attrs.get(JobName.class);
                return name.getValue();
            }
        }
        return "Java GDI client print job";
    }
View Full Code Here

    if (jobNameTxt.isEnabled()) {
        String name = jobNameTxt.getText();
        if (name.length() == 0) {
            removeAttribute(JobName.class);
        } else {
            newAttrs.add(new JobName(name, Locale.getDefault()));
        }
    } else {
        removeAttribute(JobName.class);
    }
}
View Full Code Here

            if (ps != null)  {

                PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
                aset.add(OrientationRequested.PORTRAIT);
                aset.add(new JobName(AppLocal.APP_NAME + " - Document", null));
                aset.add(media);

                DocPrintJob printjob = ps.createPrintJob();
                Doc doc = new SimpleDoc(new PrintableBasicTicket(m_ticketcurrent, imageable_x, imageable_y, imageable_width, imageable_height), DocFlavor.SERVICE_FORMATTED.PRINTABLE, null);
View Full Code Here

    try
    {
      PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
      pras.add(new Copies(1));
      pras.add(new JobName(main.getOwlFileName(), Locale.getDefault()));

      PrintService ps = ServiceUI.printDialog(null, 100, 100,
        PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.JPEG, pras),
        PrintServiceLookup.lookupDefaultPrintService(),
        DocFlavor.INPUT_STREAM.JPEG,
View Full Code Here

TOP

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

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.