Package javax.media.jai.util

Examples of javax.media.jai.util.ImagingListener.errorOccurred()


            return image == null ? null : new StreamImage(image, src);
        } catch (IOException e) {
            ImagingListener listener =
                ImageUtil.getImagingListener(renderHints);
            String message = JaiI18N.getString("URLRIF0");
            listener.errorOccurred(message, e, this, false);
//            e.printStackTrace();
            return null;
        }
    }
}
View Full Code Here


            long streamPosition = Long.MIN_VALUE;
            if(canAttemptRecovery) {
                try {
                    streamPosition = source.getFilePointer();
                } catch(IOException ioe) {
                    listener.errorOccurred(JaiI18N.getString("StreamRIF1"),
                                           ioe, CodecRIFUtil.class, false);
                    // Unset the recovery attempt flag but otherwise
                    // ignore the exception.
                    canAttemptRecovery = false;
                }
View Full Code Here

                                                      renderHints,
                                                      bound);
                } else {
                    // Re-throw the error.
                    String message = JaiI18N.getString("CodecRIFUtil0");
                    listener.errorOccurred(message,
                                           new ImagingException(message,
                                                                memoryError),
                                           CodecRIFUtil.class, false);
//                    throw memoryError;
                }
View Full Code Here

                }
            }

            return image;
        } catch (Exception e) {
            listener.errorOccurred(JaiI18N.getString("CodecRIFUtil1"),
                                   e, CodecRIFUtil.class, false);
//            e.printStackTrace();
            return null;
        }
    }
View Full Code Here

    void sendExceptionToListener(String message, Exception e) {
        ImagingListener listener =
            (ImagingListener)getRenderingHints().get(JAI.KEY_IMAGING_LISTENER);

        listener.errorOccurred(message, e, this, false);
    }
}
View Full Code Here

        // Determine the residual mapping.
        try {
            at.preConcatenate(scale.createInverse());
        } catch(Exception e) {
            String message = JaiI18N.getString("IIPCRIF6");
            listener.errorOccurred(message,
                                   new ImagingException(message, e),
                                   this, false);
//            throw new RuntimeException(JaiI18N.getString("IIPCRIF6"));
        }
View Full Code Here

            (AffineTransform)paramBlock.getObjectParameter(6);
        try {
            afn.preConcatenate(at.createInverse());
        } catch(Exception e) {
            String message = JaiI18N.getString("IIPCRIF6");
            listener.errorOccurred(message,
                                   new ImagingException(message, e),
                                   this, false);
//            throw new RuntimeException(JaiI18N.getString("IIPCRIF6"));
        }
View Full Code Here

                new MemoryCacheSeekableStream(stream);
            rendering = JAI.create(format, sStream);
        } catch(Exception e) {
            String message =
                JaiI18N.getString("IIPCRIF7") + " " + buf.toString();
            listener.errorOccurred(message,
                                   new ImagingException(message, e),
                                   this, false);
//            throw new RuntimeException(e.getClass()+" "+e.getMessage());
        }
View Full Code Here

                if(!at.isIdentity()) {
                    try {
                    at = at.createInverse();
                    } catch(Exception e) {
                        String message = JaiI18N.getString("IIPCRIF6");
                        listener.errorOccurred(message,
                                               new ImagingException(message, e),
                                               this, false);

//                        throw new RuntimeException(JaiI18N.getString("IIPCRIF6"));
                    }
View Full Code Here

  return null;
    }

    void sendExceptionToListener(String message, Exception e) {
        ImagingListener listener= JAI.getDefaultInstance().getImagingListener();
        listener.errorOccurred(message, e, this, false);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.