Class JDoubleNumberSpinnerPreference

java.lang.Object
megamek.client.ui.preferences.PreferenceElement
megamek.client.ui.preferences.JDoubleNumberSpinnerPreference
All Implemented Interfaces:
EventListener, ChangeListener

@Deprecated(since="0.51.0", forRemoval=true) public class JDoubleNumberSpinnerPreference extends PreferenceElement implements ChangeListener
Deprecated, for removal: This API element is subject to removal in a future version.
JDoubleNumberSpinnerPreference monitors the value of a JSpinner whose number model is for a double. It sets the saved value when a dialog is loaded and changes it as it changes.

Call preferences.manage(new JDoubleNumberSpinnerPreference(JSpinner)) to use this preference, on a JSpinner with a double valued SpinnerNumberModel that has called setName

  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Cleans the preference resources.
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the current value for the preference.
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the initial value for the preference.
    void
    setDoubleValue(double doubleValue)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class megamek.client.ui.preferences.PreferenceElement

    getName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JDoubleNumberSpinnerPreference

      public JDoubleNumberSpinnerPreference(JSpinner spinner) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      Exception
  • Method Details

    • getWeakReference

      public WeakReference<JSpinner> getWeakReference()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getDoubleValue

      public double getDoubleValue()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setDoubleValue

      public void setDoubleValue(double doubleValue)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getValue

      protected String getValue()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: PreferenceElement
      Gets the current value for the preference.
      Specified by:
      getValue in class PreferenceElement
      Returns:
      the value of the preference.
    • initialize

      protected void initialize(String value) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: PreferenceElement
      Sets the initial value for the preference.
      Specified by:
      initialize in class PreferenceElement
      Parameters:
      value - initial value.
      Throws:
      Exception - if there's an error during initialization
    • dispose

      protected void dispose()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: PreferenceElement
      Cleans the preference resources.
      Specified by:
      dispose in class PreferenceElement
    • stateChanged

      public void stateChanged(ChangeEvent evt)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      stateChanged in interface ChangeListener