org.autoplot.AutoplotUI

The Autoplot application GUI. This is the entry point for the application, wrapping the internal application model with conveniences like bookmarks, time range editors and history.

AutoplotUI( org.autoplot.ApplicationModel model )

Creates new form AutoplotUI


CARD_DATA_SET_SELECTOR


CARD_TIME_RANGE_SELECTOR


WARNING_ICON

yellow triangle with exclamation point, used to indicate warning condition.


ERROR_ICON

red stop sign with exclamation point, using to indicate error condition.


BUSY_ICON

animated gif of swirling dots, used to indicate known busy state.


BUSY_OPAQUE_ICON

animated gif of swirling dots, used to indicate known busy state.


READY_ICON

not used.


IDLE_ICON

empty 16x16 image used to indicate normal status.


READY_MESSAGE

ready message.


SYSPROP_AUTOPLOT_DISABLE_CERTS

true indicates that certificate checking has been disabled.


SYSPROP_AUTOPLOT_RELEASE_TYPE

the release type, either non for unknown, or javaws, singlejar, exe, or dmg. This should be set at the command line when java is started.


PROP_EDITORCARD


about

about( ) → void

show the about dialog, which has version information.

Returns:

void (returns nothing)

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


basicMode

basicMode( ) → void

turn on basic mode, where users can only use the app for browsing existing products.

Returns:

void (returns nothing)

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


clearBottomPanel

clearBottomPanel( ) → void

remove any extra component added below the tabs.

Returns:

void (returns nothing)

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


clearLeftPanel

clearLeftPanel( ) → void

remove any extra component added to the left of the tabs. This calls invokeLater to make sure the event is on the event thread.

Returns:

void (returns nothing)

See Also:

setLeftPanel(javax.swing.JComponent)


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


clearRightPanel

clearRightPanel( ) → void

remove any extra component added to the right of the tabs.

Returns:

void (returns nothing)

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


enterAddPlotElementDialog

enterAddPlotElementDialog( ) → void

make this public before AGU. Set the editor to the URI, then call this.

Returns:

void (returns nothing)

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


getApplicationModel

getApplicationModel( ) → ApplicationModel

provide access to the universal application model.

Returns:

access to the universal application model.

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


getDataPanel

getDataPanel( ) → DataPanel

return the data panel (for testing).

Returns:

the data panel.

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


getDataSetSelector

getDataSetSelector( ) → DataSetSelector

provide access to the dataSetSelector which browses and resets the plot URIs.

Returns:

the dataSetSelector

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


getDocumentModel

getDocumentModel( ) → Application

return the current state of this application window. Note this is the actual and not a copy, so it should not be modified.

Returns:

the application state.

See Also:

getDom()


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


getDom

getDom( ) → Application

return the dom (application state) associated with this application.

Returns:

the dom associated with this application.

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


getDropTargetListener

getDropTargetListener( ) → DropTargetListener

provide access to the dropTargetListener. Presumably this was added for testing.

Returns:

the dropListener.

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


getEditorCard

getEditorCard( ) → String

Returns:

java.lang.String

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


getPersistentStateSupport

getPersistentStateSupport( org.autoplot.AutoplotUI parent, org.autoplot.ApplicationModel applicationModel ) → PersistentStateSupport

Parameters

parent - an AutoplotUI
applicationModel - an ApplicationModel

Returns:

org.autoplot.PersistentStateSupport

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


getProcessId

getProcessId( String fallback ) → String

return the processID (pid), or the fallback if the pid cannot be found.

Parameters

fallback - the string (null is okay) to return when the pid cannot be found.

Returns:

the process id or the fallback provided by the caller.

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


getResponseMonitor

getResponseMonitor( ) → EventThreadResponseMonitor

return the monitor, if enabled, so that logging can be enabled.

Returns:

an org.autoplot.EventThreadResponseMonitor

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


getScriptEditor

getScriptEditor( ) → EditorTextPane

access the editor for scripts, if available. This was initially added to provide a way to experiment with setting editor colors, but might be useful for other purposes.

Returns:

null or the editor panel

See Also:

getScriptPanel() which returns the panel


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


getScriptPanel

getScriptPanel( ) → JythonScriptPanel

Return the script editor panel. Until v2020a_2 and 20200202a, this returned the EditorTextPane rather than the tab itself. This is inconsistent with other calls. For example:

 s= getApplication().getScriptPanel().getFilename() 
 print( 'script editor filename:' )
 print( s )
 

Returns:

the editor panel in the script tab.

See Also:

getScriptEditor() which returns the editor itself.


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


getTabs

getTabs( ) → TearoffTabbedPane

provide access to the tabs so that component can be added

Returns:

TabbedPane.

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


getTickleTimer

getTickleTimer( ) → TickleTimer

access tickle timer, which triggers when things change. This will go away!

Returns:

an org.autoplot.util.TickleTimer

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


getTimeRangeEditor

getTimeRangeEditor( ) → TimeRangeEditor

provide access to the timeRangeEditor which controls dom.timerange.

Returns:

the timeRangeEditor

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


getUndoRedoSupport

getUndoRedoSupport( ) → UndoRedoSupport

provide access to the undoRedoSupport. Presumably this was added for testing.

Returns:

the undoRedoSupport.

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


getWindowExtraHeight

getWindowExtraHeight( ) → int

return the extra pixels needed by the GUI for borders and address bar.

Returns:

the extra pixels needed by the GUI for borders and address bar.

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


getWindowExtraWidth

getWindowExtraWidth( ) → int

return the extra pixels needed by the GUI for borders and address bar.

Returns:

the extra pixels needed by the GUI for borders and address bar.

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


handleSingleInstanceURI

handleSingleInstanceURI( String suri, String pos ) → void

extract the code that handles the single instance so that we can model it for debugging.

Parameters

suri - the reentry URI
pos - support the --position=3 switch to support servers.

Returns:

void (returns nothing)

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


isBasicMode

isBasicMode( ) → boolean

true if the GUI is in basic mode, hiding functions for new users. In basic mode users can only browse existing products.

Returns:

true if the GUI is in basic mode

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


isExpertMode

isExpertMode( ) → boolean

true if the GUI is in expert mode, showing more functions for users comfortable with the application.

Returns:

true if the GUI is in expert mode

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


main

main( java.lang.String[][] args ) → void

Parameters

args - the command line arguments

Returns:

void (returns nothing)

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


newApplication

newApplication( ) → AutoplotUI

create a new application. This is a convenience method for scripts.

Returns:

an org.autoplot.AutoplotUI

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


newGrannyTextEditorWithMacros

newGrannyTextEditorWithMacros( ) → GrannyTextEditor

Autoplot adds additional macros to granny text strings for annotations and titles.

Returns:

editor with extra tab.

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


plotUri

plotUri( String uri ) → void

Attempt to plot the given URI, which may be rejected and its editor invoked. This is the equivalent of typing in the URI in the address bar and pressing the Go (green arrow) button.

Parameters

uri - the Autoplot URI.

Returns:

void (returns nothing)

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


raiseApplicationWindow

raiseApplicationWindow( java.awt.Frame frame ) → void

raise the application window http://stackoverflow.com/questions/309023/howto-bring-a-java-window-to-the-front

Parameters

frame - the frame

Returns:

void (returns nothing)

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


reloadTools

reloadTools( ) → void

looks for and adds tools on a new thread.

Returns:

void (returns nothing)

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


resetAction

resetAction( String name, javax.swing.Action a ) → void

Reset one of the actions in the File menu. There don't appear to be any uses of this odd function, so it might have been used with a script.

Parameters

name - the name of the action.
a - the new action.

Returns:

void (returns nothing)

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


resizeForCanvasSize

resizeForCanvasSize( int w, int h ) → double

resize the outer GUI attempting to get a fitted canvas size. This fixes the problem where a loaded vap doesn't appear as it does when it was saved because the canvas is resized.

Parameters

w - the width of the canvas
h - the height of the canvas

Returns:

nominal scale factor

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

resizeForCanvasSize( int w, int h, int extraW, int extraH ) → double

resizeForDefaultCanvasSize

resizeForDefaultCanvasSize( ) → void

reset to the size in defaults.

Returns:

void (returns nothing)

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


reviewBookmark

reviewBookmark( String uri, int modifiers ) → void

give the user a chance to review the bookmark before using it. The user has selected the URI via the bookmarks and we will show it to them before using it. (rfe336)

Parameters

uri - the URI from the bookmarks or history.
modifiers - key modifiers like KeyEvent.CTRL_MASK for plot below.

Returns:

void (returns nothing)

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


runScriptTools

runScriptTools( String script ) → void

run the script, using the reference on the tools menu. The security is going to be a bit different soon. This should be called from the event thread because it creates GUI components.

Parameters

script - the URI of the script to run

Returns:

void (returns nothing)

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


setBottomPanel

setBottomPanel( javax.swing.JComponent c ) → void

add the component (typically a JPanel) below the tabs and above the status indicator

Parameters

c - null or the component to add

Returns:

void (returns nothing)

See Also:

setLeftPanel(javax.swing.JComponent)


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


setEditorCard

setEditorCard( String editorCard ) → void

Parameters

editorCard - a String

Returns:

void (returns nothing)

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


setExpertMode

setExpertMode( boolean expert ) → void

set the application expert mode flag to restrict the app for browsing.

Parameters

expert - a boolean

Returns:

void (returns nothing)

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


setLeftPanel

setLeftPanel( javax.swing.JComponent c ) → void

add the component (typically a JPanel) to the left side of the application.

Parameters

c - null or the component to add

Returns:

void (returns nothing)

See Also:

ScriptContext#addTab(java.lang.String, javax.swing.JComponent)
clearLeftPanel()
setRightPanel(javax.swing.JComponent)
setBottomPanel(javax.swing.JComponent)


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


setMessage

setMessage( String message ) → void

set the message in the lower left corner of the application.

Parameters

message - the message to display

Returns:

void (returns nothing)

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

setMessage( javax.swing.Icon icon, String message ) → void

setRightPanel

setRightPanel( javax.swing.JComponent c ) → void

add the component (typically a JPanel) to the right side of the application.

Parameters

c - null or the component to add

Returns:

void (returns nothing)

See Also:

setLeftPanel(javax.swing.JComponent)


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


setSize

setSize( int width, int height ) → void

Parameters

width - an int
height - an int

Returns:

void (returns nothing)

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

setSize( java.awt.Dimension d ) → void

setStatus

setStatus( String message ) → void

set the status message, with "busy:" or "warning:" prefix.

Parameters

message - the message to display

Returns:

void (returns nothing)

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

setStatus( javax.swing.Icon icon, String message ) → void

switchToEditorCard

switchToEditorCard( String selector ) → void

Parameters

selector - a String

Returns:

void (returns nothing)

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