JHotDraw 7.4.1

org.jhotdraw.samples.svg.io
Class SVGZInputFormat

java.lang.Object
  extended by org.jhotdraw.samples.svg.io.SVGInputFormat
      extended by org.jhotdraw.samples.svg.io.SVGZInputFormat
All Implemented Interfaces:
InputFormat

public class SVGZInputFormat
extends SVGInputFormat

SVGZInputFormat supports reading of uncompressed and compressed SVG images.

Version:
$Id: SVGZInputFormat.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer

Constructor Summary
SVGZInputFormat()
          Creates a new instance.
 
Method Summary
 javax.swing.filechooser.FileFilter getFileFilter()
          Return a FileFilter that can be used to identify files which can be read with this input format.
 void read(java.io.InputStream in, Drawing drawing, boolean replace)
          This is the main reading method.
 
Methods inherited from class org.jhotdraw.samples.svg.io.SVGInputFormat
getInputFormatAccessory, isDataFlavorSupported, read, read, read, read, toCommaSeparatedArray, toQuotedAndCommaSeparatedArray, toTransform, toWSOrCommaSeparatedArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGZInputFormat

public SVGZInputFormat()
Creates a new instance.

Method Detail

getFileFilter

public javax.swing.filechooser.FileFilter getFileFilter()
Description copied from interface: InputFormat
Return a FileFilter that can be used to identify files which can be read with this input format. Typically, each input format has its own recognizable file naming convention.

Specified by:
getFileFilter in interface InputFormat
Overrides:
getFileFilter in class SVGInputFormat
Returns:
FileFilter to be used with a javax.swing.JFileChooser

read

public void read(java.io.InputStream in,
                 Drawing drawing,
                 boolean replace)
          throws java.io.IOException
Description copied from class: SVGInputFormat
This is the main reading method.

Specified by:
read in interface InputFormat
Overrides:
read in class SVGInputFormat
Parameters:
in - The input stream.
drawing - The drawing to which this method adds figures.
replace - Whether attributes on the drawing object should by changed by this method. Set this to false, when reading individual images from the clipboard.
Throws:
java.io.IOException

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.