Example #1
0
class FloatsInput(NumbersInputBase):
    """
    List of float tags
    """
    _model_name = Unicode('FloatsInputModel').tag(sync=True)
    _view_name = Unicode('FloatsInputView').tag(sync=True)

    value = List(CFloat(), help='List of float tags').tag(sync=True)
    format = NumberFormat('.1f').tag(sync=True)
Example #2
0
class IntsInput(NumbersInputBase):
    """
    List of int tags
    """
    _model_name = Unicode('IntsInputModel').tag(sync=True)
    _view_name = Unicode('IntsInputView').tag(sync=True)

    value = List(CInt(), help='List of int tags').tag(sync=True)
    format = NumberFormat('.3g').tag(sync=True)
    min = CInt(default_value=None, allow_none=True).tag(sync=True)
    max = CInt(default_value=None, allow_none=True).tag(sync=True)
Example #3
0
class IntTextSlider(_BoundedInt):
    """An integer text element  that you can slide for changing its value."""

    format = NumberFormat('d').tag(sync=True)
    step = CInt(1, help="Minimum step to increment the value").tag(sync=True)

    _view_name = Unicode('IntTextSliderView').tag(sync=True)
    _view_module = Unicode(module_name).tag(sync=True)
    _model_name = Unicode('IntTextSliderModel').tag(sync=True)
    _model_module = Unicode(module_name).tag(sync=True)
    _view_module_version = Unicode(module_version).tag(sync=True)
    _model_module_version = Unicode(module_version).tag(sync=True)
Example #4
0
class FloatTextSlider(_BoundedFloat):
    """A float text element  that you can slide for changing its value."""

    format = NumberFormat('.1f').tag(sync=True)
    step = CFloat(0.1, help="Minimum step to increment the value").tag(sync=True)

    _view_name = Unicode('FloatTextSliderView').tag(sync=True)
    _view_module = Unicode(module_name).tag(sync=True)
    _model_name = Unicode('FloatTextSliderModel').tag(sync=True)
    _model_module = Unicode(module_name).tag(sync=True)
    _view_module_version = Unicode(module_version).tag(sync=True)
    _model_module_version = Unicode(module_version).tag(sync=True)
Example #5
0
class NumberFormatTrait(HasTraits):
    value = NumberFormat(".3f")