public int getWidth(int pIndex) throws IOException { checkBounds(pIndex); try { return rasterizer.getDefaultWidth(); } catch (TranscoderException e) { throw new IIOException(e.getMessage(), e); } }
public int getHeight(int pIndex) throws IOException { checkBounds(pIndex); try { return rasterizer.getDefaultHeight(); } catch (TranscoderException e) { throw new IIOException(e.getMessage(), e); } }
private synchronized void init() throws IOException { // Need the extra test, to avoid throwing an IOException from the Transcoder if (imageInput == null) { throw new IllegalStateException("input == null"); } if (reader == null) { WMFTranscoder transcoder = new WMFTranscoder(); ByteArrayOutputStream output = new ByteArrayOutputStream(); Writer writer = new OutputStreamWriter(output, "UTF8"); try { TranscoderInput in = new TranscoderInput(IIOUtil.createStreamAdapter(imageInput)); TranscoderOutput out = new TranscoderOutput(writer); // TODO: Transcodinghints? transcoder.transcode(in, out); } catch (TranscoderException e) { throw new IIOException(e.getMessage(), e); } reader = new SVGImageReader(getOriginatingProvider()); reader.setInput(ImageIO.createImageInputStream(new ByteArrayInputStream(output.toByteArray()))); } }
/** * Invoked when a warning occured while transcoding. * @param ex the warning informations encapsulated in a TranscoderException * @exception TranscoderException if the method want to forward * the exception */ public void warning(TranscoderException ex) throws TranscoderException { System.err.println("WARNING: "+ex.getMessage()); } }
/** * Invoked when an error occured while transcoding. * @param ex the error informations encapsulated in a TranscoderException * @exception TranscoderException if the method want to forward * the exception */ public void error(TranscoderException ex) throws TranscoderException { System.err.println("ERROR: "+ex.getMessage()); }
/** * Invoked when an error occured while transcoding. * @param ex the error informations encapsulated in a TranscoderException * @exception TranscoderException if the method want to forward * the exception */ public void error(TranscoderException ex) throws TranscoderException { System.err.println("ERROR: "+ex.getMessage()); }
/** * Invoked when a warning occured while transcoding. * @param ex the warning informations encapsulated in a TranscoderException * @exception TranscoderException if the method want to forward * the exception */ public void warning(TranscoderException ex) throws TranscoderException { System.err.println("WARNING: "+ex.getMessage()); } }
public void error(TranscoderException arg) throws TranscoderException { log.error("Icon: " + name + " - ERROR: " + arg.getMessage()); } });
public void warning(TranscoderException arg0) throws TranscoderException { log.error("Icon: " + name + " - WARN: " + arg0.getMessage()); }
/** * {@inheritDoc} */ public void error(TranscoderException te) throws TranscoderException { getLogger().error(te.getMessage()); }
/** * {@inheritDoc} */ public void warning(TranscoderException te) throws TranscoderException { getLogger().warn(te.getMessage()); }
/** * Displays the specified error using the <code>ErrorHandler</code>. */ public void displayError(Exception e) { try { e.printStackTrace(); SVGAbstractTranscoder.this.handler.error (new TranscoderException(e)); } catch (TranscoderException ex) { throw new RuntimeException( ex.getMessage() ); } }
/** * Displays the specified error using the <code>ErrorHandler</code>. */ public void displayError(Exception e) { try { e.printStackTrace(); SVGAbstractTranscoder.this.handler.error (new TranscoderException(e)); } catch (TranscoderException ex) { throw new RuntimeException( ex.getMessage() ); } }
/** * Displays the specified error message using the <code>ErrorHandler</code>. */ public void displayError(String message) { try { SVGAbstractTranscoder.this.handler.error (new TranscoderException(message)); } catch (TranscoderException ex) { throw new RuntimeException( ex.getMessage() ); } }
/** * Displays the specified message using the <code>ErrorHandler</code>. */ public void displayMessage(String message) { try { SVGAbstractTranscoder.this.handler.warning (new TranscoderException(message)); } catch (TranscoderException ex) { throw new RuntimeException( ex.getMessage() ); } }
@Override public void warning(TranscoderException arg0) throws TranscoderException { JOptionPane.showMessageDialog(OVTK2Desktop.getInstance().getMainFrame(), arg0.getMessage(), "Warning", JOptionPane.WARNING_MESSAGE); } }
/** * Displays the specified message using the <code>ErrorHandler</code>. */ public void displayMessage(String message) { try { SVGAbstractTranscoder.this.handler.warning (new TranscoderException(message)); } catch (TranscoderException ex) { throw new RuntimeException( ex.getMessage() ); } }
/** * Displays the specified error message using the <code>ErrorHandler</code>. */ public void displayError(String message) { try { SVGAbstractTranscoder.this.handler.error (new TranscoderException(message)); } catch (TranscoderException ex) { throw new RuntimeException( ex.getMessage() ); } }
public int getWidth(int pIndex) throws IOException { checkBounds(pIndex); try { return rasterizer.getDefaultWidth(); } catch (TranscoderException e) { throw new IIOException(e.getMessage(), e); } }
public int getHeight(int pIndex) throws IOException { checkBounds(pIndex); try { return rasterizer.getDefaultHeight(); } catch (TranscoderException e) { throw new IIOException(e.getMessage(), e); } }