|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCH.ifa.draw.util.StorageFormatManager
public class StorageFormatManager
The StorageFormatManager is a contains StorageFormats. It is not a Singleton because it could be necessary to deal with different format managers, e.g. one for importing Drawings, one for exporting Drawings. If one StorageFormat matches the file extension of the Drawing file, then this StorageFormat can be used to store or restore the Drawing.
StorageFormat
Constructor Summary | |
---|---|
StorageFormatManager()
Create a new StorageFormatManager. |
Method Summary | |
---|---|
void |
addStorageFormat(StorageFormat newStorageFormat)
Add a StorageFormat that should be supported by this StorageFormatManager. |
boolean |
containsStorageFormat(StorageFormat checkStorageFormat)
Test, whether a StorageFormat is supported by this StorageFormat |
StorageFormat |
findStorageFormat(javax.swing.filechooser.FileFilter findFileFilter)
Find a StorageFormat that can be used according to a FileFilter to store a Drawing in a file or restore it from a file respectively. |
StorageFormat |
getDefaultStorageFormat()
Return the StorageFormat which is used as selected file format in a javax.swing.JFileChooser |
void |
registerFileFilters(javax.swing.JFileChooser fileChooser)
Register all FileFilters supported by StorageFormats |
void |
removeStorageFormat(StorageFormat oldStorageFormat)
Remove a StorageFormat that should no longer be supported by this StorageFormatManager. |
void |
setDefaultStorageFormat(StorageFormat newDefaultStorageFormat)
Set a StorageFormat as the default storage format which is selected in a javax.swing.JFileChooser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StorageFormatManager()
Method Detail |
---|
public void addStorageFormat(StorageFormat newStorageFormat)
newStorageFormat
- new StorageFormat to be supportedpublic void removeStorageFormat(StorageFormat oldStorageFormat)
oldStorageFormat
- old StorageFormat no longer to be supportedpublic boolean containsStorageFormat(StorageFormat checkStorageFormat)
public void setDefaultStorageFormat(StorageFormat newDefaultStorageFormat)
newDefaultStorageFormat
- StorageFormat that should be selected in a JFileChooserpublic StorageFormat getDefaultStorageFormat()
public void registerFileFilters(javax.swing.JFileChooser fileChooser)
fileChooser
- javax.swing.JFileChooser to which FileFilters are addedpublic StorageFormat findStorageFormat(javax.swing.filechooser.FileFilter findFileFilter)
findFileFilter
- FileFilter used to identify a StorageFormat
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |