Class IntegerRangeConstraintEditor<T extends java.lang.Number>
- java.lang.Object
-
- docking.widgets.table.constrainteditor.AbstractColumnConstraintEditor<T>
-
- docking.widgets.table.constrainteditor.IntegerRangeConstraintEditor<T>
-
- Type Parameters:
T- Integer-type number
- All Implemented Interfaces:
ColumnConstraintEditor<T>
public class IntegerRangeConstraintEditor<T extends java.lang.Number> extends AbstractColumnConstraintEditor<T>
A constraint editor for specifying ranges of integer-type numbers (Byte, Short, Integer, and Long).
-
-
Field Summary
-
Fields inherited from class docking.widgets.table.constrainteditor.AbstractColumnConstraintEditor
currentConstraint, INVALID_INPUT_COLOR, VALID_INPUT_COLOR
-
-
Constructor Summary
Constructors Change Constructor Description IntegerRangeConstraintEditor(ColumnConstraint<T> constraint, LongConverter<T> converter)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Change Modifier and Type Method Description NEW protected java.awt.ComponentbuildInlineEditorComponent()Delegate the construction of the inline editor component.NEW protected booleancheckEditorValueValidity()Template method that subclasses must implement.java.lang.StringgetErrorMessage()If the editor contains and invalid value, this message should indicate why the value is invalid.NEW protected ColumnConstraint<T>getValueFromComponent()Get the constraints' new value from the editor component.voidreset()Reset the editor to a known-good state.NEW protected voidupdateEditorComponent()Indicates to subclasses that the constraint has changed, and the user interface needs to be updated to reflect the new state.NEW protected voidupdateInfoMessage(boolean isValid)-
Methods inherited from class docking.widgets.table.constrainteditor.AbstractColumnConstraintEditor
addChangeListener, buildDetailEditorComponent, formatStatus, getDetailComponent, getInlineComponent, getValue, hasEditorComponents, hasValidValue, notifyConstraintChanged, removeChangeListener, setValue, valueChanged
-
-
-
-
Constructor Detail
-
IntegerRangeConstraintEditor
public IntegerRangeConstraintEditor(ColumnConstraint<T> constraint, LongConverter<T> converter)
Constructor.- Parameters:
constraint- Integer-type constraint for which this component is an editor.converter- Utility class to convert integer types to Long-type for internal operation.
-
-
Method Detail
-
buildInlineEditorComponent NEW
protected java.awt.Component buildInlineEditorComponent()
Description copied from class:AbstractColumnConstraintEditorDelegate the construction of the inline editor component.- Specified by:
buildInlineEditorComponentin classAbstractColumnConstraintEditor<T extends java.lang.Number>- Returns:
- the editors inline component
- See Also:
AbstractColumnConstraintEditor.getInlineComponent()
-
updateInfoMessage NEW
protected void updateInfoMessage(boolean isValid)
- Specified by:
updateInfoMessagein classAbstractColumnConstraintEditor<T extends java.lang.Number>
-
reset
public void reset()
Description copied from interface:ColumnConstraintEditorReset the editor to a known-good state.
-
getErrorMessage
public java.lang.String getErrorMessage()
Description copied from interface:ColumnConstraintEditorIf the editor contains and invalid value, this message should indicate why the value is invalid. Only called if hasValidValue() returns false.- Returns:
- an error message, or an empty string if no error
-
getValueFromComponent NEW
protected ColumnConstraint<T> getValueFromComponent()
Description copied from class:AbstractColumnConstraintEditorGet the constraints' new value from the editor component. This expects the UI to have been constructed.- Specified by:
getValueFromComponentin classAbstractColumnConstraintEditor<T extends java.lang.Number>- Returns:
- See Also:
AbstractColumnConstraintEditor.getValue()
-
checkEditorValueValidity NEW
protected boolean checkEditorValueValidity()
Description copied from class:AbstractColumnConstraintEditorTemplate 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:
checkEditorValueValidityin classAbstractColumnConstraintEditor<T extends java.lang.Number>- Returns:
- true if the UI defines a valid value, false otherwise
- See Also:
ColumnConstraintEditor.hasValidValue()
-
updateEditorComponent NEW
protected void updateEditorComponent()
Description copied from class:AbstractColumnConstraintEditorIndicates to subclasses that the constraint has changed, and the user interface needs to be updated to reflect the new state.- Specified by:
updateEditorComponentin classAbstractColumnConstraintEditor<T extends java.lang.Number>
-
-