-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathocean_view.enaml
48 lines (47 loc) · 1.45 KB
/
ocean_view.enaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from enaml.stdlib.fields import IntField
OceanView(MainWindow):
attr model
attr plot
closed :: model.stop()
title = "Shallow Water Model"
Container:
constraints = [
hbox(plot_window, controls),
align('top', plot_window, controls),
plot_window.height >= 600,
plot_window.width >= 600,
]
GroupBox:
id: controls
title = "controls"
Label:
text = "Boundaries"
ComboBox:
id: mask
items = model.mask_list
value := model.mask_shape
Label:
text = "Latitude"
IntField:
id: lat
value := model.lat
Label:
text << "Size of initial bump (*Rs): %6.2f" % model.Lbump
FloatSlider:
minimum = 0.1
maximum = 10.0
value := model.Lbump
Label:
text << "Location of initial bump: %6d km" % int(model.Xbump / 1000)
FloatSlider:
minimum = 0
maximum << model.Lx
value := model.Xbump
ToggleButton:
text << model.run_text
checked := model.running
Label:
text << '%6.1f s' % model.t
EnableCanvas:
id: plot_window
component = plot.get_plot_component()