##// END OF EJS Templates
Cleaned up python widget classes
Jonathan Frederic -
Show More
@@ -1,12 +1,9 b''
1 import os
2
3 1 from base import Widget
4 2 from IPython.utils.traitlets import Unicode, Bool, List
5 3
6 4 class BoolWidget(Widget):
7 5 target_name = Unicode('BoolWidgetModel')
8 6 default_view_name = Unicode('CheckboxView')
9 js_requirements = List(["static/notebook/js/widgets/bool.js"])
10 7 _keys = ['value', 'description', 'disabled']
11 8
12 9 value = Bool(False)
@@ -1,12 +1,7 b''
1 import os
2
3 1 from base import Widget
4 from IPython.utils.traitlets import Unicode, List
5 from IPython.utils.javascript import display_all_js
2 from IPython.utils.traitlets import Unicode
6 3
7 4 class ContainerWidget(Widget):
8 5 target_name = Unicode('container_widget')
9 6 default_view_name = Unicode('ContainerView')
10 js_requirements = List(["static/notebook/js/widgets/container.js"])
11 7
No newline at end of file
12 _keys = []
@@ -1,13 +1,9 b''
1 import os
2
3 1 from base import Widget
4 2 from IPython.utils.traitlets import Unicode, Float, Bool, List
5 from IPython.utils.javascript import display_all_js
6 3
7 4 class FloatRangeWidget(Widget):
8 5 target_name = Unicode('FloatRangeWidgetModel')
9 6 default_view_name = Unicode('FloatSliderView')
10 js_requirements = List(["static/notebook/js/widgets/float_range.js"])
11 7 _keys = ['value', 'step', 'max', 'min', 'disabled', 'orientation']
12 8
13 9 value = Float(0.0)
@@ -1,13 +1,9 b''
1 import os
2
3 1 from base import Widget
4 2 from IPython.utils.traitlets import Unicode, Int, Bool, List
5 from IPython.utils.javascript import display_all_js
6 3
7 4 class IntRangeWidget(Widget):
8 5 target_name = Unicode('IntRangeWidgetModel')
9 6 default_view_name = Unicode('IntSliderView')
10 js_requirements = List(["static/notebook/js/widgets/int_range.js"])
11 7 _keys = ['value', 'step', 'max', 'min', 'disabled', 'orientation']
12 8
13 9 value = Int(0)
@@ -1,13 +1,9 b''
1 import os
2
3 1 from base import Widget
4 2 from IPython.utils.traitlets import Unicode, List, Bool
5 from IPython.utils.javascript import display_all_js
6 3
7 4 class SelectionWidget(Widget):
8 5 target_name = Unicode('SelectionWidgetModel')
9 6 default_view_name = Unicode('DropdownView')
10 js_requirements = List(["static/notebook/js/widgets/selection.js"])
11 7 _keys = ['value', 'values', 'disabled']
12 8
13 9 value = Unicode()
@@ -1,14 +1,10 b''
1 import os
2
3 1 from base import Widget
4 2 from IPython.utils.traitlets import Unicode, Bool, List
5 from IPython.utils.javascript import display_all_js
6 3
7 4 class StringWidget(Widget):
8 5 target_name = Unicode('StringWidgetModel')
9 6 default_view_name = Unicode('TextboxView')
10 js_requirements = List(["static/notebook/js/widgets/string.js"])
11 _keys = ['value', 'row_count', 'disabled']
7 _keys = ['value', 'disabled']
12 8
13 9 value = Unicode()
14 10 disabled = Bool(False) # Enable or disable user changes
General Comments 0
You need to be logged in to leave comments. Login now