def add(self, widget, stackText="", asHTML=False):
        widget.removeFromParent()
        index = self.getWidgetCount()

        tr = DOM.createTR()
        td = DOM.createTD()
        DOM.appendChild(self.body, tr)
        DOM.appendChild(tr, td)
        self.setStyleName(td, "gwt-StackPanelItem", True)
        self._setIndex(td, index)
        DOM.setAttribute(td, "height", "1px")

        tr = DOM.createTR()
        td = DOM.createTD()
        DOM.appendChild(self.body, tr)
        DOM.appendChild(tr, td)
        DOM.setAttribute(td, "height", "100%")
        DOM.setAttribute(td, "vAlign", "top")

        CellPanel.add(self, widget, td)

        self.setStackVisible(index, False)
        if self.visibleStack == -1:
            self.showStack(0)

        if stackText != "":
            self.setStackText(self.getWidgetCount() - 1, stackText, asHTML)
dataset/ETHPy150Open anandology/pyjamas/library/gwt/ui/StackPanel.py/StackPanel.add/original