Package docking.widgets.table.constrainteditor

# Class DateValueConstraintEditor

java.lang.Object
docking.widgets.table.constrainteditor.AbstractColumnConstraintEditor<LocalDate>
docking.widgets.table.constrainteditor.DateValueConstraintEditor

All Implemented Interfaces:
  `ColumnConstraintEditor<LocalDate>`

public class DateValueConstraintEditor extends AbstractColumnConstraintEditor<LocalDate>
A constraint editor for specifying comparison with a single Date value.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DATE_PATTERN`
  `static final DateTimeFormatter`
  `LOCAL_DATE_FORMAT`
  Specifies how Date values are to be formatted within the editor

  ### Fields inherited from class docking.widgets.table.constrainteditor.AbstractColumnConstraintEditor

  `currentConstraint, INVALID_INPUT_COLOR, VALID_INPUT_COLOR`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DateValueConstraintEditor(ColumnConstraint<LocalDate> constraint)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Component`
  `buildInlineEditorComponent()`
  Delegate the construction of the inline editor component.
  `protected boolean`
  `checkEditorValueValidity()`
  Template method that subclasses must implement.
  `String`
  `getErrorMessage()`
  If the editor contains and invalid value, this message should indicate why the value is invalid.
  `ColumnConstraint<LocalDate>`
  `getValueFromComponent()`
  Get the constraints' new value from the editor component.
  `void`
  `reset()`
  Reset the editor to a known-good state.
  `protected void`
  `updateEditorComponent()`
  Indicates to subclasses that the constraint has changed, and the user interface needs to be updated to reflect the new state.
  `protected void`
  `updateInfoMessage(boolean isValid)`

  ### Methods inherited from class docking.widgets.table.constrainteditor.AbstractColumnConstraintEditor

  `addChangeListener, buildDetailEditorComponent, formatStatus, getDetailComponent, getInlineComponent, getValue, hasEditorComponents, hasValidValue, notifyConstraintChanged, removeChangeListener, setValue, valueChanged`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DATE_PATTERN

    public static final String DATE_PATTERN
    See Also:
      - Constant Field Values

  - ### LOCAL_DATE_FORMAT

    public static final DateTimeFormatter LOCAL_DATE_FORMAT
    Specifies how Date values are to be formatted within the editor

- ## Constructor Details

  - ### DateValueConstraintEditor

    public DateValueConstraintEditor(ColumnConstraint<LocalDate> constraint)
    Constructor.
    Parameters:
      `constraint` - Date constraint for which this component is an editor.

- ## Method Details

  - ### buildInlineEditorComponent

    protected Component buildInlineEditorComponent()
    Description copied from class: `AbstractColumnConstraintEditor`
    Delegate the construction of the inline editor component.
    Specified by:
      `buildInlineEditorComponent` in class `AbstractColumnConstraintEditor<LocalDate>`
    Returns:
      the editors inline component
    See Also:
      - `AbstractColumnConstraintEditor.getInlineComponent()`

  - ### getValueFromComponent

    public ColumnConstraint<LocalDate> getValueFromComponent()
    Description copied from class: `AbstractColumnConstraintEditor`
    Get the constraints' new value from the editor component. This expects the UI to have been constructed.
    Specified by:
      `getValueFromComponent` in class `AbstractColumnConstraintEditor<LocalDate>`
    Returns:
      the value
    See Also:
      - `AbstractColumnConstraintEditor.getValue()`

  - ### updateEditorComponent

    protected void updateEditorComponent()
    Description copied from class: `AbstractColumnConstraintEditor`
    Indicates to subclasses that the constraint has changed, and the user interface needs to be updated to reflect the new state.
    Specified by:
      `updateEditorComponent` in class `AbstractColumnConstraintEditor<LocalDate>`

  - ### reset

    public void reset()
    Description copied from interface: `ColumnConstraintEditor`
    Reset the editor to a known-good state.

  - ### checkEditorValueValidity

    protected boolean checkEditorValueValidity()
    Description copied from class: `AbstractColumnConstraintEditor`
    Template method that subclasses must implement. This class will call this method whenever the value changes so that the validity state is updated.

    Only called when the editor component has been constructed and UI elements are defined.

    Specified by:
      `checkEditorValueValidity` in class `AbstractColumnConstraintEditor<LocalDate>`
    Returns:
      true if the UI defines a valid value, false otherwise
    See Also:
      - `ColumnConstraintEditor.hasValidValue()`

  - ### updateInfoMessage

    protected void updateInfoMessage(boolean isValid)
    Specified by:
      `updateInfoMessage` in class `AbstractColumnConstraintEditor<LocalDate>`

  - ### getErrorMessage

    public String getErrorMessage()
    Description copied from interface: `ColumnConstraintEditor`
    If the editor contains and invalid value, this message should indicate why the value is invalid. Only called if `hasValidValue()` returns false.
    Returns:
      an error message, or an empty string if no error