Interface Parameter

All Superinterfaces:
ConfigParameter
All Known Subinterfaces:
ActionParameter, BooleanParameter, ColorParameter, DirectoryParameter, EnablerParameter, FileParameter, FloatParameter, HyperlinkParameter, InfoParameter, IntListParameter, IntParameter, LabelParameter, ParameterGroup, ParameterTabFolder, ParameterWithSuffix, PasswordParameter, StringListParameter, StringParameter, UIParameter
All Known Implementing Classes:
ActionParameterImpl, BooleanParameterImpl, ColorParameterImpl, DirectoryParameterImpl, FileParameterImpl, FloatParameterImpl, HyperlinkParameterImpl, InfoParameterImpl, IntListParameterImpl, IntParameterImpl, LabelParameterImpl, ParameterGroupImpl, ParameterImpl, ParameterTabFolderImpl, PasswordParameterImpl, StringListParameterImpl, StringParameterImpl, UIParameterImpl, UITextAreaImpl

public interface Parameter extends ConfigParameter
represents a generic parameter description
  • Field Details

  • Method Details

    • setEnabled

      void setEnabled(boolean enabled)
      Sets whether the UI object for this parameter is enabled (changeable) or disabled (not changeable, and usually grayed out)
      Parameters:
      enabled - The new enabled state
      Since:
      2.3.0.0
    • isEnabled

      boolean isEnabled()
      Retrieves the enabled state for the UI object for this parameter
      Returns:
      The enabled state
      Since:
      2.3.0.0
    • getMinimumRequiredUserMode

      int getMinimumRequiredUserMode()
      Gets the lowest user mode required for this parameter to be displayed.
      Returns:
      MODE_ constants above
      Since:
      3.0.5.3
    • setMinimumRequiredUserMode

      void setMinimumRequiredUserMode(int mode)
      Sets the lowest user mode required for this parameter to be displayed.
      Parameters:
      mode - see MODE_ constants defined above
      Since:
      3.0.5.3
    • setVisible

      void setVisible(boolean visible)
      Sets whether the UI object for this parameter is visible to the user
      Parameters:
      visible - The new visibility state
      Since:
      2.3.0.4
    • isVisible

      boolean isVisible()
      Retrieves the visiblility state for the UI object for this parameter
      Returns:
      The visibility state
      Since:
      2.3.0.4
    • setGenerateIntermediateEvents

      void setGenerateIntermediateEvents(boolean b)
      Controls whether or not 'parameter change' events are fired for each incremental value change
      Parameters:
      b -
      Since:
      3.0.5.1
    • getGenerateIntermediateEvents

      boolean getGenerateIntermediateEvents()
      Returns:
      Since:
      3.0.5.1
    • addListener

      void addListener(ParameterListener l)
      Adds a listener triggered when the parameter is changed by the user
      Parameters:
      l - Listener to add
      Since:
      2.1.0.2
    • addAndFireListener

      void addAndFireListener(ParameterListener l)
    • removeListener

      void removeListener(ParameterListener l)
      Removes a previously added listener
      Parameters:
      l - Listener to remove.
      Since:
      2.1.0.2
    • addValidator

      void addValidator(ParameterValidator validator)
      Adds a validator to this parameter. The Validator will be called when the user tries to change the value.

      For parameters that have a text field, the validator will be called on each edit of the field. This allows you to notify the user of a potential error while they type.

      Subclasses may have helper functions that cast the "toValue" for you.

      Since:
      BiglyBT 1.9.0.1
    • getLabelText

      String getLabelText()
      Retrieve the actual text of the label associated with this parameter. This is the text after it has been looked up in the language bundle.
      Returns:
      The label's text
      Since:
      2.3.0.6
    • setLabelText

      void setLabelText(String sText)
      Set the text of the label associated to with this parameter to the literal text supplied.
      Parameters:
      sText - The actual text to assign to the label
      Since:
      2.3.0.6
    • getLabelKey

      String getLabelKey()
      Retrieve the language bundle key for the label associated with this parameter.
      Returns:
      The language bundle key, or null if the label is using literal text
      Since:
      2.3.0.6
    • setLabelKey

      void setLabelKey(String sLabelKey)
      Set the label to use the supplied language bundle key for the label associated with this parameter
      Parameters:
      sLabelKey - The language bundle key to use.
      Since:
      2.3.0.6
    • getConfigKeyName

      String getConfigKeyName()
    • hasBeenSet

      boolean hasBeenSet()
      Indicates if a value has been set for the parameter. If no value has been set, the default value will be used.

      To capture a "reset to default" event, you can addListener(ParameterListener) or ConfigParameter.addConfigParameterListener(ConfigParameterListener), and check if hasBeenSet is false.

    • setIndent

      void setIndent(int indent, boolean fancy)
      Since:
      BiglyBT 1.9.0.1
    • setAllowedUiTypes

      void setAllowedUiTypes(String... uiTypes)
    • isForUIType

      boolean isForUIType(String uiType)
    • resetToDefault

      boolean resetToDefault()
      Resets the parameter to its default value
      Returns:
      true - value was reset; false - already reset
    • getValueObject

      Object getValueObject()
      Retrieve the parameter's value as an Object. Subclasses will usually have a getValue() that will return a specific type.
      Since:
      BiglyBT 1.9.0.1