当前位置: 首页>>代码示例>>Java>>正文


Java PrintJobEvent.DATA_TRANSFER_COMPLETE属性代码示例

本文整理汇总了Java中javax.print.event.PrintJobEvent.DATA_TRANSFER_COMPLETE属性的典型用法代码示例。如果您正苦于以下问题:Java PrintJobEvent.DATA_TRANSFER_COMPLETE属性的具体用法?Java PrintJobEvent.DATA_TRANSFER_COMPLETE怎么用?Java PrintJobEvent.DATA_TRANSFER_COMPLETE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.print.event.PrintJobEvent的用法示例。


在下文中一共展示了PrintJobEvent.DATA_TRANSFER_COMPLETE属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: notifyPrintJobListeners

private void notifyPrintJobListeners(PrintJobEvent e)
{
  Iterator it = printJobListener.iterator();
  while (it.hasNext())
    {
      PrintJobListener l = (PrintJobListener) it.next();
      if (e.getPrintEventType() == PrintJobEvent.DATA_TRANSFER_COMPLETE)
        l.printDataTransferCompleted(e);
      else if (e.getPrintEventType() == PrintJobEvent.JOB_CANCELED)
        l.printJobCanceled(e);
      else if (e.getPrintEventType() == PrintJobEvent.JOB_COMPLETE)
        l.printJobCompleted(e);
      else if (e.getPrintEventType() == PrintJobEvent.JOB_FAILED)
        l.printJobFailed(e);
      else if (e.getPrintEventType() == PrintJobEvent.NO_MORE_EVENTS)
        l.printJobNoMoreEvents(e);
      else
        l.printJobRequiresAttention(e);
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:20,代码来源:DocPrintJobImpl.java

示例2: notifyPrintJobListeners

private void notifyPrintJobListeners(PrintJobEvent e)
{
  Iterator it = printJobListener.iterator();
  while (it.hasNext())
    {
      PrintJobListener l = (PrintJobListener) it.next();
      if (e.getPrintEventType() == PrintJobEvent.DATA_TRANSFER_COMPLETE)
        l.printDataTransferCompleted(e);
      else if (e.getPrintEventType() == PrintJobEvent.JOB_CANCELED)
        l.printJobCanceled(e);
      else if (e.getPrintEventType() == PrintJobEvent.JOB_COMPLETE)
        l.printJobCompleted(e);
      else if (e.getPrintEventType() == PrintJobEvent.JOB_FAILED)
        l.printJobFailed(e);
      else if (e.getPrintEventType() == PrintJobEvent.NO_MORE_EVENTS)
        l.printJobNoMoreEvents(e);
      else 
        l.printJobRequiresAttention(e);
    }    
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:20,代码来源:DocPrintJobImpl.java

示例3: notifyJobListeners

void notifyJobListeners(final int reason) {
    final PrintJobEvent event = new PrintJobEvent(this, reason);

    for (PrintJobListener listener : jobListeners.keySet()) {
        switch (reason) {
        case PrintJobEvent.DATA_TRANSFER_COMPLETE:
            listener.printDataTransferCompleted(event);
            break;
        case PrintJobEvent.JOB_CANCELED:
            listener.printJobCanceled(event);
            break;
        case PrintJobEvent.JOB_COMPLETE:
            listener.printJobCompleted(event);
            break;
        case PrintJobEvent.JOB_FAILED:
            listener.printJobFailed(event);
            break;
        case PrintJobEvent.NO_MORE_EVENTS:
            listener.printJobNoMoreEvents(event);
            break;
        case PrintJobEvent.REQUIRES_ATTENTION:
            listener.printJobRequiresAttention(event);
            break;
        }
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:26,代码来源:WinPrintJob.java

示例4: notifyEvent

private void notifyEvent(int reason) {
    synchronized (this) {
        if (jobListeners != null) {
            PrintJobListener listener;
            PrintJobEvent event = new PrintJobEvent(this, reason);
            for (int i = 0; i < jobListeners.size(); i++) {
                listener = jobListeners.elementAt(i);
                switch (reason) {

                    case PrintJobEvent.JOB_CANCELED :
                        listener.printJobCanceled(event);
                        break;

                    case PrintJobEvent.JOB_FAILED :
                        listener.printJobFailed(event);
                        break;

                    case PrintJobEvent.DATA_TRANSFER_COMPLETE :
                        listener.printDataTransferCompleted(event);
                        break;

                    case PrintJobEvent.NO_MORE_EVENTS :
                        listener.printJobNoMoreEvents(event);
                        break;

                    case PrintJobEvent.JOB_COMPLETE :
                        listener.printJobCompleted(event);
                        break;

                    default:
                        break;
                }
            }
        }
   }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:36,代码来源:PSStreamPrintJob.java

示例5: notifyEvent

private void notifyEvent(int reason) {

        /* since this method should always get called, here's where
         * we will perform the clean up of any data stream supplied.
         */
        switch (reason) {
            case PrintJobEvent.DATA_TRANSFER_COMPLETE:
            case PrintJobEvent.JOB_CANCELED :
            case PrintJobEvent.JOB_FAILED :
            case PrintJobEvent.NO_MORE_EVENTS :
            case PrintJobEvent.JOB_COMPLETE :
                closeDataStreams();
        }

        synchronized (this) {
            if (jobListeners != null) {
                PrintJobListener listener;
                PrintJobEvent event = new PrintJobEvent(this, reason);
                for (int i = 0; i < jobListeners.size(); i++) {
                    listener = jobListeners.get(i);
                    switch (reason) {

                        case PrintJobEvent.JOB_COMPLETE :
                            listener.printJobCompleted(event);
                            break;

                        case PrintJobEvent.JOB_CANCELED :
                            listener.printJobCanceled(event);
                            break;

                        case PrintJobEvent.JOB_FAILED :
                            listener.printJobFailed(event);
                            break;

                        case PrintJobEvent.DATA_TRANSFER_COMPLETE :
                            listener.printDataTransferCompleted(event);
                            break;

                        case PrintJobEvent.NO_MORE_EVENTS :
                            listener.printJobNoMoreEvents(event);
                            break;

                        default:
                            break;
                    }
                }
            }
       }
    }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:49,代码来源:Win32PrintJob.java

示例6: notifyEvent

private void notifyEvent(int reason) {

        /* since this method should always get called, here's where
         * we will perform the clean up of any data stream supplied.
         */
        switch (reason) {
            case PrintJobEvent.DATA_TRANSFER_COMPLETE:
            case PrintJobEvent.JOB_CANCELED :
            case PrintJobEvent.JOB_FAILED :
            case PrintJobEvent.NO_MORE_EVENTS :
            case PrintJobEvent.JOB_COMPLETE :
                closeDataStreams();
        }

        synchronized (this) {
            if (jobListeners != null) {
                PrintJobListener listener;
                PrintJobEvent event = new PrintJobEvent(this, reason);
                for (int i = 0; i < jobListeners.size(); i++) {
                    listener = jobListeners.elementAt(i);
                    switch (reason) {

                        case PrintJobEvent.JOB_CANCELED :
                            listener.printJobCanceled(event);
                            break;

                        case PrintJobEvent.JOB_FAILED :
                            listener.printJobFailed(event);
                            break;

                        case PrintJobEvent.DATA_TRANSFER_COMPLETE :
                            listener.printDataTransferCompleted(event);
                            break;

                        case PrintJobEvent.NO_MORE_EVENTS :
                            listener.printJobNoMoreEvents(event);
                            break;

                        default:
                            break;
                    }
                }
            }
       }
    }
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:45,代码来源:UnixPrintJob.java

示例7: notifyEvent

private void notifyEvent(int reason) {

        /* since this method should always get called, here's where
         * we will perform the clean up of any data stream supplied.
         */
        switch (reason) {
            case PrintJobEvent.DATA_TRANSFER_COMPLETE:
            case PrintJobEvent.JOB_CANCELED :
            case PrintJobEvent.JOB_FAILED :
            case PrintJobEvent.NO_MORE_EVENTS :
            case PrintJobEvent.JOB_COMPLETE :
                closeDataStreams();
        }

        synchronized (this) {
            if (jobListeners != null) {
                PrintJobListener listener;
                PrintJobEvent event = new PrintJobEvent(this, reason);
                for (int i = 0; i < jobListeners.size(); i++) {
                    listener = jobListeners.elementAt(i);
                    switch (reason) {

                        case PrintJobEvent.JOB_COMPLETE :
                            listener.printJobCompleted(event);
                            break;

                        case PrintJobEvent.JOB_CANCELED :
                            listener.printJobCanceled(event);
                            break;

                        case PrintJobEvent.JOB_FAILED :
                            listener.printJobFailed(event);
                            break;

                        case PrintJobEvent.DATA_TRANSFER_COMPLETE :
                            listener.printDataTransferCompleted(event);
                            break;

                        case PrintJobEvent.NO_MORE_EVENTS :
                            listener.printJobNoMoreEvents(event);
                            break;

                        default:
                            break;
                    }
                }
            }
       }
    }
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:49,代码来源:Win32PrintJob.java


注:本文中的javax.print.event.PrintJobEvent.DATA_TRANSFER_COMPLETE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。