Class DoubleRangeConstraintEditor
- java.lang.Object
-
- docking.widgets.table.constrainteditor.AbstractColumnConstraintEditor<java.lang.Double>
-
- docking.widgets.table.constrainteditor.DoubleRangeConstraintEditor
-
- All Implemented Interfaces:
ColumnConstraintEditor<java.lang.Double>
public class DoubleRangeConstraintEditor extends AbstractColumnConstraintEditor<java.lang.Double>
A constraint editor for specifying ranges of floating-point numbers (Float and Double)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDISPLAY_FORMATstatic java.lang.StringFLOATING_POINT_FORMAT-
Fields inherited from class docking.widgets.table.constrainteditor.AbstractColumnConstraintEditor
currentConstraint, INVALID_INPUT_COLOR, VALID_INPUT_COLOR
-
-
Constructor Summary
Constructors Constructor Description DoubleRangeConstraintEditor(ColumnConstraint<java.lang.Double> constraint)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.awt.ComponentbuildInlineEditorComponent()Delegate the construction of the inline editor component.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.protected ColumnConstraint<java.lang.Double>getValueFromComponent()Get the constraints' new value from the editor component.voidreset()Reset the editor to a known-good state.protected voidupdateEditorComponent()Indicates to subclasses that the constraint has changed, and the user interface needs to be updated to reflect the new state.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
-
-
-
-
Field Detail
-
FLOATING_POINT_FORMAT
public static final java.lang.String FLOATING_POINT_FORMAT
- See Also:
- Constant Field Values
-
DISPLAY_FORMAT
public static final java.lang.String DISPLAY_FORMAT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DoubleRangeConstraintEditor
public DoubleRangeConstraintEditor(ColumnConstraint<java.lang.Double> constraint)
Constructor.- Parameters:
constraint- Floating-point constraint for which this component is an editor.
-
-
Method Detail
-
buildInlineEditorComponent
protected java.awt.Component buildInlineEditorComponent()
Description copied from class:AbstractColumnConstraintEditorDelegate the construction of the inline editor component.- Specified by:
buildInlineEditorComponentin classAbstractColumnConstraintEditor<java.lang.Double>- Returns:
- the editors inline component
- See Also:
AbstractColumnConstraintEditor.getInlineComponent()
-
updateInfoMessage
protected void updateInfoMessage(boolean isValid)
- Specified by:
updateInfoMessagein classAbstractColumnConstraintEditor<java.lang.Double>
-
updateEditorComponent
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<java.lang.Double>
-
reset
public void reset()
Description copied from interface:ColumnConstraintEditorReset the editor to a known-good state.
-
getValueFromComponent
protected ColumnConstraint<java.lang.Double> 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<java.lang.Double>- Returns:
- See Also:
AbstractColumnConstraintEditor.getValue()
-
checkEditorValueValidity
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<java.lang.Double>- Returns:
- true if the UI defines a valid value, false otherwise
- See Also:
ColumnConstraintEditor.hasValidValue()
-
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
-
-