1 from pyjamas.ui.Composite import Composite
2 from pyjamas.ui.VerticalPanel import VerticalPanel
3 from pyjamas.ui.Hyperlink import Hyperlink
4
15
16 - def add(self, info):
22
23 - def find(self, sinkName):
28
30 if self.selectedSink <> -1:
31 self.vp_list.getWidget(self.selectedSink).removeStyleName("ks-SinkItem-selected")
32
33 for i in range(len(self.sinks)):
34 info = self.sinks[i]
35 if (info.getName()==name):
36 self.selectedSink = i
37 widget=self.vp_list.getWidget(self.selectedSink)
38 widget.addStyleName("ks-SinkItem-selected")
39 return
40
41
42 -class Sink(Composite):
54
56 - def __init__(self, name, desc, object_type):
57 self.name=name
58 self.description=desc
59 self.object_type=object_type
60 self.instance=None
61
63 obj = self.object_type()
64 obj.name = self.name
65 return obj
66
68 return self.description
69
74
77