org.autoplot.ApplicationModel
Internal model of the application to separate model from view.
Note this is the legacy model that still remains from the first implementation
of Autoplot, and represents the most simple application.
ApplicationModel( )
PROP_PROMPT
PREF_RECENT
PROPERTY_RECENT
PROPERTY_BOOKMARKS
PROP_NAME
PROP_VAPFILE
addDasPeersToApp
addDasPeersToApp( ) → void
This needs to be called after the application model is initialized and
preferably from the event thread.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
addDasPeersToAppAndWait
addDasPeersToAppAndWait( ) → void
addDasPeers should be called from the event thread. This is intended to support old code that
was loose about this with minimal impact on code.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
addException
addException( String suri, java.lang.Exception exx ) → void
Record exceptions the same way we would record successful plots.
This checks the system property "enableLogExceptions" and
if "true" the exception is logged.
See HOME/autoplot_data/bookmarks/exceptions.txt.
Parameters
suri - the URI we were trying to plot.
exx - the exception we got instead.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
addPropertyChangeListener
addPropertyChangeListener( String propertyName, java.beans.PropertyChangeListener listener ) → void
Parameters
propertyName - a String
listener - a PropertyChangeListener
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
addPropertyChangeListener( java.beans.PropertyChangeListener listener ) → void
addRecent
addRecent( String suri ) → void
Add the URI to the recently used list, and to the user's
autoplot_data/bookmarks/history.txt. No interpretation is done
and pngwalk: and script: uris are acceptable.
Parameters
suri - the URI to add.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
createState
createState( boolean deep ) → Application
creates an ApplicationState object representing the current state.
Parameters
deep - if true, do a deeper, more expensive gathering of state. In the initial implementation, this calculates the embedded dataset.
Returns:
ApplicationState object
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
dataSource
dataSource( ) → DataSource
Returns:
org.autoplot.datasource.DataSource
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
doAutoLayout
doAutoLayout( ) → void
trigger autolayout, which adjusts the margins so that labels aren't cut off. Note
LayoutListener has similar code.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
doOpenVap
doOpenVap( java.io.File f, java.util.LinkedHashMap deltas ) → void
Load the vap file at f, apply additional modifications to the DOM, then
sync the application to this. Deltas with names in all caps (e.g. PWD or FILE)
will be applied to the vap, looking for %{PWD} or %{FILE}:
PWD will be set to the current working directory of the vap file.
Parameters
f - a .vap file.
deltas - list property name, property value pairs to apply to the
vap DOM after it's loaded.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
doOpenVap( java.io.InputStream in, java.util.LinkedHashMap deltas ) → void
exit
exit( ) → void
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getCanvas
getCanvas( ) → DasCanvas
Returns:
org.das2.graph.DasCanvas
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getDataSourceFilterController
getDataSourceFilterController( ) → DataSourceController
see ScriptPanelSupport
Returns:
an org.autoplot.dom.DataSourceController
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getDataSourceURL
getDataSourceURL( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getDocumentModel
Deprecated:
getDom
getDom( ) → Application
return the dom containing the state of this application
Returns:
the dom for this application.
See Also:
getDocumentModel()
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getExceptionHandler
getExceptionHandler( ) → ExceptionHandler
Returns:
org.das2.util.ExceptionHandler
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getLegacyBookmarks
getLegacyBookmarks( ) → List
Read the default bookmarks in, or those from the user's "bookmarks" pref node.
Returns:
the bookmarks of the legacy user.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getName
getName( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getPrompt
getPrompt( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getRecent
getRecent( ) → List
Get the recent URIs, from autoplot_data/bookmarks/bookmarks.recent.xml
Returns:
the recent URIs
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getRecent( String filter, int limit ) → Map
getRecent( java.util.regex.Pattern p, int limit ) → Map
getStylePanelMaybeCached
getStylePanelMaybeCached( org.autoplot.RenderType renderType ) → StylePanel
return a GUI controller for the RenderType, using a cached instance if
available.
Parameters
renderType - a RenderType
Returns:
an org.autoplot.PlotStylePanel.StylePanel
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getThumbnail
getThumbnail( int height ) → BufferedImage
return a thumbnail for the state. TODO: multiple steps produces better result. See http://www.philreeve.com/java_high_quality_thumbnails.php
Parameters
height - the height in pixels
Returns:
the thumbnail, or null if one cannot be created
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getVapFile
getVapFile( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isApplet
isApplet( ) → boolean
An early version of Autoplot worked as an applet. The applet mode
is no longer supported.
Returns:
true if this is an applet.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isApplication
isApplication( ) → boolean
Return true if this is running as an application.
Returns:
true if this is running as an application.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isHeadless
isHeadless( ) → boolean
Return true if the application is headless.
Returns:
true if the application is headless.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isRestoringState
isRestoringState( ) → boolean
Returns:
boolean
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isSandboxed
isSandboxed( ) → boolean
Returns:
boolean
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removePropertyChangeListener
removePropertyChangeListener( String propertyName, java.beans.PropertyChangeListener listener ) → void
Parameters
propertyName - a String
listener - a PropertyChangeListener
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removePropertyChangeListener( java.beans.PropertyChangeListener listener ) → void
restoreState
restoreState( org.autoplot.dom.Application state ) → void
set the application state.
Parameters
state - an Application
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setApplet
setApplet( boolean v ) → void
Parameters
v - a boolean
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setCanvasSize
setCanvasSize( int width, int height ) → void
set the canvas size, to the extent that this is possible.
Parameters
width - width in pixels
height - height in pixels
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setDataSet
setDataSet( QDataSet ds ) → void
Just plot this dataset. No capabilities, no URLs. Metadata is set to
allow inspection of dataset.
Parameters
ds - a dataset
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setDataSet( int chNum, String label, QDataSet ds ) → void
setDataSet( int chNum, String label, QDataSet ds, boolean reset ) → void
setDataSet( int chNum, String label, String suri ) → void
setDataSource
setDataSource( org.autoplot.datasource.DataSource dataSource ) → void
Parameters
dataSource - a DataSource
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setDataSourceURL
setDataSourceURL( String suri ) → void
Plot this URI, without checking to see if the URI is valid by
checking reject of the data source.
When using the AutoplotUI, it is preferable to use AutoplotUI.plotUri,
which will have the effect of typing in the URI and hitting the "go"
arrow button.
Parameters
suri - the URI
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setExceptionHandler
setExceptionHandler( org.das2.util.ExceptionHandler eh ) → void
Set the code that will handle uncaught exceptions. This could be a
GUI that shows the user the problem and submits bug reports. This could
also simply call exit with a non-zero return code for headless use.
Parameters
eh - an ExceptionHandler
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setFocus
setFocus( int chNum ) → void
Just set the focus to the given dataSourceFilter index. plotElements and dataSourceFilters
are added until the index exists. This is introduced to support code where we reenter
Autoplot with the position switch, and we can to then call maybePlot so that completions can
happen.
Parameters
chNum - the index of the DataSourceFilter to use.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setLocation
setLocation( int x, int y ) → void
set the location of the application container. This will generally
have some small offset from the canvas.
Parameters
x - the upper-left corner location.
y - the upper-left corner location.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setName
setName( String name ) → void
Parameters
name - a String
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setPrompt
setPrompt( String prompt ) → void
Set the prompt used for command line sessions. By default this is
"autoplot> ".
Parameters
prompt - the new one-line prompt
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setResizeRequestListener
setResizeRequestListener( org.autoplot.ApplicationModel.ResizeRequestListener listener ) → void
set the code which will handle resize requests, for example if
a .vap is loaded.
Parameters
listener - the listener.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setRestoringState
setRestoringState( boolean b ) → void
Parameters
b - a boolean
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setSandboxed
setSandboxed( boolean sandboxed ) → void
mark that the app is running in sandboxed mode, though note that
this does not add the security manager.
Parameters
sandboxed - a boolean
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setVapFile
setVapFile( String vapFile ) → void
handy property to contain the current file name.
Parameters
vapFile - a String
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
showMessage
showMessage( String message, String title, int messageType ) → void
Show a message to the scientist. This will handle headless mode
by printing to stderr.
Parameters
message - the message to show
title - a title for the dialog
messageType - JOptionPane.WARNING_MESSAGE, JOptionPane.INFORMATION_MESSAGE, JOptionPane.PLAIN_MESSAGE,
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
waitUntilIdle
Deprecated: use waitUntilIdle() instead.
waitUntilIdle( ) → void