def __init__(self): super(WebEmbedExample, self).__init__() e = Embedded('Google Search', ExternalResource('http://www.google.com')) e.setType(Embedded.TYPE_BROWSER) e.setWidth('100%') e.setHeight('400px') self.addComponent(e)
def generateCell(self, source, itemId, columnId): f = itemId if isinstance(f, FeatureSet): # no icon for sections return None resId = '75-' + f.getIconName() res = self._app.getSampleIcon(resId) emb = Embedded('', res) emb.setWidth('48px') emb.setHeight('48px') emb.setType(Embedded.TYPE_IMAGE) return emb