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


Python VerticalPanel.setStyleName方法代码示例

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


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

示例1: __init__

# 需要导入模块: from pyjamas.ui import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel import setStyleName [as 别名]
    def __init__(self):
        Composite.__init__(self)
        panel = VerticalPanel()
        headerPanel = VerticalPanel()
        self.subject = HTML()
        self.sender = HTML()
        self.recipient = HTML()
        self.body = HTML()
        self.scroller = ScrollPanel(self.body)

        self.body.setWordWrap(True)

        headerPanel.add(self.subject)
        headerPanel.add(self.sender)
        headerPanel.add(self.recipient)
        headerPanel.setWidth("100%")

        innerPanel = DockPanel()
        innerPanel.add(headerPanel, DockPanel.NORTH)
        innerPanel.add(self.scroller, DockPanel.CENTER)

        innerPanel.setCellHeight(self.scroller, "100%")
        panel.add(innerPanel)
        innerPanel.setSize("100%", "100%")
        self.scroller.setSize("100%", "100%")
        self.initWidget(panel)

        self.setStyleName("mail-Detail")
        headerPanel.setStyleName("mail-DetailHeader")
        innerPanel.setStyleName("mail-DetailInner")
        self.subject.setStyleName("mail-DetailSubject")
        self.sender.setStyleName("mail-DetailSender")
        self.recipient.setStyleName("mail-DetailRecipient")
        self.body.setStyleName("mail-DetailBody")
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:36,代码来源:MailDetail.py

示例2: __init__

# 需要导入模块: from pyjamas.ui import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel import setStyleName [as 别名]
    def __init__(self):
        Composite.__init__(self)
        self.signOutLink = HTML("<a href='javascript:;'>Sign Out</a>")
        self.aboutLink = HTML("<a href='javascript:;'>About</a>")

        outer = HorizontalPanel()
        inner = VerticalPanel()

        outer.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT)
        inner.setHorizontalAlignment(HasAlignment.ALIGN_RIGHT)

        links = HorizontalPanel()
        links.setSpacing(4)
        links.add(self.signOutLink)
        links.add(self.aboutLink)

        outer.add(inner)
        inner.add(HTML("<b>Welcome back, [email protected]</b>"))
        inner.add(links)

        self.signOutLink.addClickListener(self)
        self.aboutLink.addClickListener(self)

        self.initWidget(outer)
        inner.setStyleName("mail-TopPanel")
        links.setStyleName("mail-TopPanelLinks")
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:28,代码来源:TopPanel.py

示例3: __init__

# 需要导入模块: from pyjamas.ui import VerticalPanel [as 别名]
# 或者: from pyjamas.ui.VerticalPanel import setStyleName [as 别名]
 def __init__(self, ):
     self.__init__._super()
     """
     New Showcase
     """
     vPanel = VerticalPanel()
     vPanel.setStyleName(u"gwittit-Stream_publish")
     innerPanel = VerticalPanel()
     innerPanel.setStyleName(u"innerPanel")
     innerPanel.setSpacing(10)
     publishButton = Button(u"PublishStream #1")
     helpText = Label(u"This will display a dialog where you can publish stream to your wall")
     publishButton2 = Button(u"PublishStream #2")
     helpText2 = HTML(java.str(u"This will publish a stream with the text <b>" + java.str(self.__class__.defaultUserMessage)) + u"</b> ( publish_stream must be granted )")
     publishButton3 = Button(u"PublisStream #3")
     helpText3 = HTML(u"This will prompt user to update his or her status")
     innerPanel.add(publishButton)
     innerPanel.add(helpText)
     vPanel.add(innerPanel)
     publishButton.addClickHandler(self.PublishStreamClickHandler(innerPanel, True))
     innerPanel = VerticalPanel()
     innerPanel.setSpacing(10)
     innerPanel.setStyleName(u"innerPanel")
     innerPanel.add(publishButton2)
     innerPanel.add(helpText2)
     vPanel.add(innerPanel)
     publishButton2.addClickHandler(self.PublishStreamClickHandler(innerPanel, False))
     innerPanel = VerticalPanel()
     innerPanel.setStyleName(u"innerPanel")
     innerPanel.add(publishButton3)
     innerPanel.add(helpText3)
     innerPanel.setSpacing(10)
     vPanel.add(innerPanel)
     publishButton3.addClickHandler(self.PublishStreamSimpleHandler())
     self.initWidget(vPanel)
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:37,代码来源:Stream_publish.py


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