📄 imagereader.java
字号:
{ Iterator it = progressListeners.iterator(); while (it.hasNext()) { IIOReadProgressListener listener = (IIOReadProgressListener) it.next(); listener.imageStarted(this, imageIndex); } } } /** * Notifies all installed read update listeners, by calling their * imageUpdate methods, that the set of samples has changed. * * @param image the buffered image that is being updated * @param minX the X coordinate of the top-left pixel in this pass * @param minY the Y coordinate of the top-left pixel in this pass * @param width the total width of the rectangle covered by this * pass, including skipped pixels * @param height the total height of the rectangle covered by this * pass, including skipped pixels * @param periodX the horizontal sample interval * @param periodY the vertical sample interval * @param bands the affected bands in the destination */ protected void processImageUpdate(BufferedImage image, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands) { if (updateListeners != null) { Iterator it = updateListeners.iterator(); while (it.hasNext()) { IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next(); listener.imageUpdate(this, image, minX, minY, width, height, periodX, periodY, bands); } } } /** * Notifies all installed update progress listeners, by calling * their passComplete methods, that a progressive pass has * completed. * * @param image the image that has being updated */ protected void processPassComplete(BufferedImage image) { if (updateListeners != null) { Iterator it = updateListeners.iterator(); while (it.hasNext()) { IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next(); listener.passComplete(this, image); } } } /** * Notifies all installed read update listeners, by calling their * passStarted methods, that a new pass has begun. * * @param image the buffered image that is being updated * @param pass the current pass number * @param minPass the pass at which decoding will begin * @param maxPass the pass at which decoding will end * @param minX the X coordinate of the top-left pixel in this pass * @param minY the Y coordinate of the top-left pixel in this pass * @param width the total width of the rectangle covered by this * pass, including skipped pixels * @param height the total height of the rectangle covered by this * pass, including skipped pixels * @param periodX the horizontal sample interval * @param periodY the vertical sample interval * @param bands the affected bands in the destination */ protected void processPassStarted(BufferedImage image, int pass, int minPass, int maxPass, int minX, int minY, int periodX, int periodY, int[] bands) { if (updateListeners != null) { Iterator it = updateListeners.iterator(); while (it.hasNext()) { IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next(); listener.passStarted(this, image, pass, minPass, maxPass, minX, minY, periodX, periodY, bands); } } } /** * Notifies all installed read progress listeners that image loading * has been aborted by calling their readAborted methods. */ protected void processReadAborted() { if (progressListeners != null) { Iterator it = progressListeners.iterator(); while (it.hasNext()) { IIOReadProgressListener listener = (IIOReadProgressListener) it.next(); listener.readAborted(this); } } } /** * Notifies all installed read progress listeners, by calling their * sequenceComplete methods, that a sequence of images has completed * loading. */ protected void processSequenceComplete() { if (progressListeners != null) { Iterator it = progressListeners.iterator(); while (it.hasNext()) { IIOReadProgressListener listener = (IIOReadProgressListener) it.next(); listener.sequenceComplete(this); } } } /** * Notifies all installed read progress listeners, by calling their * sequenceStarted methods, a sequence of images has started * loading. * * @param minIndex the index of the first image in the sequence */ protected void processSequenceStarted(int minIndex) { if (progressListeners != null) { Iterator it = progressListeners.iterator(); while (it.hasNext()) { IIOReadProgressListener listener = (IIOReadProgressListener) it.next(); listener.sequenceStarted(this, minIndex); } } } /** * Notifies all installed read progress listeners, by calling their * thumbnailComplete methods, that a thumbnail has completed * loading. */ protected void processThumbnailComplete() { if (progressListeners != null) { Iterator it = progressListeners.iterator(); while (it.hasNext()) { IIOReadProgressListener listener = (IIOReadProgressListener) it.next(); listener.thumbnailComplete(this); } } } /** * Notifies all installed update progress listeners, by calling * their thumbnailPassComplete methods, that a progressive pass has * completed on a thumbnail. * * @param thumbnail the thumbnail that has being updated */ protected void processThumbnailPassComplete(BufferedImage thumbnail) { if (updateListeners != null) { Iterator it = updateListeners.iterator(); while (it.hasNext()) { IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next(); listener.thumbnailPassComplete(this, thumbnail); } } } /** * Notifies all installed read update listeners, by calling their * thumbnailPassStarted methods, that a new pass has begun. * * @param thumbnail the thumbnail that is being updated * @param pass the current pass number * @param minPass the pass at which decoding will begin * @param maxPass the pass at which decoding will end * @param minX the X coordinate of the top-left pixel in this pass * @param minY the Y coordinate of the top-left pixel in this pass * @param width the total width of the rectangle covered by this * pass, including skipped pixels * @param height the total height of the rectangle covered by this * pass, including skipped pixels * @param periodX the horizontal sample interval * @param periodY the vertical sample interval * @param bands the affected bands in the destination */ protected void processThumbnailPassStarted(BufferedImage thumbnail, int pass, int minPass, int maxPass, int minX, int minY, int periodX, int periodY, int[] bands) { if (updateListeners != null) { Iterator it = updateListeners.iterator(); while (it.hasNext()) { IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next(); listener.thumbnailPassStarted(this, thumbnail, pass, minPass, maxPass, minX, minY, periodX, periodY, bands); } } } /** * Notifies all installed read progress listeners that a certain * percentage of a thumbnail has been loaded, by calling their * thumbnailProgress methods. * * @param percentageDone the percentage of thumbnail data that has * been loaded */ protected void processThumbnailProgress(float percentageDone) { if (progressListeners != null) { Iterator it = progressListeners.iterator(); while (it.hasNext()) { IIOReadProgressListener listener = (IIOReadProgressListener) it.next(); listener.thumbnailProgress(this, percentageDone); } } } /** * Notifies all installed read progress listeners, by calling their * imageStarted methods, that thumbnail loading has started on the * given thumbnail of the given image. * * @param imageIndex the frame index of the image one of who's * thumbnails has started loading * @param thumbnailIndex the index of the thumbnail that has started * loading */ protected void processThumbnailStarted(int imageIndex, int thumbnailIndex) { if (progressListeners != null) { Iterator it = progressListeners.iterator(); while (it.hasNext()) { IIOReadProgressListener listener = (IIOReadProgressListener) it.next(); listener.thumbnailStarted(this, imageIndex, thumbnailIndex); } } } /** * Notifies all installed read update listeners, by calling their * thumbnailUpdate methods, that the set of samples has changed. * * @param image the buffered image that is being updated * @param minX the X coordinate of the top-left pixel in this pass * @param minY the Y coordinate of the top-left pixel in this pass * @param width the total width of the rectangle covered by this * pass, including skipped pixels * @param height the total height of the rectangle covered by this * pass, including skipped pixels * @param periodX the horizontal sample interval * @param periodY the vertical sample interval * @param bands the affected bands in the destination */ protected void processThumbnailUpdate(BufferedImage image, int minX, int minY, int width, int height, int periodX, int periodY, int[] bands) { if (updateListeners != null) { Iterator it = updateListeners.iterator(); while (it.hasNext()) { IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next(); listener.thumbnailUpdate(this, image, minX, minY, width, height, periodX, periodY, bands); } } } /** * Notifies all installed warning listeners, by calling their * warningOccurred methods, that a warning message has been raised. * * @param warning the warning message * * @exception IllegalArgumentException if warning is null */ protected void processWarningOccurred(String warning) { if (warning == null) throw new IllegalArgumentException ("null argument"); if (warningListeners != null) { Iterator it = warningListeners.iterator(); while (it.hasNext()) { IIOReadWarningListener listener = (IIOReadWarningListener) it.next(); listener.warningOccurred(this, warning); } } } /** * Notify all installed warning listeners, by calling their * warningOccurred methods, that a warning message has been raised. * The warning message is retrieved from a resource bundle, using * the given basename and keyword. * * @param baseName the basename of the resource from which to * retrieve the warning message * @param keyword the keyword used to retrieve the warning from the * resource bundle * * @exception IllegalArgumentException if either baseName or keyword * is null * @exception IllegalArgumentException if no resource bundle is * found using baseName * @exception IllegalArgumentException if the given keyword produces * no results from the resource bundle * @exception IllegalArgumentException if the retrieved object is * not a String */ protected void processWarningOccurred(String baseName, String keyword) { if (baseName == null || keyword == null) throw new IllegalArgumentException ("null argument"); ResourceBundle b = null; try { b = ResourceBundle.getBundle(baseName, getLocale()); } catch (MissingResourceException e) { throw new IllegalArgumentException ("no resource bundle found"); } Object str = null; try { str = b.getObject(keyword); } catch (MissingResourceException e) { throw new IllegalArgumentException ("no results found for keyword"); } if (! (str instanceof String)) throw new IllegalArgumentException ("retrieved object not a String"); String warning = (String) str; if (warningListeners != null) { Iterator it = warningListeners.iterator(); while (it.hasNext()) { IIOReadWarningListener listener = (IIOReadWarningListener) it.next(); listener.warningOccurred(this, warning); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -