[Bio] / PyGUI / Catalogpanel.py Repository:
ViewVC logotype

Annotation of /PyGUI/Catalogpanel.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : hwang 1.1 from wxPython.wx import *
2 :     from FaST.BssFactory import BssFactory
3 :     from FaST.RecoElem import RecoElem
4 :     from RecoElempanel import RecoElemWindow
5 :    
6 :     class CatalogWindow:
7 :     def __init__(self, parent):
8 :     self.parent = parent
9 :     self.to_re = parent.re
10 :    
11 :    
12 :     def InitLsCat(self):
13 :     b=BssFactory()
14 :     cpanel_list = b.getLsCat()
15 :    
16 :     for x in cpanel_list:
17 :     self.parent.catalog_listbox.Append(x[0], x[1])
18 :    
19 :     EVT_LISTBOX(self.parent, self.parent.catalog_listbox.GetId(), self.onLeftClick)
20 :    
21 :     def onLeftClick(self,event):
22 :     pt=self.parent.catalog_listbox.GetSelection()
23 :     print "pt is ", pt
24 :     clickednum =int (self.parent.catalog_listbox.GetClientData(pt))
25 :     print "clicknum is", clickednum
26 :    
27 :     b=BssFactory()
28 :     top= b.getRecoElemById(clickednum)
29 :    
30 :     self.to_re.AddRecoElemTree(self.parent.rootId, top)
31 :     print "done adding to re"
32 :    
33 :    
34 :    
35 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3