Inherits from
- TraitType: enthought.traits.trait_handlers.TraitType
Attributes
Inherited from base classes
Method summary
- __init__(self, low = None, high = None, value = None, exclude_low = False, exclude_high = False, **metadata)
- create_editor(self)
- float_validate(self, object, name, value)
- full_info(self, object, name, value)
- init_fast_validator(self, *args)
- int_validate(self, object, name, value)
- long_validate(self, object, name, value)
- validate(self, object, name, value)
Inherited from base classes
- arg_error(self, method, arg_num, object, name, value)
- dup_arg_error(self, method, arg_num, object, name)
- error(self, object, name, value)
- get_editor(self, trait = None)
- info(self)
- inner_traits(self)
- is_valid(self, object, name, value)
- keyword_error(self, method, object, name, value)
- missing_arg_error(self, method, arg_num, object, name)
- repr(self, value)
- return_error(self, method, object, value)
Methods
- __init__(self, low = None, high = None, value = None, exclude_low = False, exclude_high = False, **metadata)
Creates a Range trait.
Parameters
- low : integer, float or string (i.e. extended trait name)
- The low end of the range.
- high : integer, float or string (i.e. extended trait name)
- The high end of the range.
- value : integer, float or string (i.e. extended trait name)
- The default value of the trait
- exclude_low : Boolean
- Indicates whether the low end of the range is exclusive.
- exclude_high : Boolean
- Indicates whether the high end of the range is exclusive.
The low, high, and value arguments must be of the same type (integer or float), except in the case where either low or high is a string (i.e. extended trait name).
Default Value
value; if value is None or omitted, the default value is low, unless low is None or omitted, in which case the default value is high.
- create_editor(self)
Returns the default UI editor for the trait.
- float_validate(self, object, name, value)
Validate that the value is a float value in the specified range.
- full_info(self, object, name, value)
Returns a description of the trait.
- init_fast_validator(self, *args)
Does nothing for the BaseRange class. Used in the Range class to set up the fast validator.
- int_validate(self, object, name, value)
Validate that the value is an int value in the specified range.
- long_validate(self, object, name, value)
Validate that the value is a long value in the specified range.
- validate(self, object, name, value)
Validate that the value is in the specified range.