Package com.iizigo.prop.editor
Class LongRange
- java.lang.Object
- com.iizigo.prop.editor.LongRange
- All Implemented Interfaces:
IEntryValidator
public class LongRange extends java.lang.Object implements IEntryValidator
The LongRange validator, options[0] is "from:[to]", or not specified (accepts all Long values the property can set).- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description LongRange()Default constructor.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription(IPropertyEditorController controller, PropertyEditorInfo info, PropCnr[] parents, java.lang.String[] options)Gets a description of the validation options.java.lang.Stringvalidate(IPropertyEditorController controller, PropertyEditorInfo info, PropCnr[] parents, java.lang.String value, java.lang.String[] options)Validates the property value after editing.
Method Detail
validate
public java.lang.String validate(IPropertyEditorController controller, PropertyEditorInfo info, PropCnr[] parents, java.lang.String value, java.lang.String[] options)
Validates the property value after editing. If this is successful, null is returned. Otherwise an error message string is returned that can be used as the tooltip text.- Specified by:
validatein interfaceIEntryValidator- Parameters:
controller- The controller of the property editor.info- Information about the item being edited.parents- Property containers of the property.value- The string value to set.options- Validation options, may be null for none.- Returns:
- An error message or null for OK validation.
getDescription
public java.lang.String getDescription(IPropertyEditorController controller, PropertyEditorInfo info, PropCnr[] parents, java.lang.String[] options)
Gets a description of the validation options.- Specified by:
getDescriptionin interfaceIEntryValidator- Parameters:
controller- The controller of the property editor.info- Information about the item being edited.parents- Property containers of the property.options- Validation options, may be null for none.- Returns:
- The descriptive string that can be prepended with e.g. "Enter ";