本文整理汇总了Python中DOM.createDiv方法的典型用法代码示例。如果您正苦于以下问题:Python DOM.createDiv方法的具体用法?Python DOM.createDiv怎么用?Python DOM.createDiv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOM
的用法示例。
在下文中一共展示了DOM.createDiv方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createTD
# 需要导入模块: import DOM [as 别名]
# 或者: from DOM import createDiv [as 别名]
def createTD(self, styleName) :
""" Create a new table cell with a specific style name.
@param styleName the style name
@return the new cell {@link Element}
"""
tdElem = DOM.createTD()
inner = DOM.createDiv()
DOM.appendChild(tdElem, inner)
self.setStyleName(tdElem, styleName)
self.setStyleName(inner, styleName + "Inner")
print "createTd", styleName
return tdElem
示例2: __init__
# 需要导入模块: import DOM [as 别名]
# 或者: from DOM import createDiv [as 别名]
def __init__(self):
""" Creates an empty vertical split panel.
"""
SplitPanel.__init__(self, DOM.createDiv(),
DOM.createDiv(),
self.preventBoxStyles(DOM.createDiv()),
self.preventBoxStyles(DOM.createDiv()))
self.container = self.preventBoxStyles(DOM.createDiv())
self.buildDOM()
self.setStyleName("gwt-VerticalSplitPanel")
self.impl = ImplVerticalSplitPanel(self)
self.setSplitPosition("50%")
# Captures the height of the top container when drag resizing starts.
self.initialTopHeight = 0
# Captures the offset of a user's mouse pointer during drag resizing.
self.initialThumbPos = 0
self.lastSplitPosition = ""
示例3: __init__
# 需要导入模块: import DOM [as 别名]
# 或者: from DOM import createDiv [as 别名]
def __init__(self, width, height):
self.context = None
self.setElement(DOM.createDiv())
canvas = DOM.createElement("canvas")
self.setWidth(width)
self.setHeight(height)
canvas.width = width
canvas.height = height
DOM.appendChild(self.getElement(), canvas)
self.setStyleName("gwt-Canvas")
self.init()
self.context.fillStyle = "black"
self.context.strokeStyle = "black"
示例4: __init__
# 需要导入模块: import DOM [as 别名]
# 或者: from DOM import createDiv [as 别名]
def __init__(self, templateName, allowEdit=False):
ComplexPanel.__init__(self)
self.loaded = False # Set after widgets are attached
self.widgetsAttached = False
self.id = None
self.templateName = None
self.title = None
self.elementsById = {}
self.metaTags = {}
self.body = None
self.links = []
self.forms = []
self.metaTagList = []
self.loadListeners = []
self.toAttach = []
self.toInsert = []
self.setElement(DOM.createDiv())
self.editor = None
self.allowEdit = allowEdit
if templateName:
self.loadTemplate(templateName)
示例5: getBodyElement
# 需要导入模块: import DOM [as 别名]
# 或者: from DOM import createDiv [as 别名]
import DOM
def getBodyElement():
JS(""" return $doc.body; """)
def write(text):
global data, element
data += text
DOM.setInnerHTML(element, data)
def writebr(text):
write(text + r"<BR>\n")
data = ""
element = DOM.createDiv()
DOM.appendChild(getBodyElement(), element)
示例6: __init__
# 需要导入模块: import DOM [as 别名]
# 或者: from DOM import createDiv [as 别名]
def __init__(self):
ComplexPanel.__init__(self)
self.setElement(DOM.createDiv())
DOM.setStyleAttribute(self.getElement(), "overflow", "hidden")