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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd aParameterChangeListenerto be notified as the user modifies parameters.getPane()Get thePanethat can be displayed.booleanReturns true if a parameter exists with the given key and is enabled (and is therefore editable).booleangetParameterEnabled(Parameter<?> param) Returns true if a parameter is enabled (and is therefore editable).Get theParameterListdisplayed in this panel.protected TextFieldgetTextField(Parameter<?> param, int cols, String key) voidRemove aParameterChangeListener.booleansetNumericParameterValue(String key, Number value) Set a numeric parameter value (either int or double).booleansetNumericParameterValueRange(String key, double minValue, double maxValue) Set the minimum and maximum value for a numeric parameter.voidsetParameterEnabled(String key, boolean enabled) Set the enabled status of a parameter by key, to determine if it can be edited.voidsetParameterEnabled(Parameter<?> param, boolean enabled) Set the enabled status of a parameter, to determine if it can be edited.protected static voidsetTextFieldFromNumber(TextField text, Number value, String unit)
-
Constructor Details
-
ParameterPanelFX
Create a ParameterPanelFX.- Parameters:
params-
-
-
Method Details
-
getParameters
Get theParameterListdisplayed in this panel.- Returns:
-
getPane
Get thePanethat can be displayed.- Returns:
-
addParameterChangeListener
Add aParameterChangeListenerto be notified as the user modifies parameters.- 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:
-