Package qupath.lib.gui.dialogs
Class Dialogs
java.lang.Object
qupath.lib.gui.dialogs.Dialogs
Deprecated.
since v0.5.0.
Legacy class, deprecated since v0.5.0.
Replaced by
Dialogs
and FileChoosers
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated.static enum
Deprecated.Possible buttons pressed in a yes/no/cancel dialog. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Dialogs.Builder
builder()
Deprecated.Create a new builder to generate a custom dialog.static qupath.lib.gui.dialogs.QuPathChooser
getChooser
(Window window) Deprecated.Get aQuPathChooser
instance linked to a specific window.static File
promptForDirectory
(File dirBase) Deprecated.Prompt user to select a directory.static File
promptForDirectory
(String title, File dirBase) Deprecated.Prompt user to select a directory.static File
promptForFile
(File dirBase) Deprecated.Prompt user to select a file.static File
promptForFile
(String title, File dirBase, String filterDescription, String... exts) Deprecated.Prompt the user for a file with some kind of file dialog.static String
promptForFilePathOrURL
(String title, String defaultPath, File dirBase, String filterDescription, String... exts) Deprecated.Prompt user to select a file or input a URL.promptForMultipleFiles
(String title, File dirBase, String filterDescription, String... exts) Deprecated.Prompt to open a list of files.static File
Deprecated.Prompt user to select a file path to save.static File
Deprecated.Prompt user to select a file path to save, providing zero or more file extensions as an option.static <T> T
showChoiceDialog
(String title, String message, Collection<T> choices, T defaultChoice) Deprecated.Show a choice dialog with a collection of choices (selection from ComboBox or similar).static <T> T
showChoiceDialog
(String title, String message, T[] choices, T defaultChoice) Deprecated.Show a choice dialog with an array of choices (selection from ComboBox or similar).static boolean
showConfirmDialog
(String title, String text) Deprecated.Show a confirm dialog (OK/Cancel).static boolean
showConfirmDialog
(String title, Node node) Deprecated.Show a confirm dialog (OK/Cancel).static void
showErrorMessage
(String title, String message) Deprecated.Show an error message.static void
showErrorMessage
(String title, Throwable e) Deprecated.Show an error message, displaying the localized message of aThrowable
.static void
showErrorMessage
(String title, Node node) Deprecated.Show an error message, with the content defined within aNode
.static void
showErrorNotification
(String title, String message) Deprecated.Show an error notification.static void
showErrorNotification
(String title, Throwable e) Deprecated.Show an error notification, displaying the localized message of aThrowable
.static void
showInfoNotification
(String title, String message) Deprecated.Show an info notification.static Double
showInputDialog
(String title, String message, Double initialInput) Deprecated.Show an input dialog requesting a numeric value.static String
showInputDialog
(String title, String message, String initialInput) Deprecated.Show an input dialog requesting a String input.static boolean
showMessageDialog
(String title, String message) Deprecated.Show a standard message dialog.static boolean
showMessageDialog
(String title, Node node) Deprecated.Show a message dialog (OK button only), with the content contained within a Node.static void
showNoImageError
(String title) Deprecated.Show an error message that no image is available.static void
showNoProjectError
(String title) Deprecated.Show an error message that no project is available.static boolean
showParameterDialog
(String title, ParameterList params) Deprecated.Show a (modal) dialog for a specified ParameterList.static void
showPlainMessage
(String title, String message) Deprecated.Show a plain message.static void
showPlainNotification
(String title, String message) Deprecated.Show a plain notification.static void
showTextWindow
(Window owner, String title, String contents, Modality modality, boolean isEditable) Deprecated.Show a window containing plain text, with the specified properties.static void
showWarningNotification
(String title, String message) Deprecated.Show a warning notification.static Dialogs.DialogButton
showYesNoCancelDialog
(String title, String text) Deprecated.Show a Yes/No/Cancel dialog.static boolean
showYesNoDialog
(String title, String text) Deprecated.Show a Yes/No dialog.
-
Constructor Details
-
Dialogs
public Dialogs()Deprecated.
-
-
Method Details
-
showConfirmDialog
Deprecated.Show a confirm dialog (OK/Cancel).- Parameters:
title
-text
-- Returns:
-
showMessageDialog
Deprecated.Show a message dialog (OK button only), with the content contained within a Node.- Parameters:
title
-node
-- Returns:
-
showMessageDialog
Deprecated.Show a standard message dialog.- Parameters:
title
-message
-- Returns:
-
showConfirmDialog
Deprecated.Show a confirm dialog (OK/Cancel).- Parameters:
title
-node
-- Returns:
-
showYesNoDialog
Deprecated.Show a Yes/No dialog.- Parameters:
title
-text
-- Returns:
-
showYesNoCancelDialog
Deprecated.Show a Yes/No/Cancel dialog.- Parameters:
title
- dialog box titletext
- prompt message- Returns:
- a
Dialogs.DialogButton
indicating the response (YES, NO, CANCEL)
-
showParameterDialog
Deprecated.Show a (modal) dialog for a specified ParameterList.- Parameters:
title
-params
-- Returns:
- False if the user pressed 'cancel', true otherwise
-
showInputDialog
Deprecated.Show an input dialog requesting a numeric value. Only scientific notation and digits with/without a decimal separator (e.g. ".") are permitted.- Parameters:
title
-message
-initialInput
-- Returns:
- Number input by the user, or NaN if no valid number was entered, or null if cancel was pressed.
-
showInputDialog
Deprecated.Show an input dialog requesting a String input.- Parameters:
title
-message
-initialInput
-- Returns:
-
showChoiceDialog
Deprecated.Show a choice dialog with an array of choices (selection from ComboBox or similar).- Type Parameters:
T
-- Parameters:
title
- dialog titlemessage
- dialog promptchoices
- array of available optionsdefaultChoice
- initial selected option- Returns:
- chosen option, or
null
if the user cancels the dialog
-
showChoiceDialog
public static <T> T showChoiceDialog(String title, String message, Collection<T> choices, T defaultChoice) Deprecated.Show a choice dialog with a collection of choices (selection from ComboBox or similar).- Type Parameters:
T
-- Parameters:
title
- dialog titlemessage
- dialog promptchoices
- list of available optionsdefaultChoice
- initial selected option- Returns:
- chosen option, or
null
if the user cancels the dialog
-
showErrorMessage
Deprecated.Show an error message, displaying the localized message of aThrowable
.- Parameters:
title
-e
-
-
showErrorNotification
Deprecated.Show an error notification, displaying the localized message of aThrowable
.- Parameters:
title
-e
-
-
showErrorNotification
Deprecated.Show an error notification.- Parameters:
title
-message
-
-
showWarningNotification
Deprecated.Show a warning notification.- Parameters:
title
-message
-
-
showInfoNotification
Deprecated.Show an info notification.- Parameters:
title
-message
-
-
showPlainNotification
Deprecated.Show a plain notification.- Parameters:
title
-message
-
-
showNoImageError
Deprecated.Show an error message that no image is available. This is included to help standardize the message throughout the software.- Parameters:
title
-
-
showNoProjectError
Deprecated.Show an error message that no project is available. This is included to help standardize the message throughout the software.- Parameters:
title
-
-
showErrorMessage
Deprecated.Show an error message.- Parameters:
title
-message
-
-
showErrorMessage
Deprecated.Show an error message, with the content defined within aNode
.- Parameters:
title
-node
-
-
showPlainMessage
Deprecated.Show a plain message.- Parameters:
title
-message
-
-
showTextWindow
public static void showTextWindow(Window owner, String title, String contents, Modality modality, boolean isEditable) Deprecated.Show a window containing plain text, with the specified properties.- Parameters:
owner
-title
-contents
-modality
-isEditable
-
-
promptForMultipleFiles
public static List<File> promptForMultipleFiles(String title, File dirBase, String filterDescription, String... exts) Deprecated.Prompt to open a list of files.- Parameters:
title
-dirBase
-filterDescription
-exts
-- Returns:
-
promptForDirectory
Deprecated.Prompt user to select a directory.- Parameters:
dirBase
- base directory to display; if null or not an existing directory, the value under getLastDirectory() should be used- Returns:
- selected directory, or null if no directory was selected
-
promptForDirectory
Deprecated.Prompt user to select a directory.- Parameters:
title
- the title to display for the dialog (may be null to use default)dirBase
- base directory to display; if null or not an existing directory, the value under getLastDirectory() should be used- Returns:
- selected directory, or null if no directory was selected
-
promptForFile
public static File promptForFile(String title, File dirBase, String filterDescription, String... exts) Deprecated.Prompt the user for a file with some kind of file dialog.- Parameters:
title
- the title to display for the dialog (may be null to use default)dirBase
- base directory to display; if null or not an existing directory, the value under getLastDirectory() should be usedfilterDescription
- description to (possibly) show for the file name filter (may be null if no filter should be used)exts
- optional array of file extensions if filterDescription is not null- Returns:
- the File selected by the user, or null if the dialog was cancelled
-
promptForFile
Deprecated.Prompt user to select a file.- Parameters:
dirBase
- base directory to display; if null or not an existing directory, the value under getLastDirectory() should be used- Returns:
- the File selected by the user, or null if the dialog was cancelled
-
promptToSaveFile
public static File promptToSaveFile(String title, File dirBase, String defaultName, String filterName, String ext) Deprecated.Prompt user to select a file path to save.- Parameters:
title
- the title to display for the dialog (may be null)dirBase
- the base directory to display; if null or not an existing directory, the value under getLastDirectory() should be useddefaultName
- default file namefilterName
- description to show for the file name filter (may be null if no filter should be used)ext
- extension that should be used for the saved file (may be empty or null if not specified)- Returns:
- the File selected by the user, or null if the dialog was cancelled
-
promptToSaveFile
public static File promptToSaveFile(String title, File dirBase, String defaultName, Map<String, String> filters) Deprecated.Prompt user to select a file path to save, providing zero or more file extensions as an option.- Parameters:
title
- the title to display for the dialog (may be null)dirBase
- the base directory to display; if null or not an existing directory, the value under getLastDirectory() should be useddefaultName
- default file namefilters
- map of file type descriptions (keys) and file extensions (values); may be empty if an 'all files' filter should be used- Returns:
- the File selected by the user, or null if the dialog was cancelled
- Since:
- v0.4.0
-
promptForFilePathOrURL
public static String promptForFilePathOrURL(String title, String defaultPath, File dirBase, String filterDescription, String... exts) Deprecated.Prompt user to select a file or input a URL.- Parameters:
title
- dialog titledefaultPath
- default path to display - may be nulldirBase
- base directory to display; if null or not an existing directory, the value under getLastDirectory() should be usedfilterDescription
- description to (possibly) show for the file name filter (may be null if no filter should be used)exts
- optional array of file extensions if filterDescription is not null- Returns:
- the path to the file or URL, or null if no path was provided.
-
getChooser
Deprecated.Get aQuPathChooser
instance linked to a specific window. This may both influence the display of the chooser (by setting the parent window) and the starting directory (by remembering the last known directory for the chooser).- Parameters:
window
-- Returns:
- a
QuPathChooser
associated with the specified window.
-
builder
Deprecated.Create a new builder to generate a custom dialog.- Returns:
-