|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.util.StandardStorageFormat
org.jhotdraw.contrib.SVGStorageFormat
The SVGStorageFormat can save drawings in SVG 1.0. At this time, it cannot load SVG drawings. TODO: Refactor this and the other storage formats. There is too much duplication.
Constructor Summary | |
SVGStorageFormat()
|
Method Summary | |
java.lang.String |
createFileDescription()
Factory method to create a file description for the file type when displaying the associated FileFilter. |
protected java.lang.String |
createFileExtension()
Return the file extension recognized by the FileFilter for this StandardStorageFormat. |
boolean |
isRestoreFormat()
Every format has to identify itself as able to store and/or restore from the format it represents. |
boolean |
isStoreFormat()
Every format has to identify itself as able to store and/or restore from the format it represents. |
Drawing |
restore(java.lang.String fileName)
Restore a Drawing from a file with a given name. |
java.lang.String |
store(java.lang.String fileName,
Drawing saveDrawing)
Store a Drawing as SVG under a given name. |
Methods inherited from class org.jhotdraw.util.StandardStorageFormat |
adjustFileName, createFileFilter, equals, getFileDescription, getFileExtension, getFileFilter, hasCorrectFileExtension, setFileDescription, setFileExtension, setFileFilter |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SVGStorageFormat()
Method Detail |
protected java.lang.String createFileExtension()
createFileExtension
in class StandardStorageFormat
public java.lang.String createFileDescription()
createFileDescription
in class StandardStorageFormat
public boolean isRestoreFormat()
StorageFormat
isRestoreFormat
in interface StorageFormat
isRestoreFormat
in class StandardStorageFormat
StorageFormat.isRestoreFormat()
public boolean isStoreFormat()
StorageFormat
isStoreFormat
in interface StorageFormat
isStoreFormat
in class StandardStorageFormat
StorageFormat.isStoreFormat()
public java.lang.String store(java.lang.String fileName, Drawing saveDrawing) throws java.io.IOException
store
in interface StorageFormat
store
in class StandardStorageFormat
fileName
- file name of the Drawing under which it should be storedsaveDrawing
- drawing to be saved
java.io.IOException
StorageFormat.store(java.lang.String, org.jhotdraw.framework.Drawing)
public Drawing restore(java.lang.String fileName) throws java.io.IOException
StandardStorageFormat
restore
in interface StorageFormat
restore
in class StandardStorageFormat
fileName
- of the file in which the Drawing has been saved
java.io.IOException
StorageFormat.restore(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |