javax.print.event.PrintServiceAttributeListener Java Examples

The following examples show how to use javax.print.event.PrintServiceAttributeListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IPPPrintService.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
 
Example #2
Source File: ServiceNotifier.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
void addListener(PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.add(listener);
    }
}
 
Example #3
Source File: Win32PrintService.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void addPrintServiceAttributeListener(PrintServiceAttributeListener
                                             listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
 
Example #4
Source File: Win32PrintService.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                                  PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #5
Source File: ServiceNotifier.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
void addListener(PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.add(listener);
    }
}
 
Example #6
Source File: IPPPrintService.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
 
Example #7
Source File: IPPPrintService.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #8
Source File: Win32PrintService.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void addPrintServiceAttributeListener(PrintServiceAttributeListener
                                             listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
 
Example #9
Source File: UnixPrintService.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #10
Source File: ServiceNotifier.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
void removeListener(PrintServiceAttributeListener listener) {
     synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.remove(listener);
    }
}
 
Example #11
Source File: ServiceNotifier.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
void removeListener(PrintServiceAttributeListener listener) {
     synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.remove(listener);
    }
}
 
Example #12
Source File: ServiceNotifier.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
void addListener(PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.add(listener);
    }
}
 
Example #13
Source File: Win32PrintService.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void addPrintServiceAttributeListener(PrintServiceAttributeListener
                                             listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
 
Example #14
Source File: Win32PrintService.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                                  PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #15
Source File: UnixPrintService.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #16
Source File: ServiceNotifier.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
void removeListener(PrintServiceAttributeListener listener) {
     synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.remove(listener);
    }
}
 
Example #17
Source File: IPPPrintService.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #18
Source File: ServiceNotifier.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
void addListener(PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.add(listener);
    }
}
 
Example #19
Source File: IPPPrintService.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #20
Source File: ServiceNotifier.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void removeListener(PrintServiceAttributeListener listener) {
     synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.remove(listener);
    }
}
 
Example #21
Source File: Win32PrintService.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void addPrintServiceAttributeListener(PrintServiceAttributeListener
                                             listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
 
Example #22
Source File: Win32PrintService.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                                  PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #23
Source File: UnixPrintService.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #24
Source File: IPPPrintService.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #25
Source File: ServiceNotifier.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void addListener(PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.add(listener);
    }
}
 
Example #26
Source File: ServiceNotifier.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void removeListener(PrintServiceAttributeListener listener) {
     synchronized (this) {
        if (listener == null || listeners == null) {
            return;
        }
        listeners.remove(listener);
    }
}
 
Example #27
Source File: UnixPrintService.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                              PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}
 
Example #28
Source File: UnixPrintService.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void addPrintServiceAttributeListener(
                             PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
 
Example #29
Source File: Win32PrintService.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void addPrintServiceAttributeListener(PrintServiceAttributeListener
                                             listener) {
    synchronized (this) {
        if (listener == null) {
            return;
        }
        if (notifier == null) {
            notifier = new ServiceNotifier(this);
        }
        notifier.addListener(listener);
    }
}
 
Example #30
Source File: Win32PrintService.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void removePrintServiceAttributeListener(
                                  PrintServiceAttributeListener listener) {
    synchronized (this) {
        if (listener == null || notifier == null ) {
            return;
        }
        notifier.removeListener(listener);
        if (notifier.isEmpty()) {
            notifier.stopNotifier();
            notifier = null;
        }
    }
}