Class AbstractComponentValue<T,​C extends JComponent>

    • Constructor Detail

      • AbstractComponentValue

        protected AbstractComponentValue​(C component)
        Instantiates a new nullable AbstractComponentValue
        Parameters:
        component - the component
        Throws:
        NullPointerException - in case component is null
      • AbstractComponentValue

        protected AbstractComponentValue​(C component,
                                         T nullValue)
        Instantiates a new AbstractComponentValue
        Parameters:
        component - the component
        nullValue - the value to use instead of null
        Throws:
        NullPointerException - in case component is null
    • Method Detail

      • get

        public final T get()
        Specified by:
        get in interface Supplier<T>
      • setValue

        protected final void setValue​(T value)
        Description copied from class: AbstractValue
        Sets the actual internal value.
        Specified by:
        setValue in class AbstractValue<T>
        Parameters:
        value - the value
      • getComponentValue

        protected abstract T getComponentValue()
        Returns the value from the underlying component
        Returns:
        the value from the underlying component
        See Also:
        component()
      • setComponentValue

        protected abstract void setComponentValue​(T value)
        Sets the given value in the underlying component. Note that this method is called on the EDT.
        Parameters:
        value - the value to display in the underlying component
        See Also:
        component()