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
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.static enumDeprecated.Possible buttons pressed in a yes/no/cancel dialog. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Dialogs.Builderbuilder()Deprecated.Create a new builder to generate a custom dialog.static qupath.lib.gui.dialogs.QuPathChoosergetChooser(Window window) Deprecated.Get aQuPathChooserinstance linked to a specific window.static FilepromptForDirectory(File dirBase) Deprecated.Prompt user to select a directory.static FilepromptForDirectory(String title, File dirBase) Deprecated.Prompt user to select a directory.static FilepromptForFile(File dirBase) Deprecated.Prompt user to select a file.static FilepromptForFile(String title, File dirBase, String filterDescription, String... exts) Deprecated.Prompt the user for a file with some kind of file dialog.static StringpromptForFilePathOrURL(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 FileDeprecated.Prompt user to select a file path to save.static FileDeprecated.Prompt user to select a file path to save, providing zero or more file extensions as an option.static <T> TshowChoiceDialog(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> TshowChoiceDialog(String title, String message, T[] choices, T defaultChoice) Deprecated.Show a choice dialog with an array of choices (selection from ComboBox or similar).static booleanshowConfirmDialog(String title, String text) Deprecated.Show a confirm dialog (OK/Cancel).static booleanshowConfirmDialog(String title, Node node) Deprecated.Show a confirm dialog (OK/Cancel).static voidshowErrorMessage(String title, String message) Deprecated.Show an error message.static voidshowErrorMessage(String title, Throwable e) Deprecated.Show an error message, displaying the localized message of aThrowable.static voidshowErrorMessage(String title, Node node) Deprecated.Show an error message, with the content defined within aNode.static voidshowErrorNotification(String title, String message) Deprecated.Show an error notification.static voidshowErrorNotification(String title, Throwable e) Deprecated.Show an error notification, displaying the localized message of aThrowable.static voidshowInfoNotification(String title, String message) Deprecated.Show an info notification.static DoubleshowInputDialog(String title, String message, Double initialInput) Deprecated.Show an input dialog requesting a numeric value.static StringshowInputDialog(String title, String message, String initialInput) Deprecated.Show an input dialog requesting a String input.static booleanshowMessageDialog(String title, String message) Deprecated.Show a standard message dialog.static booleanshowMessageDialog(String title, Node node) Deprecated.Show a message dialog (OK button only), with the content contained within a Node.static voidshowNoImageError(String title) Deprecated.Show an error message that no image is available.static voidshowNoProjectError(String title) Deprecated.Show an error message that no project is available.static booleanshowParameterDialog(String title, ParameterList params) Deprecated.Show a (modal) dialog for a specified ParameterList.static voidshowPlainMessage(String title, String message) Deprecated.Show a plain message.static voidshowPlainNotification(String title, String message) Deprecated.Show a plain notification.static voidshowTextWindow(Window owner, String title, String contents, Modality modality, boolean isEditable) Deprecated.Show a window containing plain text, with the specified properties.static voidshowWarningNotification(String title, String message) Deprecated.Show a warning notification.static Dialogs.DialogButtonshowYesNoCancelDialog(String title, String text) Deprecated.Show a Yes/No/Cancel dialog.static booleanshowYesNoDialog(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.DialogButtonindicating 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
nullif 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
nullif 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 aQuPathChooserinstance 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
QuPathChooserassociated with the specified window.
-
builder
Deprecated.Create a new builder to generate a custom dialog.- Returns:
-