当前位置: 首页>>代码示例>>Python>>正文


Python DOM.setIntAttribute方法代码示例

本文整理汇总了Python中pyjamas.DOM.setIntAttribute方法的典型用法代码示例。如果您正苦于以下问题:Python DOM.setIntAttribute方法的具体用法?Python DOM.setIntAttribute怎么用?Python DOM.setIntAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyjamas.DOM的用法示例。


在下文中一共展示了DOM.setIntAttribute方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setVisibleLength

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setVisibleLength(self, length):
     DOM.setIntAttribute(self.getElement(), "size", length)
开发者ID:anandology,项目名称:pyjamas,代码行数:4,代码来源:TextBox.py

示例2: realizeTable

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
    def realizeTable(self, beingAdded):
        bodyElement = self.getBody()

        while DOM.getChildCount(bodyElement) > 0:
            DOM.removeChild(bodyElement, DOM.getChild(bodyElement, 0))

        rowCount = 1
        colCount = 1
        for child in self.dock_children:
            dir = child.getLayoutData().direction
            if dir == self.NORTH or dir == self.SOUTH:
                rowCount += 1
            elif dir == self.EAST or dir == self.WEST:
                colCount += 1

        rows = []
        for i in range(rowCount):
            rows.append(DockPanelTmpRow())
            rows[i].tr = DOM.createTR()
            DOM.appendChild(bodyElement, rows[i].tr)

        westCol = 0
        eastCol = colCount - 1
        northRow = 0
        southRow = rowCount - 1
        centerTd = None

        for child in self.dock_children:
            layout = child.getLayoutData()

            td = DOM.createTD()
            layout.td = td
            DOM.setAttribute(layout.td, "align", layout.hAlign)
            DOM.setStyleAttribute(layout.td, "verticalAlign", layout.vAlign)
            DOM.setAttribute(layout.td, "width", layout.width)
            DOM.setAttribute(layout.td, "height", layout.height)

            if layout.direction == self.NORTH:
                DOM.insertChild(rows[northRow].tr, td, rows[northRow].center)
                self.appendAndMaybeAdopt(td, child.getElement(), beingAdded)
                DOM.setIntAttribute(td, "colSpan", eastCol - westCol + 1)
                northRow += 1
            elif layout.direction == self.SOUTH:
                DOM.insertChild(rows[southRow].tr, td, rows[southRow].center)
                self.appendAndMaybeAdopt(td, child.getElement(), beingAdded)
                DOM.setIntAttribute(td, "colSpan", eastCol - westCol + 1)
                southRow -= 1
            elif layout.direction == self.WEST:
                row = rows[northRow]
                DOM.insertChild(row.tr, td, row.center)
                row.center += 1
                self.appendAndMaybeAdopt(td, child.getElement(), beingAdded)
                DOM.setIntAttribute(td, "rowSpan", southRow - northRow + 1)
                westCol += 1
            elif layout.direction == self.EAST:
                row = rows[northRow]
                DOM.insertChild(row.tr, td, row.center)
                self.appendAndMaybeAdopt(td, child.getElement(), beingAdded)
                DOM.setIntAttribute(td, "rowSpan", southRow - northRow + 1)
                eastCol -= 1
            elif layout.direction == self.CENTER:
                centerTd = td

        if self.center is not None:
            row = rows[northRow]
            DOM.insertChild(row.tr, centerTd, row.center)
            self.appendAndMaybeAdopt(centerTd, self.center.getElement(), beingAdded)
开发者ID:andreyvit,项目名称:pyjamas,代码行数:69,代码来源:DockPanel.py

示例3: setMaxLength

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setMaxLength(self, length):
     DOM.setIntAttribute(self.getElement(), "maxLength", length)
开发者ID:anandology,项目名称:pyjamas,代码行数:4,代码来源:TextBox.py

示例4: setPlaceholder

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setPlaceholder(self, placeholder):
     DOM.setIntAttribute(self.getElement(), "placeholder", placeholder)
开发者ID:anandology,项目名称:pyjamas,代码行数:4,代码来源:TextBox.py

示例5: setSelectedIndex

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setSelectedIndex(self, index):
     DOM.setIntAttribute(self.getElement(), "selectedIndex", index)
开发者ID:Afey,项目名称:pyjs,代码行数:4,代码来源:ListBox.py

示例6: setVisibleItemCount

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setVisibleItemCount(self, visibleItems):
     DOM.setIntAttribute(self.getElement(), "size", visibleItems)
开发者ID:Afey,项目名称:pyjs,代码行数:4,代码来源:ListBox.py

示例7: setRowSpan

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setRowSpan(self, row, column, rowSpan):
     DOM.setIntAttribute(self.ensureElement(row, column), "rowSpan", rowSpan)
开发者ID:Afey,项目名称:pyjs,代码行数:4,代码来源:FlexCellFormatter.py

示例8: setItemSelected

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setItemSelected(self, index, selected):
     self.checkIndex(index)
     option = DOM.getChild(self.getElement(), index)
     DOM.setIntAttribute(option, "selected", selected and 1 or 0)
开发者ID:Afey,项目名称:pyjs,代码行数:6,代码来源:ListBox.py

示例9: setColSpan

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setColSpan(self, row, column, colSpan):
     DOM.setIntAttribute(self.ensureElement(row, column), "colSpan", colSpan)
开发者ID:Afey,项目名称:pyjs,代码行数:4,代码来源:FlexCellFormatter.py

示例10: setHorizontalScrollPosition

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setHorizontalScrollPosition(self, position):
     DOM.setIntAttribute(self.getElement(), "scrollLeft", position)
开发者ID:FreakTheMighty,项目名称:pyjamas,代码行数:4,代码来源:ScrollPanel.py

示例11: setScrollPosition

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setScrollPosition(self, position):
     DOM.setIntAttribute(self.getElement(), "scrollTop", position)
开发者ID:FreakTheMighty,项目名称:pyjamas,代码行数:4,代码来源:ScrollPanel.py

示例12: setVisibleLines

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setVisibleLines(self, lines):
     DOM.setIntAttribute(self.getElement(), "rows", lines)
开发者ID:FreakTheMighty,项目名称:pyjamas,代码行数:4,代码来源:TextArea.py

示例13: setCharacterWidth

# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
 def setCharacterWidth(self, width):
     DOM.setIntAttribute(self.getElement(), "cols", width)
开发者ID:FreakTheMighty,项目名称:pyjamas,代码行数:4,代码来源:TextArea.py


注:本文中的pyjamas.DOM.setIntAttribute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。