Class IntegerEditorProvider<T extends java.lang.Number & java.lang.Comparable<T>>
- java.lang.Object
-
- docking.widgets.table.constraint.provider.IntegerEditorProvider<T>
-
- Type Parameters:
T
- the number type of the column (Byte, Short, Integer, or Long)
- All Implemented Interfaces:
EditorProvider<T>
- Direct Known Subclasses:
IntegerRangeEditorProvider
,LongEditorProvider
public class IntegerEditorProvider<T extends java.lang.Number & java.lang.Comparable<T>> extends java.lang.Object implements EditorProvider<T>
Base class for providing single value numeric editors.
-
-
Field Summary
Fields Modifier and Type Field Description protected LongConverter<T>
converter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnConstraintEditor<T>
getEditor(ColumnConstraint<T> columnConstraint, ColumnData<T> columnDataSource)
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 theEditorProvider.parseValue(String, Object)
method.
-
-
-
Field Detail
-
converter
protected LongConverter<T extends java.lang.Number & java.lang.Comparable<T>> converter
-
-
Method Detail
-
getEditor
public ColumnConstraintEditor<T> getEditor(ColumnConstraint<T> columnConstraint, ColumnData<T> columnDataSource)
Description copied from interface:EditorProvider
Returns an editor initialized to the given columnConstraint.- Specified by:
getEditor
in interfaceEditorProvider<T extends java.lang.Number & java.lang.Comparable<T>>
- Parameters:
columnConstraint
- the constraint whose value is to be edited.columnDataSource
- the context of the data in the table.- Returns:
- an editor initialized to the given columnConstraint.
-
parseValue
public T parseValue(java.lang.String value, java.lang.Object dataSource)
Description copied from interface:EditorProvider
Parses the given string into a T object.- Specified by:
parseValue
in interfaceEditorProvider<T extends java.lang.Number & java.lang.Comparable<T>>
- Parameters:
value
- the value to parse.dataSource
- the table's context object.- Returns:
- a new T object created by parsing the given string.
-
toString
public java.lang.String toString(T value)
Description copied from interface:EditorProvider
Converts the T value into a string that can be parsed back by theEditorProvider.parseValue(String, Object)
method.- Specified by:
toString
in interfaceEditorProvider<T extends java.lang.Number & java.lang.Comparable<T>>
- Parameters:
value
- the value to convert to a parsable string.- Returns:
- The parsable string fromthe T value.
-
-