Inherits from
- TraitHandler: enthought.traits.trait_handlers.TraitHandler
Attributes
- high
high = property(_get_high)
- low
low = property(_get_low)
Inherited from base classes
Method summary
- __init__(self, low_name, high_name, default = None, is_float = True, exclude_low = False, exclude_high = False)
- float_validate(self, object, name, value)
- get_editor(self, trait)
- info(self)
- int_validate(self, object, name, value)
- long_validate(self, object, name, value)
Inherited from base classes
- arg_error(self, method, arg_num, object, name, value)
- create_editor(self)
- dup_arg_error(self, method, arg_num, object, name)
- error(self, object, name, value)
- full_info(self, object, name, value)
- 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)
- validate(self, object, name, value)
Methods
- __init__(self, low_name, high_name, default = None, is_float = True, exclude_low = False, exclude_high = False)
Creates a TraitRange handler.
Parameters
- low_name : Str
- The minimum value that the trait can accept as a trait on the object.
- high_name : Str
- The maximum value that the trait can accept as a trait on the object.
- default : Float/Int/Long
- The default value of the trait.
- is_float : Boolean
- Is the value a floating point value or not.
- exclude_low : Boolean
- Should the low value be exclusive (or inclusive)
- exclude_high : Boolean
- Should the high value be exclusive (or inclusive)
Description
The low_name and high_name traits must be of the same Python numeric type, either int, long or float. Alternatively, one of the values may be None, to indicate that that portion of the range is unbounded. The exclude_low and exclude_high values can be used to specify whether the low and high values should be exclusive (or inclusive).
- float_validate(self, object, name, value)
- get_editor(self, trait)
- info(self)
- int_validate(self, object, name, value)
- long_validate(self, object, name, value)