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

View of /PyGUI/Catalogpanel.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Mon Jul 28 22:31:13 2003 UTC (16 years, 4 months ago) by hwang
Branch: MAIN
*** empty log message ***

from wxPython.wx import *
from FaST.BssFactory import BssFactory
from FaST.RecoElem import RecoElem
from RecoElempanel import RecoElemWindow

class CatalogWindow:
    def __init__(self, parent):
        self.parent = parent
        self.to_re = parent.re 

        
    def InitLsCat(self):
        b=BssFactory()
        cpanel_list = b.getLsCat()
        
        for x in cpanel_list:
            self.parent.catalog_listbox.Append(x[0], x[1])
                      
        EVT_LISTBOX(self.parent, self.parent.catalog_listbox.GetId(), self.onLeftClick)

    def onLeftClick(self,event):
        pt=self.parent.catalog_listbox.GetSelection()
        print "pt is ", pt
        clickednum =int (self.parent.catalog_listbox.GetClientData(pt))
        print "clicknum is", clickednum

        b=BssFactory()
        top= b.getRecoElemById(clickednum)
        
        self.to_re.AddRecoElemTree(self.parent.rootId, top)
        print "done adding to re"

 
          
        

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3