Class DoubleParameter

java.lang.Object
qupath.lib.plugins.parameters.NumericParameter<Double>
qupath.lib.plugins.parameters.DoubleParameter
All Implemented Interfaces:
Serializable, Parameter<Double>

public class DoubleParameter extends NumericParameter<Double>
Parameter to represent a floating point numeric value.

May be bounded.

Author:
Pete Bankhead
See Also:
  • Field Details

    • lastValue

      protected Double lastValue
  • Method Details

    • setValue

      public boolean setValue(Double lastValue)
      Set the last value; this will apply a range check using clipping.
      Specified by:
      setValue in interface Parameter<Double>
      Parameters:
      lastValue -
      Returns:
    • setValueWithBoundsCheck

      public boolean setValueWithBoundsCheck(Double lastValue)
      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 class NumericParameter<Double>
      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 class NumericParameter<Double>
      Parameters:
      val -
      Returns:
    • duplicate

      public Parameter<Double> 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.
      Specified by:
      setHidden in interface Parameter<S>
      Parameters:
      hidden -
    • isHidden

      public boolean isHidden()
      Description copied from interface: Parameter
      Test is the 'hidden' flag is set for the parameter.
      Specified by:
      isHidden in interface Parameter<S>
      Returns:
    • getDefaultValue

      public Double getDefaultValue()
      Description copied from interface: Parameter
      Get a default value to use if the Parameter has not been otherwise set.
      Specified by:
      getDefaultValue in interface Parameter<S>
      Returns:
    • getValue

      public Double getValue()
      Description copied from interface: Parameter
      Get the current set value (may be null).
      Specified by:
      getValue in interface Parameter<S>
      Returns:
      See Also:
    • resetValue

      public void resetValue()
      Description copied from interface: Parameter
      Set last value to null (so default can be used).
      Specified by:
      resetValue in interface Parameter<S>
    • getValueOrDefault

      public Double getValueOrDefault()
      Description copied from interface: Parameter
      Get the current set value, or any default if no value has been set.
      Specified by:
      getValueOrDefault in interface Parameter<S>
      Returns:
      See Also:
    • getPrompt

      public String getPrompt()
      Description copied from interface: Parameter
      Get some prompt text that may be displayed to a user.
      Specified by:
      getPrompt in interface Parameter<S>
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hasHelpText

      public boolean hasHelpText()
      Description copied from interface: Parameter
      Query whether getHelpText() returns a meaningful String (as opposed to null).
      Specified by:
      hasHelpText in interface Parameter<S>
      Returns:
    • getHelpText

      public String 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 interface Parameter<S>
      Returns: