Interface EditorProvider<T>
- Type Parameters:
T
- the constraint type.
- All Known Implementing Classes:
IntegerEditorProvider
,IntegerRangeEditorProvider
,LongEditorProvider
,LongRangeEditorProvider
,UnsignedLongConstraintEditorProvider
,UnsignedLongRangeEditorProvider
public interface EditorProvider<T>
Class used by some generic constraints to fulfill their requirement to provide and editor. These types
of constraints are passed in an EditorProvider in their constructor. This allows these constraint
types to be created using generics without subclassing.
-
Method Summary
Modifier and TypeMethodDescriptiongetEditor
(ColumnConstraint<T> columnConstraint, ColumnData<T> columnData) Returns an editor initialized to the given columnConstraint.parseValue
(String value, Object dataSource) Parses the given string into a T object.Converts the T value into a string that can be parsed back by theparseValue(String, Object)
method.
-
Method Details
-
getEditor
Returns an editor initialized to the given columnConstraint.- Parameters:
columnConstraint
- the constraint whose value is to be edited.columnData
- the context of the data in the table.- Returns:
- an editor initialized to the given columnConstraint.
-
parseValue
Parses the given string into a T object.- Parameters:
value
- the value to parse.dataSource
- the table's context object.- Returns:
- a new T object created by parsing the given string.
-
toString
Converts the T value into a string that can be parsed back by theparseValue(String, Object)
method.- Parameters:
value
- the value to convert to a parsable string.- Returns:
- The parsable string fromthe T value.
-