PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/examples/addonsgallery/Sink.py

http://pyjamas.googlecode.com/
Python | 36 lines | 32 code | 4 blank | 0 comment | 0 complexity | d2bc7c06aaf5e0eac83ba3c84505accb MD5 | raw file
 1from ui import Composite
 2
 3class Sink(Composite):
 4    def __init__(self):
 5        pass
 6    
 7    def onHide(self):
 8        pass
 9        
10    def onShow(self):
11        pass
12
13    def baseURL(self):
14        return ""
15
16class SinkInfo:
17    def __init__(self, name, desc, object_type):
18        self.name=name
19        self.description=desc
20        self.object_type=object_type
21        self.instance=None
22
23    def createInstance(self):
24        return self.object_type()
25
26    def getDescription(self):
27        return self.description
28
29    def getInstance(self):
30        if self.instance==None:
31            self.instance=self.createInstance()
32        return self.instance
33    
34    def getName(self):
35        return self.name
36