Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
    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)
Ejemplo n.º 5
0
    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
Ejemplo n.º 6
0
    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)
Ejemplo n.º 7
0
    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
Ejemplo n.º 8
0
    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)
Ejemplo n.º 9
0
    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)
Ejemplo n.º 10
0
    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)
Ejemplo n.º 11
0
    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
Ejemplo n.º 12
0
    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
Ejemplo n.º 13
0
 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)
Ejemplo n.º 14
0
 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)