Interface IUIDoubleValueComponent

All Superinterfaces:
IComponent, ICustomDataProvider, IGProp<GProp<?>[]>, IMessageBox, IPropCnr, IUIComp, IUIValueComponent, IVSComponentListener, IVSComponentState, IVSFieldListener
All Known Subinterfaces:
IUIDoubleRangeValueComponent
All Known Implementing Classes:
EUIProgress, EUISlider, UIProgress, UISlider

public interface IUIDoubleValueComponent extends IUIValueComponent
Interface implemented by value supporting components with a double value.
Author:
Christopher Mindus
  • Method Details

    • createValueProp

      default NumberProp createValueProp()
      Component must return the value property to use with the name Atom.VALUE.
      Specified by:
      createValueProp in interface IUIValueComponent
      Returns:
      NumberProp for double support,
    • setValue

      default boolean setValue(double value) throws IllegalArgumentException
      Sets the value of the component as a double.
      Parameters:
      value - The double value.
      Returns:
      true for value changed, false for no change.
      Throws:
      IllegalArgumentException - If the value is out of range (e.g. for a spinner with value range).
    • getValue

      default double getValue() throws NotFoundException
      Gets the value of the component as a double.
      Returns:
      The double value of the component.
      Throws:
      NotFoundException - If the value is undefined.
    • getValueOrDefault

      default double getValueOrDefault()
      Gets the value of the component as a double without throwing an exception as opposed to getValue() but falls back to the default value if undefined.
      Returns:
      The double value of the component, or the default value if undefined.
    • getDefaultValue

      double getDefaultValue()
      Gets the default value of the component as a double.
      Returns:
      The default double value of the component.