本文整理汇总了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)
示例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)
示例3: setMaxLength
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
def setMaxLength(self, length):
DOM.setIntAttribute(self.getElement(), "maxLength", length)
示例4: setPlaceholder
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
def setPlaceholder(self, placeholder):
DOM.setIntAttribute(self.getElement(), "placeholder", placeholder)
示例5: setSelectedIndex
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
def setSelectedIndex(self, index):
DOM.setIntAttribute(self.getElement(), "selectedIndex", index)
示例6: setVisibleItemCount
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
def setVisibleItemCount(self, visibleItems):
DOM.setIntAttribute(self.getElement(), "size", visibleItems)
示例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)
示例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)
示例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)
示例10: setHorizontalScrollPosition
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
def setHorizontalScrollPosition(self, position):
DOM.setIntAttribute(self.getElement(), "scrollLeft", position)
示例11: setScrollPosition
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
def setScrollPosition(self, position):
DOM.setIntAttribute(self.getElement(), "scrollTop", position)
示例12: setVisibleLines
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
def setVisibleLines(self, lines):
DOM.setIntAttribute(self.getElement(), "rows", lines)
示例13: setCharacterWidth
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import setIntAttribute [as 别名]
def setCharacterWidth(self, width):
DOM.setIntAttribute(self.getElement(), "cols", width)