Package qupath.lib.gui.scripting
Interface ScriptEditor
- All Known Implementing Classes:
DefaultScriptEditor
,RichScriptEditor
public interface ScriptEditor
Minimal interface for a script editor that the GUI can call.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Attempt to close the editor, saving changes if requested.void
Show the script editor.void
showScript
(File file) Show the script editor, opening an existing script file.void
showScript
(String name, String script) Show the script editor, including a new script with the specified name.boolean
supportsFile
(File file) Check if the script editor supports a particular file.
-
Method Details
-
showEditor
void showEditor()Show the script editor. -
showScript
Show the script editor, including a new script with the specified name.- Parameters:
name
- name of the script to showscript
- content of the script
-
showScript
Show the script editor, opening an existing script file.- Parameters:
file
- the script file
-
supportsFile
Check if the script editor supports a particular file.- Parameters:
file
-- Returns:
-
requestClose
boolean requestClose()Attempt to close the editor, saving changes if requested.- Returns:
- True if the editor can be closed without losing changes, unless the user consents to losing changes.
-