Package qupath.lib.plugins.parameters
Class BooleanParameter
java.lang.Object
qupath.lib.plugins.parameters.BooleanParameter
- All Implemented Interfaces:
Serializable,Parameter<Boolean>
Parameter that can take on true of false value - or null.
May be displayed as a checkbox.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionCreate a new Parameter with the same text and value.Get a default value to use if the Parameter has not been otherwise set.Get a description of the meaning of the Parameter; may be displayed e.g.Get some prompt text that may be displayed to a user.getValue()Get the current set value (may be null).Get the current set value, or any default if no value has been set.booleanQuery whether getHelpText() returns a meaningful String (as opposed to null).booleanisHidden()Test is the 'hidden' flag is set for the parameter.booleanisValidInput(Boolean value) Query if a specified value would be valid for this parameter.voidSet last value to null (so default can be used).voidsetHidden(boolean hidden) Mark that a parameter should not be displayed to a user.booleansetStringLastValue(Locale locale, String value) Set last value using a string; implementing classes may need to parse thisbooleanSet the Parameter to have a specified value.toString()
-
Field Details
-
lastValue
-
-
Method Details
-
setStringLastValue
Description copied from interface:ParameterSet last value using a string; implementing classes may need to parse this- Parameters:
locale-value-- Returns:
-
isValidInput
Description copied from interface:ParameterQuery if a specified value would be valid for this parameter.- Parameters:
value-- Returns:
- true if the value would be valid, false otherwise
-
duplicate
Description copied from interface:ParameterCreate a new Parameter with the same text and value.- Returns:
-
setHidden
public void setHidden(boolean hidden) Description copied from interface:ParameterMark that a parameter should not be displayed to a user. This is useful, for example, if a parameter list changes the parameters to be displayed depending upon the image available or current settings, e.g. using different parameters when the pixel size is known in microns. -
isHidden
public boolean isHidden()Description copied from interface:ParameterTest is the 'hidden' flag is set for the parameter. -
getDefaultValue
Description copied from interface:ParameterGet a default value to use if the Parameter has not been otherwise set.- Specified by:
getDefaultValuein interfaceParameter<S>- Returns:
-
getValue
Description copied from interface:ParameterGet the current set value (may be null). -
resetValue
public void resetValue()Description copied from interface:ParameterSet last value to null (so default can be used).- Specified by:
resetValuein interfaceParameter<S>
-
getValueOrDefault
Description copied from interface:ParameterGet the current set value, or any default if no value has been set.- Specified by:
getValueOrDefaultin interfaceParameter<S>- Returns:
- See Also:
-
getPrompt
Description copied from interface:ParameterGet some prompt text that may be displayed to a user. -
setValue
Description copied from interface:ParameterSet the Parameter to have a specified value. -
toString
-
hasHelpText
public boolean hasHelpText()Description copied from interface:ParameterQuery whether getHelpText() returns a meaningful String (as opposed to null).- Specified by:
hasHelpTextin interfaceParameter<S>- Returns:
-
getHelpText
Description copied from interface:ParameterGet a description of the meaning of the Parameter; may be displayed e.g. as a tooltip.- Specified by:
getHelpTextin interfaceParameter<S>- Returns:
-