Java 类javax.print.event.PrintServiceAttributeListener 实例源码

项目:cn1    文件:EventNotifier.java   
public void removeListener(PrintService service,
        PrintServiceAttributeListener listener) {
    if (service == null || listener == null) {
        return;
    }

    if (services.contains(service)) {
        ArrayList serviceListeners = (ArrayList)listeners.get(service);
        serviceListeners.remove(listener);
        if (serviceListeners.size() == 0) {
            listeners.remove(service);
            attributes.remove(service);
            services.remove(service);
        }
    }

    if (services.size() == 0) {
        running = false;
    }
}
项目:freeVM    文件:EventNotifier.java   
public void removeListener(PrintService service,
        PrintServiceAttributeListener listener) {
    if (service == null || listener == null) {
        return;
    }

    if (services.contains(service)) {
        ArrayList serviceListeners = (ArrayList)listeners.get(service);
        serviceListeners.remove(listener);
        if (serviceListeners.size() == 0) {
            listeners.remove(service);
            attributes.remove(service);
            services.remove(service);
        }
    }

    if (services.size() == 0) {
        running = false;
    }
}
项目:freeVM    文件:EventNotifier.java   
public void removeListener(PrintService service,
        PrintServiceAttributeListener listener) {
    if (service == null || listener == null) {
        return;
    }

    if (services.contains(service)) {
        ArrayList serviceListeners = (ArrayList)listeners.get(service);
        serviceListeners.remove(listener);
        if (serviceListeners.size() == 0) {
            listeners.remove(service);
            attributes.remove(service);
            services.remove(service);
        }
    }

    if (services.size() == 0) {
        running = false;
    }
}
项目:OpenJSharp    文件:ServiceNotifier.java   
void addListener(PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.add(listener);
    }
}
项目:OpenJSharp    文件:ServiceNotifier.java   
void removeListener(PrintServiceAttributeListener listener) {
     synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.remove(listener);
    }
}
项目:OpenJSharp    文件:Win32PrintService.java   
public void addPrintServiceAttributeListener(PrintServiceAttributeListener
                                             listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:OpenJSharp    文件:Win32PrintService.java   
public void removePrintServiceAttributeListener(
                                  PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:OpenJSharp    文件:UnixPrintService.java   
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:OpenJSharp    文件:UnixPrintService.java   
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:OpenJSharp    文件:IPPPrintService.java   
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:OpenJSharp    文件:IPPPrintService.java   
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:OpenJSharp    文件:Win32PrintService.java   
@Override
public void addPrintServiceAttributeListener(PrintServiceAttributeListener listener){
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:OpenJSharp    文件:Win32PrintService.java   
@Override
public void removePrintServiceAttributeListener(PrintServiceAttributeListener listener){
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:jdk8u-jdk    文件:ServiceNotifier.java   
void addListener(PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.add(listener);
    }
}
项目:jdk8u-jdk    文件:ServiceNotifier.java   
void removeListener(PrintServiceAttributeListener listener) {
     synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.remove(listener);
    }
}
项目:jdk8u-jdk    文件:Win32PrintService.java   
public void addPrintServiceAttributeListener(PrintServiceAttributeListener
                                             listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:jdk8u-jdk    文件:Win32PrintService.java   
public void removePrintServiceAttributeListener(
                                  PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:jdk8u-jdk    文件:UnixPrintService.java   
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:jdk8u-jdk    文件:UnixPrintService.java   
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:jdk8u-jdk    文件:IPPPrintService.java   
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:jdk8u-jdk    文件:IPPPrintService.java   
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:openjdk-jdk10    文件:ServiceNotifier.java   
void addListener(PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.add(listener);
    }
}
项目:openjdk-jdk10    文件:ServiceNotifier.java   
void removeListener(PrintServiceAttributeListener listener) {
     synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.remove(listener);
    }
}
项目:openjdk-jdk10    文件:UnixPrintService.java   
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:openjdk-jdk10    文件:UnixPrintService.java   
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:openjdk-jdk10    文件:IPPPrintService.java   
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:openjdk-jdk10    文件:IPPPrintService.java   
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:openjdk-jdk10    文件:Win32PrintService.java   
public void addPrintServiceAttributeListener(PrintServiceAttributeListener
                                             listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:openjdk-jdk10    文件:Win32PrintService.java   
public void removePrintServiceAttributeListener(
                                  PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:openjdk9    文件:ServiceNotifier.java   
void addListener(PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.add(listener);
    }
}
项目:openjdk9    文件:ServiceNotifier.java   
void removeListener(PrintServiceAttributeListener listener) {
     synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.remove(listener);
    }
}
项目:openjdk9    文件:UnixPrintService.java   
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:openjdk9    文件:UnixPrintService.java   
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:openjdk9    文件:IPPPrintService.java   
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:openjdk9    文件:IPPPrintService.java   
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:openjdk9    文件:Win32PrintService.java   
public void addPrintServiceAttributeListener(PrintServiceAttributeListener
                                             listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
项目:openjdk9    文件:Win32PrintService.java   
public void removePrintServiceAttributeListener(
                                  PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
项目:jdk8u_jdk    文件:ServiceNotifier.java   
void addListener(PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.add(listener);
    }
}
项目:jdk8u_jdk    文件:ServiceNotifier.java   
void removeListener(PrintServiceAttributeListener listener) {
     synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.remove(listener);
    }
}
项目:jdk8u_jdk    文件:Win32PrintService.java   
public void addPrintServiceAttributeListener(PrintServiceAttributeListener
                                             listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}