## org.das2.dasml.PersistentStateSupport

## PersistentStateSupport( org.das2.graph.DasCanvas canvas, String extension )

Provides a means for saving the application persistently, undo/redo support (TODO). canvas is the canvas to be serialized, extension identifies the application. Note that internal changes to das may break saved files.

## PersistentStateSupport( java.awt.Component parent, org.das2.dasml.PersistentStateSupport.SerializationStrategy strategy, String extension )

## PersistentStateSupport( )

Creates a new instance of PersistentStateSupport

## PROPERTY_OPENING

## PROPERTY_SAVING

## PROPERTY_DIRTY

## PROPERTY_CURRENT_FILE

## addPropertyChangeListener

addPropertyChangeListener( java.beans.PropertyChangeListener l ) → void

Adds a PropertyChangeListener to the listener list.

### Parameters

l - The listener to add.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## close

Deprecated: What is the purpose of this method?

## createCurrentFileLabel

createCurrentFileLabel( ) → javax.swing.JLabel

### Returns:

javax.swing.JLabel
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## createOpenAction

createOpenAction( ) → javax.swing.Action

### Returns:

javax.swing.Action
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## createOpenRecentMenu

createOpenRecentMenu( ) → javax.swing.JMenu

### Returns:

javax.swing.JMenu
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## createQuitAction

createQuitAction( ) → javax.swing.Action

In the future, this should prompt for save if the app is dirty.

### Returns:

javax.swing.Action
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## createSaveAction

createSaveAction( ) → javax.swing.Action

### Returns:

javax.swing.Action
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## createSaveAsAction

createSaveAsAction( ) → javax.swing.Action

### Returns:

javax.swing.Action
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## createSaveMenuItem

createSaveMenuItem( ) → javax.swing.JMenuItem

### Returns:

javax.swing.JMenuItem
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getCurrentFile

getCurrentFile( ) → java.io.File

### Returns:

java.io.File
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isCurrentFileOpened

isCurrentFileOpened( ) → boolean

Property currentFileOpened indicates if the current file has ever been opened. This is to handle the initial state where the current file is set, but should not be displayed because it has not been opened.

### Returns:

Value of property currentFileOpened.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isDirty

isDirty( ) → boolean

Getter for property dirty.

### Returns:

Value of property dirty.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isOpening

isOpening( ) → boolean

Property loading is true when a load operation is being performed.

### Returns:

Value of property loading.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isSaving

isSaving( ) → boolean

Property saving is true when a save operation is being performed.

### Returns:

Value of property saving.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## markDirty

markDirty( ) → void

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## removePropertyChangeListener

removePropertyChangeListener( java.beans.PropertyChangeListener l ) → void

Removes a PropertyChangeListener from the listener list.

### Parameters

l - The listener to remove.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## saveAs

saveAs( ) → void

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setCurrentFile

setCurrentFile( java.io.File currentFile ) → void

### Parameters

currentFile - a File

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setCurrentFileOpened

setCurrentFileOpened( boolean currentFileOpened ) → void

Setter for property currentFileOpened.

### Parameters

currentFileOpened - New value of property currentFileOpened.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDirty

setDirty( boolean dirty ) → void

Setter for property dirty.

### Parameters

dirty - New value of property dirty.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]