def __init__(self, **kwargs): if not kwargs.has_key('Spacing'): kwargs['Spacing'] = 0 if not kwargs.has_key('Padding'): kwargs['Padding'] = 0 self.horzAlign = HasHorizontalAlignment.ALIGN_LEFT self.vertAlign = HasVerticalAlignment.ALIGN_TOP CellPanel.__init__(self, **kwargs)
def insert(self, widget, beforeIndex): widget.removeFromParent() td = DOM.createTD() DOM.insertChild(self.tableRow, td, beforeIndex) CellPanel.insert(self, widget, td, beforeIndex) self.setCellHorizontalAlignment(widget, self.horzAlign) self.setCellVerticalAlignment(widget, self.vertAlign)
def __init__(self, **kwargs): if not kwargs.has_key('Spacing'): kwargs['Spacing'] = 0 if not kwargs.has_key('Padding'): kwargs['Padding'] = 0 self.horzAlign = HasHorizontalAlignment.ALIGN_LEFT self.vertAlign = HasVerticalAlignment.ALIGN_TOP self.center = None self.dock_children = [] # TODO: can self.children be used instead? CellPanel.__init__(self, **kwargs)
def remove(self, widget): if isinstance(widget, int): widget = self.getWidget(widget) if widget.getParent() != self: return False td = DOM.getParent(widget.getElement()) DOM.removeChild(self.tableRow, td) CellPanel.remove(self, widget) return True
def __init__(self, **kwargs): if not kwargs.has_key('Spacing'): kwargs['Spacing'] = 0 if not kwargs.has_key('Padding'): kwargs['Padding'] = 0 self.horzAlign = HasHorizontalAlignment.ALIGN_LEFT self.vertAlign = HasVerticalAlignment.ALIGN_TOP CellPanel.__init__(self, **kwargs) self.tableRow = DOM.createTR() DOM.appendChild(self.getBody(), self.tableRow)
def __init__(self, **kwargs): if not kwargs.has_key("Spacing"): kwargs["Spacing"] = 0 if not kwargs.has_key("Padding"): kwargs["Padding"] = 0 self.horzAlign = HasHorizontalAlignment.ALIGN_LEFT self.vertAlign = HasVerticalAlignment.ALIGN_TOP self.center = None self.dock_children = [] # TODO: can self.children be used instead? CellPanel.__init__(self, **kwargs)
def insert(self, widget, beforeIndex): widget.removeFromParent() tr = DOM.createTR() td = DOM.createTD() DOM.insertChild(self.getBody(), tr, beforeIndex) DOM.appendChild(tr, td) CellPanel.insert(self, widget, td, beforeIndex) self.setCellHorizontalAlignment(widget, self.horzAlign) self.setCellVerticalAlignment(widget, self.vertAlign)
def remove(self, widget): if widget == self.center: self.center = None ret = CellPanel.remove(self, widget) if ret: self.dock_children.remove(widget) self.realizeTable(None) return ret
def appendAndMaybeAdopt(self, parent, child, beingAdded): if beingAdded is not None: if DOM.compare(child, beingAdded.getElement()): CellPanel.add(self, beingAdded, parent) return DOM.appendChild(parent, child)