|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.das2.util.PersistentStateSupport
public class PersistentStateSupport
Nested Class Summary | |
---|---|
static interface |
PersistentStateSupport.SerializationStrategy
|
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_CURRENT_FILE
|
static java.lang.String |
PROPERTY_DIRTY
|
static java.lang.String |
PROPERTY_OPENING
|
static java.lang.String |
PROPERTY_SAVING
|
Constructor Summary | |
---|---|
PersistentStateSupport()
Creates a new instance of PersistentStateSupport |
|
PersistentStateSupport(java.awt.Component parent,
PersistentStateSupport.SerializationStrategy strategy,
java.lang.String extension)
|
|
PersistentStateSupport(DasCanvas canvas,
java.lang.String extension)
Provides a means for saving the application persistently, undo/redo support (TODO). |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener to the listener list. |
void |
close()
|
javax.swing.JLabel |
createCurrentFileLabel()
|
javax.swing.Action |
createOpenAction()
|
javax.swing.JMenu |
createOpenRecentMenu()
|
javax.swing.Action |
createQuitAction()
In the future, this should prompt for save if the app is dirty. |
javax.swing.Action |
createSaveAction()
|
javax.swing.Action |
createSaveAsAction()
|
javax.swing.JMenuItem |
createSaveMenuItem()
|
java.io.File |
getCurrentFile()
|
boolean |
isCurrentFileOpened()
Property currentFileOpened indicates if the current file has ever been opened. |
boolean |
isDirty()
Getter for property dirty. |
boolean |
isOpening()
Property loading is true when a load operation is being performed. |
boolean |
isSaving()
Property saving is true when a save operation is being performed. |
void |
markDirty()
|
protected void |
openImpl(java.io.File file)
override me. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener from the listener list. |
void |
saveAs()
|
protected void |
saveImpl(java.io.File f)
override me |
void |
setCurrentFile(java.io.File currentFile)
|
void |
setCurrentFileOpened(boolean currentFileOpened)
Setter for property currentFileOpened. |
void |
setDirty(boolean dirty)
Setter for property dirty. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_OPENING
public static final java.lang.String PROPERTY_SAVING
public static final java.lang.String PROPERTY_DIRTY
public static final java.lang.String PROPERTY_CURRENT_FILE
Constructor Detail |
---|
public PersistentStateSupport(DasCanvas canvas, java.lang.String extension)
public PersistentStateSupport(java.awt.Component parent, PersistentStateSupport.SerializationStrategy strategy, java.lang.String extension)
public PersistentStateSupport()
Method Detail |
---|
public javax.swing.Action createSaveAsAction()
public void saveAs()
protected void saveImpl(java.io.File f) throws java.lang.Exception
java.lang.Exception
public javax.swing.Action createSaveAction()
public javax.swing.Action createQuitAction()
public javax.swing.JMenuItem createSaveMenuItem()
public javax.swing.JMenu createOpenRecentMenu()
public javax.swing.JLabel createCurrentFileLabel()
public javax.swing.Action createOpenAction()
protected void openImpl(java.io.File file) throws java.lang.Exception
java.lang.Exception
public void close()
public void markDirty()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l
- The listener to add.public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- The listener to remove.public boolean isDirty()
public void setDirty(boolean dirty)
dirty
- New value of property dirty.public java.io.File getCurrentFile()
public void setCurrentFile(java.io.File currentFile)
public boolean isOpening()
public boolean isSaving()
public boolean isCurrentFileOpened()
public void setCurrentFileOpened(boolean currentFileOpened)
currentFileOpened
- New value of property currentFileOpened.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |