javax.imageio.event.IIOReadWarningListener Java Examples

The following examples show how to use javax.imageio.event.IIOReadWarningListener. 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: ImageReader.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #2
Source File: ImageReader.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * {@code IIOReadWarningListener}s by calling their
 * {@code warningOccurred} method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if {@code warning}
 * is {@code null}.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #3
Source File: ImageReader.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * {@code IIOReadWarningListener}s by calling their
 * {@code warningOccurred} method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if {@code warning}
 * is {@code null}.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #4
Source File: ImageReader.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #5
Source File: ImageReader.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #6
Source File: ImageReader.java    From Java8CN with Apache License 2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #7
Source File: ImageReader.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #8
Source File: ImageReader.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #9
Source File: ImageReader.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #10
Source File: ImageReader.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #11
Source File: ImageReader.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #12
Source File: ImageReader.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #13
Source File: ImageReader.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #14
Source File: ImageReader.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #15
Source File: ImageReader.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #16
Source File: ImageReader.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #17
Source File: ImageReader.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Broadcasts a warning message to all registered
 * <code>IIOReadWarningListener</code>s by calling their
 * <code>warningOccurred</code> method.  Subclasses may use this
 * method as a convenience.
 *
 * @param warning the warning message to send.
 *
 * @exception IllegalArgumentException if <code>warning</code>
 * is <code>null</code>.
 */
protected void processWarningOccurred(String warning) {
    if (warningListeners == null) {
        return;
    }
    if (warning == null) {
        throw new IllegalArgumentException("warning == null!");
    }
    int numListeners = warningListeners.size();
    for (int i = 0; i < numListeners; i++) {
        IIOReadWarningListener listener =
            (IIOReadWarningListener)warningListeners.get(i);

        listener.warningOccurred(this, warning);
    }
}
 
Example #18
Source File: ImageReader.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #19
Source File: ImageReader.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #20
Source File: ImageReader.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes an {@code IIOReadWarningListener} from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if {@code listener} is {@code null},
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #21
Source File: ImageReader.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #22
Source File: ImageReader.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #23
Source File: ImageReader.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #24
Source File: ImageReader.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #25
Source File: ImageReader.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #26
Source File: ImageReader.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #27
Source File: ImageReader.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #28
Source File: ImageReader.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #29
Source File: ImageReader.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}
 
Example #30
Source File: ImageReader.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes an <code>IIOReadWarningListener</code> from the list of
 * registered error listeners.  If the listener was not previously
 * registered, or if <code>listener</code> is <code>null</code>,
 * no exception will be thrown and no action will be taken.
 *
 * @param listener an IIOReadWarningListener to be unregistered.
 *
 * @see #addIIOReadWarningListener
 */
public void removeIIOReadWarningListener(IIOReadWarningListener listener) {
    if (listener == null || warningListeners == null) {
        return;
    }
    int index = warningListeners.indexOf(listener);
    if (index != -1) {
        warningListeners.remove(index);
        warningLocales.remove(index);
        if (warningListeners.size() == 0) {
            warningListeners = null;
            warningLocales = null;
        }
    }
}