src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m
changeset 52246 f49c340e3f39
parent 47216 71c04702a3d5
child 52255 c7afaa79cbb3
equal deleted inserted replaced
52245:651c3558ae2b 52246:f49c340e3f39
   313 {
   313 {
   314     static JNF_MEMBER_CACHE(jm_setService, sjc_CPrinterJob, "setPrinterServiceFromNative", "(Ljava/lang/String;)V");
   314     static JNF_MEMBER_CACHE(jm_setService, sjc_CPrinterJob, "setPrinterServiceFromNative", "(Ljava/lang/String;)V");
   315     static JNF_MEMBER_CACHE(jm_setCopiesAttribute, sjc_CPrinterJob, "setCopiesAttribute", "(I)V");
   315     static JNF_MEMBER_CACHE(jm_setCopiesAttribute, sjc_CPrinterJob, "setCopiesAttribute", "(I)V");
   316     static JNF_MEMBER_CACHE(jm_setCollated, sjc_CPrinterJob, "setCollated", "(Z)V");
   316     static JNF_MEMBER_CACHE(jm_setCollated, sjc_CPrinterJob, "setCollated", "(Z)V");
   317     static JNF_MEMBER_CACHE(jm_setPageRangeAttribute, sjc_CPrinterJob, "setPageRangeAttribute", "(IIZ)V");
   317     static JNF_MEMBER_CACHE(jm_setPageRangeAttribute, sjc_CPrinterJob, "setPageRangeAttribute", "(IIZ)V");
       
   318     static JNF_MEMBER_CACHE(jm_setPrintToFile, sjc_CPrinterJob, "setPrintToFile", "(Z)V");
       
   319 
       
   320     NSPrintJobDispositionValue jobDisposition = [src jobDisposition];
       
   321     if (jobDisposition == NSPrintSaveJob) {
       
   322         JNFCallVoidMethod(env, dstPrinterJob, jm_setPrintToFile, true);
       
   323     } else {
       
   324         JNFCallVoidMethod(env, dstPrinterJob, jm_setPrintToFile, false);
       
   325     }
   318 
   326 
   319     // get the selected printer's name, and set the appropriate PrintService on the Java side
   327     // get the selected printer's name, and set the appropriate PrintService on the Java side
   320     NSString *name = [[src printer] name];
   328     NSString *name = [[src printer] name];
   321     jstring printerName = JNFNSToJavaString(env, name);
   329     jstring printerName = JNFNSToJavaString(env, name);
   322     JNFCallVoidMethod(env, dstPrinterJob, jm_setService, printerName);
   330     JNFCallVoidMethod(env, dstPrinterJob, jm_setService, printerName);