Package qupath.lib.gui.dialogs
Class ParameterPanelFX
java.lang.Object
qupath.lib.gui.dialogs.ParameterPanelFX
A panel for displaying a list of parameters suitably to aid with creating JavaFX GUIs.
- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add aParameterChangeListener
to be notified as parameters are modified by the user.getPane()
Get thePane
that can be displayed.boolean
Returns true if a parameter exists with the given key and is enabled (and is therefore editable).boolean
getParameterEnabled
(Parameter<?> param) Returns true if a parameter is enabled (and is therefore editable).Get theParameterList
displayed in this panel.protected TextField
getTextField
(Parameter<?> param, int cols) void
Remove aParameterChangeListener
.boolean
setNumericParameterValue
(String key, Number value) Set a numeric parameter value (either int or double).boolean
setNumericParameterValueRange
(String key, double minValue, double maxValue) Set the minimum and maximum value for a numeric parameter.void
setParameterEnabled
(String key, boolean enabled) Set the enabled status of a parameter by key, to determine if it can be edited.void
setParameterEnabled
(Parameter<?> param, boolean enabled) Set the enabled status of a parameter, to determine if it can be edited.protected static void
setTextFieldFromNumber
(TextField text, Number value, String unit)
-
Constructor Details
-
ParameterPanelFX
Create a ParameterPanelFX.- Parameters:
params
-
-
-
Method Details
-
getParameters
Get theParameterList
displayed in this panel.- Returns:
-
getPane
Get thePane
that can be displayed.- Returns:
-
addParameterChangeListener
Add aParameterChangeListener
to be notified as parameters are modified by the user.- Parameters:
listener
-- See Also:
-
removeParameterChangeListener
Remove aParameterChangeListener
.- Parameters:
listener
-- See Also:
-
setTextFieldFromNumber
-
getTextField
-
getParameterEnabled
Returns true if a parameter exists with the given key and is enabled (and is therefore editable).- Parameters:
key
-- Returns:
-
getParameterEnabled
Returns true if a parameter is enabled (and is therefore editable).- Parameters:
param
-- Returns:
-
setParameterEnabled
Set the enabled status of a parameter by key, to determine if it can be edited.- Parameters:
key
-enabled
-
-
setParameterEnabled
Set the enabled status of a parameter, to determine if it can be edited.- Parameters:
param
-enabled
-
-
setNumericParameterValue
Set a numeric parameter value (either int or double). The reason for using this method rather than setting the parameter value directly is that it ensures that any displayed components (text fields, sliders...) are updated accordingly.- Parameters:
key
-value
-- Returns:
-
setNumericParameterValueRange
Set the minimum and maximum value for a numeric parameter. If the parameter is being displayed with a slider, the slider range will also be updated accordingly.- Parameters:
key
-minValue
-maxValue
-- Returns:
-