In [2]:
import com.twosigma.beaker.widgets.integers.IntSlider
w = new IntSlider()
w.value = 60
display(w)
Out[2]:
In [3]:
w.value
Out[3]:
In [4]:
w.value =76
Out[4]:
In [5]:
w.description = "desc1"
Out[5]:
In [6]:
w.disabled = false
//w.disabled = trw.tooltip = "ToggleButton tooltip 2"ue
Out[6]:
In [7]:
w.max = 200
w.min = 50
Out[7]:
In [8]:
w.orientation = "horizontal"
//w.orientation = "vertical"
Out[8]:
In [9]:
w.slider_color = "#087636"
Out[9]:
In [10]:
w.step = 20
Out[10]:
In [11]:
w.visible = true
//w.visible = false
Out[11]:
In [12]:
import com.twosigma.beaker.widgets.integers.IntProgress
bar = new IntProgress()
bar.value = 10
display(bar)
Out[12]:
In [13]:
bar.value
Out[13]:
In [14]:
bar.value =110
Out[14]:
In [15]:
bar.max = 300
bar.min = 50
Out[15]:
In [16]:
bar.step = 20
Out[16]:
In [17]:
bar.orientation = "horizontal"
//bar.orientation = "vertical"
Out[17]:
In [18]:
import com.twosigma.beaker.widgets.selections.RadioButtons
rb = new RadioButtons()
rb.options=['1', '2', '3', '4', '5']
rb.value = "4"
display(rb)
Out[18]:
In [19]:
rb.value
Out[19]:
In [20]:
rb.value ="1"
Out[20]:
In [21]:
import com.twosigma.beaker.widgets.selections.Select
select = new Select()
select.options=['Linux', 'Windows', 'OSX']
select.value = "Windows"
display(select)
Out[21]:
In [22]:
select.value
Out[22]:
In [23]:
select.value = "Linux"
Out[23]:
In [24]:
import com.twosigma.beaker.widgets.bools.Checkbox
cb = new Checkbox()
display(cb)
Out[24]:
In [25]:
cb.value
Out[25]:
In [26]:
cb.value = true
Out[26]:
In [27]:
import com.twosigma.beaker.widgets.ColorPicker
cp = new ColorPicker()
cp.value = "blue"
display(cp)
Out[27]:
In [28]:
cp.value
Out[28]:
In [29]:
cp.value ="red"
Out[29]:
In [30]:
cp.concise = false
//cp.concise = true
Out[30]:
In [31]:
import com.twosigma.beaker.widgets.strings.Text
t = new Text()
t.value = "Text example 1"
display(t)
Out[31]:
In [32]:
t.value
Out[32]:
In [33]:
t.value ="Text example 2"
Out[33]:
In [34]:
import com.twosigma.beaker.widgets.strings.Textarea
ta = new Textarea()
ta.value = "Textarea example 1"
display(ta)
Out[34]:
In [35]:
ta.value
Out[35]:
In [36]:
ta.value ="Textarea example 2"
Out[36]:
In [37]:
import com.twosigma.beaker.widgets.bools.ToggleButton
tb = new ToggleButton()
tb.tooltip = "ToggleButton tooltip 1"
display(tb)
Out[37]:
In [38]:
tb.value
Out[38]:
In [39]:
tb.value = true
//tb.value = false
Out[39]:
In [40]:
tb.tooltip = "ToggleButton tooltip 2"
Out[40]:
In [41]:
import com.twosigma.beaker.widgets.floats.FloatSlider
fs = new FloatSlider()
fs.value = 10.1
display(fs)
Out[41]:
In [42]:
fs.value
Out[42]:
In [43]:
fs.value = 22.2
Out[43]:
In [44]:
import com.twosigma.beaker.widgets.floats.FloatProgress
floatProgress = new FloatProgress()
floatProgress.value = 10.2
display(floatProgress)
Out[44]:
In [45]:
floatProgress.value
Out[45]:
In [46]:
floatProgress.value = 33.3
Out[46]:
In [47]:
import com.twosigma.beaker.widgets.strings.Label
label = new Label()
label.value = "Label 1"
display(label)
Out[47]:
In [48]:
label.value
Out[48]:
In [49]:
label.value = "Label 2"
Out[49]:
In [50]:
import com.twosigma.beaker.widgets.strings.HTML
label = new HTML()
label.value = "Hello <b>World</b>"
display(label)
Out[50]:
In [51]:
label.value = "<b>Hello World</b>"
Out[51]:
In [52]:
import com.twosigma.beaker.widgets.Image
import java.nio.file.Files
byte[] picture = Files.readAllBytes(new File("widgetArch.png").toPath());
image = new Image()
image.format='png'
image.value= picture
image.width=300
image.height=400
display(image)
Out[52]:
In [53]:
import com.twosigma.beaker.widgets.DatePicker
datePicker = new DatePicker()
display(datePicker)
Out[53]:
In [54]:
datePicker.value
Out[54]:
In [55]:
import com.twosigma.beaker.widgets.integers.IntRangeSlider
w = new IntRangeSlider()
w.value = [10,40]
w.orientation = "horizontal"
//w.orientation = "vertical"
display(w)
Out[55]:
In [56]:
import com.twosigma.beaker.widgets.integers.BoundedIntText
w = new BoundedIntText()
w.min = 0
w.max = 10
display(w)
Out[56]:
In [57]:
import com.twosigma.beaker.widgets.integers.IntText
w = new IntText()
display(w)
Out[57]:
In [58]:
import com.twosigma.beaker.widgets.integers.IntText
w = new IntText()
display(w)
Out[58]:
In [59]:
import com.twosigma.beaker.widgets.integers.Play
w = new Play()
display(w)
Out[59]:
In [60]:
import com.twosigma.beaker.widgets.floats.FloatRangeSlider
w = new FloatRangeSlider()
w.value = [10,40]
w.orientation = "horizontal"
//w.orientation = "vertical"
display(w)
Out[60]:
In [61]:
import com.twosigma.beaker.widgets.floats.BoundedFloatText
w = new BoundedFloatText()
w.min = 0
w.max = 10
display(w)
Out[61]:
In [62]:
import com.twosigma.beaker.widgets.floats.FloatText
w = new FloatText()
display(w)
Out[62]:
In [63]:
//Example with passing different type to value
import com.twosigma.beaker.widgets.integers.IntRangeSlider
w = new IntRangeSlider()
w.value = ["10",[49.6]]
w.orientation = "horizontal"
//w.orientation = "vertical"
display(w)
Out[63]:
In [64]:
//Example with passing different type to value
import com.twosigma.beaker.widgets.integers.IntRangeSlider
import java.util.Collection
Collection<Object> list = new ArrayList<>()
list.add(["19"])
list.add("53")
w = new IntRangeSlider()
w.value = list
w.orientation = "horizontal"
//w.orientation = "vertical"
display(w)
Out[64]:
In [65]:
import com.twosigma.beaker.widgets.bools.Valid
w = new Valid()
w.description = 'Valid!'
w.value = true
w.disabled = false
display(w)
Out[65]:
In [66]:
import com.twosigma.beaker.widgets.selectioncontainer.Accordion
import com.twosigma.beaker.widgets.bools.Valid
import com.twosigma.beaker.widgets.floats.BoundedFloatText
import com.twosigma.beaker.widgets.strings.Text
t = new Text()
t.value = "Text example 1"
valid = new Valid()
valid.description = 'Valid!'
valid.value = true
valid.disabled = false
accordion = new Accordion([t , valid], ['t' , 'valid']);
//accordion.set_title(0, 'Text')
//accordion.set_title(1, 'Valid')
display(accordion)
Out[66]:
In [ ]: