org.autoplot.scriptconsole.JythonScriptPanel

GUI for editing and running Jython scripts.

JythonScriptPanel( org.autoplot.AutoplotUI app, org.autoplot.datasource.DataSetSelector selector )

Creates new form JythonScriptPanel


PROP_FILENAME


PROP_DIRTY


addMenuItem

addMenuItem( javax.swing.JMenuItem menu ) → void

add the menu or menu item to the editor context menu.

Parameters

menu - a JMenuItem

Returns:

void (returns nothing)

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


addSettingsMenuItem

addSettingsMenuItem( javax.swing.JMenuItem menu ) → void

add the menu or menu item to the editor context menu.

Parameters

menu - a JMenuItem

Returns:

void (returns nothing)

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


doRebuildMenu

doRebuildMenu( ) → void

request that the popup menu be rebuilt. Codes that added menu items will need to be called again.

Returns:

void (returns nothing)

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


getAnnotationsSupport

getAnnotationsSupport( ) → org.autoplot.jythonsupport.ui.EditorAnnotationsSupport

provide access to the annotations support, so that errors can be marked on the editor. This may cause bugs as there are issues like ensuring the exception marked belongs to the code, and it should not be used without reservation.

Returns:

the annotations support.

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


getConsoleListener

getConsoleListener( ) → java.awt.event.ActionListener

return action listener listening for action commands containing source:linenum

Returns:

a java.awt.event.ActionListener

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


getEditorPanel

getEditorPanel( ) → org.autoplot.jythonsupport.ui.EditorTextPane

returns the editor

Returns:

the editor

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


getFilename

getFilename( ) → String

Returns:

java.lang.String

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


getRunningScript

getRunningScript( ) → java.io.File

return the name of the script that the panel is busy running, or null. When this is non-null, don't load other scripts.

Returns:

null or the running script.

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


getScrollPane

getScrollPane( ) → javax.swing.JScrollPane

returns the JScrollPane containing the editor so that special applications can control what's visible.

Returns:

the JScrollPane containing the editor

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


isDirty

isDirty( ) → boolean

Returns:

boolean

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


loadExampleUri

loadExampleUri( String uri ) → void

this downloads the URI and loads the local version into the editor.

Parameters

uri - the URI

Returns:

void (returns nothing)

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


loadFile

loadFile( java.io.File file ) → boolean

allow clients to tell this to load a file.

Parameters

file - the .jy or .jyds file.

Returns:

false if the editor is dirty, true if the file is loaded.

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


resetUndo

resetUndo( ) → void

reset the undo history.

Returns:

void (returns nothing)

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


setDirty

setDirty( boolean dirty ) → void

set the flag indicating the script has been modified.

Parameters

dirty - a boolean

Returns:

void (returns nothing)

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


setFilename

setFilename( String filename ) → void

Parameters

filename - a String

Returns:

void (returns nothing)

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


setRunningScript

setRunningScript( java.io.File f ) → void

set the current script that is running. This will prevent automatic loads from occurring.

Parameters

f - a File

Returns:

void (returns nothing)

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