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


Python DOM.createDiv方法代码示例

本文整理汇总了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
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:15,代码来源:decoratorpanel.py

示例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 = ""
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:26,代码来源:vertsplitpanel.py

示例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"
开发者ID:AwelEshetu,项目名称:cwm,代码行数:20,代码来源:Canvas.py

示例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)
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:23,代码来源:TemplatePanel.py

示例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)
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:18,代码来源:write.py

示例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")
开发者ID:Afey,项目名称:pyjs,代码行数:6,代码来源:test008.py


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