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

Annotation of /PyGUI/Catalogpanel.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (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 : efrank 1.2 self.selected = None #remember last selected catalog entry
11 :     #..is used when LOAD button is hit.
12 :     button1= self.parent.OK_button
13 :     EVT_BUTTON(self.parent, self.parent.loadbtn.GetId(),
14 :     self.onLoadBtnPress)
15 : hwang 1.1
16 : efrank 1.2 return
17 : hwang 1.1
18 :     def InitLsCat(self):
19 :     b=BssFactory()
20 :     cpanel_list = b.getLsCat()
21 :    
22 :     for x in cpanel_list:
23 :     self.parent.catalog_listbox.Append(x[0], x[1])
24 :    
25 :     EVT_LISTBOX(self.parent, self.parent.catalog_listbox.GetId(), self.onLeftClick)
26 : efrank 1.2 return
27 : hwang 1.1
28 :     def onLeftClick(self,event):
29 :     pt=self.parent.catalog_listbox.GetSelection()
30 : efrank 1.2 self.selected =int (self.parent.catalog_listbox.GetClientData(pt))
31 :     return
32 : hwang 1.1
33 : efrank 1.2
34 :     def onLoadBtnPress(self, event):
35 :     wxBeginBusyCursor()
36 : hwang 1.1 b=BssFactory()
37 : efrank 1.2 top= b.getRecoElemById( self.selected )
38 : hwang 1.1 self.to_re.AddRecoElemTree(self.parent.rootId, top)
39 : efrank 1.2 wxEndBusyCursor()
40 :     return
41 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3