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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ColumnConstraintEditor<T>
getEditor(ColumnConstraint<T> columnConstraint, ColumnData<T> columnData)
Returns an editor initialized to the given columnConstraint.T
parseValue(java.lang.String value, java.lang.Object dataSource)
Parses the given string into a T object.java.lang.String
toString(T value)
Converts the T value into a string that can be parsed back by theparseValue(String, Object)
method.
-
-
-
Method Detail
-
getEditor
ColumnConstraintEditor<T> getEditor(ColumnConstraint<T> columnConstraint, ColumnData<T> columnData)
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
T parseValue(java.lang.String value, java.lang.Object dataSource)
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
java.lang.String toString(T value)
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.
-
-