Interface ColumnConstraintEditor<T>
- Type Parameters:
T
- the column type
- All Known Implementing Classes:
AbstractColumnConstraintEditor
,AutocompletingStringConstraintEditor
,BooleanConstraintEditor
,DataLoadingConstraintEditor
,DateRangeConstraintEditor
,DateValueConstraintEditor
,DoNothingColumnConstraintEditor
,DoubleRangeConstraintEditor
,DoubleValueConstraintEditor
,DummyConstraintEditor
,EnumConstraintEditor
,IntegerConstraintEditor
,IntegerRangeConstraintEditor
,MappedColumnConstraintEditor
,StringConstraintEditor
,UnsignedLongConstraintEditor
,UnsignedLongRangeConstraintEditor
public interface ColumnConstraintEditor<T>
Defines the contract for building user-interface elements for manipulating
constraint configuration.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(ChangeListener constraintEditorChangeListener) Register a callback handler for responding to changes made within the editorThe detail component resides in the configuration interface below the column and constraint selection widgets, and is afforded greater space.If the editor contains and invalid value, this message should indicate why the value is invalid.The inline component resides in the configuration interface on the same visual line as the column and constraint selection widgets.getValue()
Get the current value from the editor, in the form of a constraint.boolean
Determine if the editor contains a valid value; do the UI widgets and state match, is the state sensible for the constraint.void
removeChangeListener
(ChangeListener constraintEditorChangeListener) Remove a callback handler that was responding changes made within the editorvoid
reset()
Reset the editor to a known-good state.void
setValue
(ColumnConstraint<T> value) Set the current value within the editor
-
Method Details
-
getInlineComponent
Component getInlineComponent()The inline component resides in the configuration interface on the same visual line as the column and constraint selection widgets. It is intended to be a relatively small and simple interface for configuring the constraints' values.- Returns:
- the inline editor component
-
getDetailComponent
Component getDetailComponent()The detail component resides in the configuration interface below the column and constraint selection widgets, and is afforded greater space. It is intended to be a more feature-rich editor that provides greater insight or control of the constraints value definition.- Returns:
- the detail editor component
-
getValue
ColumnConstraint<T> getValue()Get the current value from the editor, in the form of a constraint.- Returns:
- the editors' current value
-
setValue
Set the current value within the editor- Parameters:
value
- the new value to set
-
reset
void reset()Reset the editor to a known-good state. -
hasValidValue
boolean hasValidValue()Determine if the editor contains a valid value; do the UI widgets and state match, is the state sensible for the constraint.- Returns:
- true if the configuration is valid, false otherwise
-
getErrorMessage
String getErrorMessage()If the editor contains and invalid value, this message should indicate why the value is invalid. Only called ifhasValidValue()
returns false.- Returns:
- an error message, or an empty string if no error
-
addChangeListener
Register a callback handler for responding to changes made within the editor- Parameters:
constraintEditorChangeListener
- listener callback
-
removeChangeListener
Remove a callback handler that was responding changes made within the editor- Parameters:
constraintEditorChangeListener
- listener callback
-