Package qupath.lib.plugins.parameters
Class IntParameter
- All Implemented Interfaces:
Serializable
,Parameter<Integer>
Parameter to represent an integer numeric value.
May be bounded.
- Author:
- Pete Bankhead
- See Also:
-
Field Summary
-
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.boolean
Query whether getHelpText() returns a meaningful String (as opposed to null).boolean
isHidden()
Test is the 'hidden' flag is set for the parameter.void
Set last value to null (so default can be used).boolean
setDoubleLastValue
(double val) A class for setting the numeric value as a double (subclasses should convert this as needed).void
setHidden
(boolean hidden) Mark that a parameter should not be displayed to a user.boolean
Set the last value; this will apply a range check using clipping.boolean
setValueWithBoundsCheck
(Integer lastValue) Set the value of this parameter, constraining it to be within any lower and upper bounds if necessary.toString()
Methods inherited from class qupath.lib.plugins.parameters.NumericParameter
getLowerBound, getUnit, getUpperBound, hasLowerAndUpperBounds, hasLowerBound, hasUpperBound, isUnbounded, isValidInput, setRange, setStringLastValue
-
Field Details
-
lastValue
-
-
Method Details
-
setValue
Set the last value; this will apply a range check using clipping. -
setValueWithBoundsCheck
Description copied from class:NumericParameter
Set the value of this parameter, constraining it to be within any lower and upper bounds if necessary.- Specified by:
setValueWithBoundsCheck
in classNumericParameter<Integer>
- Parameters:
lastValue
-- Returns:
-
setDoubleLastValue
public boolean setDoubleLastValue(double val) Description copied from class:NumericParameter
A class for setting the numeric value as a double (subclasses should convert this as needed).- Specified by:
setDoubleLastValue
in classNumericParameter<Integer>
- Parameters:
val
-- Returns:
-
duplicate
Description copied from interface:Parameter
Create a new Parameter with the same text and value.- Returns:
-
setHidden
public void setHidden(boolean hidden) Description copied from interface:Parameter
Mark 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:Parameter
Test is the 'hidden' flag is set for the parameter. -
getDefaultValue
Description copied from interface:Parameter
Get a default value to use if the Parameter has not been otherwise set.- Specified by:
getDefaultValue
in interfaceParameter<S>
- Returns:
-
getValue
Description copied from interface:Parameter
Get the current set value (may be null). -
resetValue
public void resetValue()Description copied from interface:Parameter
Set last value to null (so default can be used).- Specified by:
resetValue
in interfaceParameter<S>
-
getValueOrDefault
Description copied from interface:Parameter
Get the current set value, or any default if no value has been set.- Specified by:
getValueOrDefault
in interfaceParameter<S>
- Returns:
- See Also:
-
getPrompt
Description copied from interface:Parameter
Get some prompt text that may be displayed to a user. -
toString
-
hasHelpText
public boolean hasHelpText()Description copied from interface:Parameter
Query whether getHelpText() returns a meaningful String (as opposed to null).- Specified by:
hasHelpText
in interfaceParameter<S>
- Returns:
-
getHelpText
Description copied from interface:Parameter
Get a description of the meaning of the Parameter; may be displayed e.g. as a tooltip.- Specified by:
getHelpText
in interfaceParameter<S>
- Returns:
-