org.autoplot.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.autoplot.PersistentStateSupport.SerializationStrategy strategy, String extension )

PersistentStateSupport( )

Creates a new instance of PersistentStateSupport


PROPERTY_OPENING


PROPERTY_SAVING


PROPERTY_DIRTY


PROPERTY_CURRENT_FILE


EMBED_DATA


ONLY_EMBED_LOCAL


LOCAL_PWD_REFERENCES


PROP_DIRECTORY


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

close( ) → void

reset the current file so it is null. We call this for example when we are finished with the file and would start a new file without a name.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


createCurrentFileLabel

createCurrentFileLabel( ) → JLabel

Returns:

javax.swing.JLabel

[search for examples] [view on GitHub] [view on old javadoc] [view source]


createOpenAction

createOpenAction( ) → Action

Returns:

javax.swing.Action

[search for examples] [view on GitHub] [view on old javadoc] [view source]


createOpenRecentMenu

createOpenRecentMenu( ) → JMenu

Returns:

javax.swing.JMenu

[search for examples] [view on GitHub] [view on old javadoc] [view source]


createSaveAction

createSaveAction( ) → Action

Returns:

javax.swing.Action

[search for examples] [view on GitHub] [view on old javadoc] [view source]


createSaveAsAction

createSaveAsAction( ) → Action

Create an action which will trigger the save as dialog. This is used to create a "save as" button.

Returns:

the action

[search for examples] [view on GitHub] [view on old javadoc] [view source]


createSaveMenuItem

createSaveMenuItem( ) → JMenuItem

Returns:

javax.swing.JMenuItem

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getCurrentFile

getCurrentFile( ) → String

return the current file, which will be a reference to the local file system.

Returns:

a String

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getDirectory

getDirectory( ) → String

Returns:

java.lang.String

[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( ) → int

Save the state to the file selected by a JFileChooser.

Returns:

same as jFileChooser.showSaveDialog(), for example: JFileChooser.CANCEL_OPTION means the option was canceled. JFileChooser.APPROVE_OPTION means the file was saved. Note this is not the same as JOptionPane.CANCEL_OPTION!

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setCurrentFile

setCurrentFile( String currentFile ) → void

set the current file, which could be file:///home/... or /home/... if null, then no file is currently opened.

Parameters

currentFile - a String

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]


setDirectory

setDirectory( String directory ) → void

Parameters

directory - a String

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]