Class ParameterPanelFX

java.lang.Object
qupath.lib.gui.dialogs.ParameterPanelFX

public class ParameterPanelFX extends Object
A panel for displaying a list of parameters suitably to aid with creating JavaFX GUIs.
Author:
Pete Bankhead
  • Constructor Details

    • ParameterPanelFX

      public ParameterPanelFX(ParameterList params)
      Create a ParameterPanelFX.
      Parameters:
      params -
  • Method Details

    • getParameters

      public ParameterList getParameters()
      Get the ParameterList displayed in this panel.
      Returns:
    • getPane

      public Pane getPane()
      Get the Pane that can be displayed.
      Returns:
    • addParameterChangeListener

      public void addParameterChangeListener(ParameterChangeListener listener)
      Add a ParameterChangeListener to be notified as parameters are modified by the user.
      Parameters:
      listener -
      See Also:
    • removeParameterChangeListener

      public void removeParameterChangeListener(ParameterChangeListener listener)
      Parameters:
      listener -
      See Also:
    • setTextFieldFromNumber

      protected static void setTextFieldFromNumber(TextField text, Number value, String unit)
    • getTextField

      protected TextField getTextField(Parameter<?> param, int cols)
    • getParameterEnabled

      public boolean getParameterEnabled(String key)
      Returns true if a parameter exists with the given key and is enabled (and is therefore editable).
      Parameters:
      key -
      Returns:
    • getParameterEnabled

      public boolean getParameterEnabled(Parameter<?> param)
      Returns true if a parameter is enabled (and is therefore editable).
      Parameters:
      param -
      Returns:
    • setParameterEnabled

      public void setParameterEnabled(String key, boolean enabled)
      Set the enabled status of a parameter by key, to determine if it can be edited.
      Parameters:
      key -
      enabled -
    • setParameterEnabled

      public void setParameterEnabled(Parameter<?> param, boolean enabled)
      Set the enabled status of a parameter, to determine if it can be edited.
      Parameters:
      param -
      enabled -
    • setNumericParameterValue

      public boolean setNumericParameterValue(String key, Number value)
      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

      public boolean setNumericParameterValueRange(String key, double minValue, double maxValue)
      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: