PageRenderTime 43ms CodeModel.GetById 21ms RepoModel.GetById 0ms 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
Possible License(s): LGPL-2.1, Apache-2.0
  1. from ui import Composite
  2. class Sink(Composite):
  3. def __init__(self):
  4. pass
  5. def onHide(self):
  6. pass
  7. def onShow(self):
  8. pass
  9. def baseURL(self):
  10. return ""
  11. class SinkInfo:
  12. def __init__(self, name, desc, object_type):
  13. self.name=name
  14. self.description=desc
  15. self.object_type=object_type
  16. self.instance=None
  17. def createInstance(self):
  18. return self.object_type()
  19. def getDescription(self):
  20. return self.description
  21. def getInstance(self):
  22. if self.instance==None:
  23. self.instance=self.createInstance()
  24. return self.instance
  25. def getName(self):
  26. return self.name