Package docking.widgets.table.constrainteditor

# Class AutocompletingStringConstraintEditor

java.lang.Object
docking.widgets.table.constrainteditor.AbstractColumnConstraintEditor<T>
docking.widgets.table.constrainteditor.DataLoadingConstraintEditor<String>
docking.widgets.table.constrainteditor.AutocompletingStringConstraintEditor

All Implemented Interfaces:
  `ColumnConstraintEditor<String>`, `TaskListener`

public class AutocompletingStringConstraintEditor extends DataLoadingConstraintEditor<String>
An editor that provides suggestions of values that, according to StringColumnConstraint, match a user-supplied pattern.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected DropDownTextField<String>`
  `textField`

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

  `columnDataSource, statusLabel`

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

  `currentConstraint, INVALID_INPUT_COLOR, VALID_INPUT_COLOR`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AutocompletingStringConstraintEditor(StringColumnConstraint constraint, ColumnData<String> columnDataSource)`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Component`
  `buildDelegateInlineEditor()`
  Get the delegates' inline editor component
  `protected boolean`
  `checkEditorValueValidity()`
  Template method that subclasses must implement.
  `void`
  `clearColumnData()`
  Request that any state maintained by the delegate editor pertaining to column data be cleared.
  `void`
  `columnDataLoadCancelled()`
  Notification that the column data-load was cancelled.
  `void`
  `columnDataLoadComplete()`
  Notification that the column data-load has been completed.
  `protected void`
  `doUpdateEditorComponent()`
  Indicates the constraint has changed, and the user interface needs to be updated to reflect the new state.
  `protected ColumnConstraint<String>`
  `getValueFromComponent()`
  Get the constraints' new value from the editor component.
  `void`
  `handleColumnDataValue(String value)`
  A value has been read from the table (column); handle it in an editor-specific way.
  `protected void`
  `resetEditor()`
  Reset the delegate editor to a known state
  `protected void`
  `updateInfoMessage(boolean isValid)`

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

  `buildDelegateDetailEditor, buildDetailEditorComponent, buildInlineEditorComponent, getErrorMessage, reset, taskCancelled, taskCompleted, updateEditorComponent`

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

  `addChangeListener, 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

  - ### textField

    protected DropDownTextField<String> textField

- ## Constructor Details

  - ### AutocompletingStringConstraintEditor

    public AutocompletingStringConstraintEditor(StringColumnConstraint constraint, ColumnData<String> columnDataSource)
    Constructor.
    Parameters:
      `constraint` - String constraint for which this component is an editor
      `columnDataSource` - provides access to table data and. Must be non-null.

- ## Method Details

  - ### buildDelegateInlineEditor

    protected Component buildDelegateInlineEditor()
    Description copied from class: `DataLoadingConstraintEditor`
    Get the delegates' inline editor component
    Overrides:
      `buildDelegateInlineEditor` in class `DataLoadingConstraintEditor<String>`
    Returns:
      the inline editor for the delegate constraint

  - ### 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<String>`
    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<String>`

  - ### resetEditor

    protected void resetEditor()
    Description copied from class: `DataLoadingConstraintEditor`
    Reset the delegate editor to a known state
    Specified by:
      `resetEditor` in class `DataLoadingConstraintEditor<String>`
    See Also:
      - `DataLoadingConstraintEditor.reset()`

  - ### getValueFromComponent

    protected ColumnConstraint<String> 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 `DataLoadingConstraintEditor<String>`
    Returns:
      the value
    See Also:
      - `AbstractColumnConstraintEditor.getValue()`

  - ### handleColumnDataValue

    public void handleColumnDataValue(String value)
    Description copied from class: `DataLoadingConstraintEditor`
    A value has been read from the table (column); handle it in an editor-specific way.
    Specified by:
      `handleColumnDataValue` in class `DataLoadingConstraintEditor<String>`
    Parameters:
      `value` - the value read from the table (column)

  - ### columnDataLoadComplete

    public void columnDataLoadComplete()
    Description copied from class: `DataLoadingConstraintEditor`
    Notification that the column data-load has been completed.
    Overrides:
      `columnDataLoadComplete` in class `DataLoadingConstraintEditor<String>`

  - ### columnDataLoadCancelled

    public void columnDataLoadCancelled()
    Description copied from class: `DataLoadingConstraintEditor`
    Notification that the column data-load was cancelled.
    Overrides:
      `columnDataLoadCancelled` in class `DataLoadingConstraintEditor<String>`

  - ### clearColumnData

    public void clearColumnData()
    Description copied from class: `DataLoadingConstraintEditor`
    Request that any state maintained by the delegate editor pertaining to column data be cleared.
    Overrides:
      `clearColumnData` in class `DataLoadingConstraintEditor<String>`

  - ### doUpdateEditorComponent

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