|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StorageFormat
Interface to define a storage format. A StorageFormat is a strategy that knows how to store and restore a Drawing according to a specific encoding. Typically it can be recognized by a file extension. To identify a valid file format for a Drawing an appropriate FileFilter for a javax.swing.JFileChooser component can be requested.
Drawing
,
StorageFormatManager
Method Summary | |
---|---|
javax.swing.filechooser.FileFilter |
getFileFilter()
Return a FileFilter that can be used to identify files which can be stored and restored with this Storage Format. |
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 under a given name. |
Method Detail |
---|
javax.swing.filechooser.FileFilter getFileFilter()
java.lang.String store(java.lang.String fileName, Drawing saveDrawing) throws java.io.IOException
fileName
- file name of the Drawing under which it should be storedsaveDrawing
- drawing to be saved
java.io.IOException
Drawing restore(java.lang.String fileName) throws java.io.IOException
name
- of the file in which the Drawing has been saved
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |