< prev index next >
src/java.desktop/windows/classes/sun/print/PrintServiceLookupProvider.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 354,367 ****
defaultPrintService = new Win32PrintService(defaultPrinter);
}
return defaultPrintService;
}
! class PrinterChangeListener implements Runnable {
! long chgObj;
! PrinterChangeListener() {
! chgObj = notifyFirstPrinterChange(null);
}
@Override
public void run() {
if (chgObj != -1) {
--- 354,367 ----
defaultPrintService = new Win32PrintService(defaultPrinter);
}
return defaultPrintService;
}
! private final class PrinterChangeListener implements Runnable {
! private final long chgObj;
! private PrinterChangeListener() {
! chgObj = notifyFirstPrinterChange();
}
@Override
public void run() {
if (chgObj != -1) {
*** 444,453 ****
}
}
private native String getDefaultPrinterName();
private native String[] getAllPrinterNames();
! private native long notifyFirstPrinterChange(String printer);
private native void notifyClosePrinterChange(long chgObj);
private native int notifyPrinterChange(long chgObj);
private native String[] getRemotePrintersNames();
}
--- 444,453 ----
}
}
private native String getDefaultPrinterName();
private native String[] getAllPrinterNames();
! private native long notifyFirstPrinterChange();
private native void notifyClosePrinterChange(long chgObj);
private native int notifyPrinterChange(long chgObj);
private native String[] getRemotePrintersNames();
}
< prev index next >