• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python ui.VerticalPanel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Contacts

class Contacts(Composite):
    def __init__(self):
        Composite.__init__(self)
        self.contacts = []
        self.contacts.append(Contact("Benoit Mandelbrot", "[email protected]"))
        self.contacts.append(Contact("Albert Einstein", "[email protected]"))
        self.contacts.append(Contact("Rene Descartes", "[email protected]"))
        self.contacts.append(Contact("Bob Saget", "[email protected]"))
        self.contacts.append(Contact("Ludwig von Beethoven", "[email protected]"))
        self.contacts.append(Contact("Richard Feynman", "[email protected]"))
        self.contacts.append(Contact("Alan Turing", "[email protected]"))
        self.contacts.append(Contact("John von Neumann", "[email protected]"))

        self.panel = VerticalPanel()

        # Add all the contacts to the list.
        i = 0
        while (i < len(self.contacts)):
            self.addContact(self.contacts[i])
            i =  i + 1

        self.initWidget(self.panel)
        self.setStyleName("mail-Contacts")

    def addContact(self, contact):
        link = HTML("<a href='javascript:;'>" + contact.name + "</a>")
        self.panel.add(link)
        
        # Add a click listener that displays a ContactPopup when it is clicked.
        listener = ContactListener(contact, link)
        link.addClickListener(listener)
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:31,代码来源:Contacts.py


示例2: __init__

 def __init__(self, *a, **kw):
     self.wText = u"gwt-facebook is a library for writing facebook apps using GWT." + u"Click the menu on the left to browse showcases and see source code."
     self.outer = VerticalPanel()
     self.horizontalSplit = HorizontalPanel()
     self.authMethods = u"XAuth:auth_createToken,auth_expireSession,auth_getSession,auth_promoteSession,auth_revokeAuthorization,auth_revokeExtendedPermission"
     self.batchMethods = u"XBatch:batch_run"
     self.commentMethods = u"Comments:comments_xfbml,comments_add,comments_get,Xcomments_remove"
     self.connectMethods = u"Connect:connect_getUnconnect...,Xconnect_registerUsers,Xconnect_unregisterUsers"
     self.dataMethods = u"Data:data_getCookies,data_setCookie"
     self.eventMethods = u"Events:Xevents_cancel,events_create,Xevents_edit,events_get,events_getMembers,Xevents_rsvp"
     self.fbmlMethods = u"XFBML:fbml_deleteCustomTags,fbml_getCustomTags,fbml_refreshImgSrc,fbml_refreshRefUrl,fbml_registerCustomTags,fbml_setRefHandle"
     self.feedMethods = u"XFeed:feed_deactivateTemplateBundleByID,feed_getRegisteredTemplateBundleByID,feed_getRegisteredTemplateBundles,feed_publishTemplatizedAction,feed_publishUserAction,feed_registerTemplateBundle"
     self.fqlMethods = u"XFql:fql_multiquery,fql_query"
     self.friendMethods = u"Friends:friends_areFriends,friends_get,friends_getAppUsers,friends_getLists,friends_getMutualFriends"
     self.groupMethods = u"Groups:groups_get,Xgroups_getMembers"
     self.intlMethods = u"XIntl:intl_getTranslations,intl_uploadNativeStrings"
     self.linkMethods = u"XLinks:links_get,links_post"
     self.messageMethods = u"Message:XliveMessage_send,message_getThreadsInFolder"
     self.noteMethods = u"Notes:notes_create,Xnotes_delete,Xnotes_edit,notes_get"
     self.notificationMethods = u"Notification:notifications_get,notifications_getList,Xnotifications_markRead,notifications_sendEmail,Xnotifications_sendEmail"
     self.pageMethods = u"XPages:pages_getInfo,pages_isAdmin,pages_isAppAdded,pages_isFan"
     self.photoMethods = u"Photos:Xphotos_addTag,photos_createAlbum,photos_get,photos_getAlbums,Xphotos_getTags,Xphotos_upload"
     self.profileMethods = u"XProfile:profile_getFBML,profile_getInfo,profile_getInfoOptions,profile_setFBML,profile_setInfo,profile_setInfoOptions"
     self.smsMethods = u"XSMS:Xsms_canSend,sms_send"
     self.statusMethods = u"XStatus:status_get,status_set"
     self.streamMethods = u"Stream:Xstream_addComment,Xstream_addLike,stream_get,Xstream_getComments,Xstream_getFilters,stream_publish,stream_publishAttachment,Xstream_remove,Xstream_removeComment,Xstream_removeLike"
     self.userMethods = u"Users:users_getInfo,users_getLoggedInUser,Xusers_getStandardInfo,Xusers_hasAppPermission,Xusers_isAppUser,Xusers_isVerified,Xusers_setStatus"
     self.videoMethods = u"XVideo:video_getUploadLimits,video_upload"
     self.xfbml = u"FBML:various,serverFbml"
     self.menu = java.Array([self.authMethods, self.batchMethods, self.commentMethods, self.connectMethods, self.dataMethods, self.eventMethods, self.fbmlMethods, self.feedMethods, self.fqlMethods, self.friendMethods, self.groupMethods, self.intlMethods, self.linkMethods, self.messageMethods, self.noteMethods, self.notificationMethods, self.pageMethods, self.photoMethods, self.profileMethods, self.smsMethods, self.statusMethods, self.streamMethods, self.userMethods, self.videoMethods, self.xfbml])
     self.showcaseWrapper = VerticalPanel()
     self.loader = Image(u"/loader.gif")
     self.treeMenu = self.createMenu()
     self.apiClient = ApiFactory.getInstance()
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:34,代码来源:ShowcaseClient.py


示例3: __init__

 def __init__(self, ):
     self.__init__._super()
     outer = VerticalPanel()
     notesHolder = VerticalPanel()
     friendSelector = FriendSelector()
     outer.add(friendSelector)
     outer.add(notesHolder)
     class _anonymous(FriendSelectionHandler):
         
         @java.typed(Long)
         def onSelected(self, uid):
             notesHolder.clear()
             self.addLoader(notesHolder)
             class _anonymous(AsyncCallback):
                 
                 @java.typed(Throwable)
                 def onFailure(self, caught):
                     self.handleFailure(caught)
                 
                 @java.typed(List)
                 def onSuccess(self, result):
                     self.removeLoader(notesHolder)
                     if result.size() == 0:
                         notesHolder.add(HTML(u"User has not created any notes "))
                     for n in result:
                         notesHolder.add(HTML(u"Note Title : " + java.str(n.getTitle())))
             self.apiClient.notesGet(uid, _anonymous())
     friendSelector.addFriendSelectionHandler(_anonymous()) #  Let user select a friend and show notes
     self.initWidget(outer)
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:29,代码来源:Notes_get.py


示例4: SinkList

class SinkList(Composite):
    def __init__(self):
        Composite.__init__(self)
        self.vp_list=VerticalPanel()
        self.sinks=[]
        self.selectedSink=-1
        
        self.initWidget(self.vp_list)
        self.setStyleName("ks-List")

    def addSink(self, info):
        name = info.getName()
        link = Hyperlink(name, False, name)
        link.setStyleName("ks-SinkItem")
        self.vp_list.add(link)
        self.sinks.append(info)

    def find(self, sinkName):
        for info in self.sinks:
            if info.getName()==sinkName:
                return info
        return None

    def setSinkSelection(self, name):
        if self.selectedSink <> -1:
            self.vp_list.getWidget(self.selectedSink).removeStyleName("ks-SinkItem-selected")

        for i in range(len(self.sinks)):
            info = self.sinks[i]
            if (info.getName()==name):
                self.selectedSink = i
                widget=self.vp_list.getWidget(self.selectedSink)
                widget.addStyleName("ks-SinkItem-selected")
                return
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:34,代码来源:SinkList.py


示例5: __init__

 def __init__(self, ):
     self.__init__._super()
     outer = VerticalPanel()
     outer.addStyleName(u"gwittit-Showcase-Groups_get")
     self.addLoader(outer)
     class _anonymous(AsyncCallback):
         
         @java.typed(Throwable)
         def onFailure(self, caught):
             self.removeLoader(outer)
             self.handleFailure(caught)
         
         @java.typed(List)
         def onSuccess(self, groups):
             self.removeLoader(outer)
             for g in groups:
                 membersWrapper = VerticalPanel()
                 membersWrapper.addStyleName(u"membersWrapper")
                 memberLink = Anchor(u"See Members")
                 class _anonymous(ClickHandler):
                     
                     @java.typed(ClickEvent)
                     def onClick(self, event):
                         self.displayMembers(membersWrapper, g.getGid())
                 memberLink.addClickHandler(_anonymous())
                 outer.add(HTML(java.str(u"<h4>Group: " + java.str(g.getName())) + u"</h4>"))
                 outer.add(memberLink)
                 outer.add(membersWrapper)
     self.apiClient.groupsGet(None, _anonymous())
     self.initWidget(outer)
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:30,代码来源:Groups_get.py


示例6: Events_create

class Events_create(Showcase):

    """
    Showcase for method <code>events.create</code>
    """
    
    @java.init
    def __init__(self, *a, **kw):
        self.outer = VerticalPanel()
    
    @__init__.register
    @java.typed()
    def __init__(self, ):
        self.__init__._super()
        """
        Create showcase
        """
        self.initWidget(self.outer)
    
    def permissionGranted(self):
        eventEditor = EventEditor()
        self.outer.add(eventEditor)
    
    def getNeedPermission(self):
        return Permission.create_event
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:25,代码来源:Events_create.py


示例7: __init__

 def __init__(self, *a, **kw):
     self.outer = VerticalPanel()
     self.inputWrapper = VerticalPanel()
     self.responseWrapper = SimplePanel()
     self.commentsListPanel = VerticalPanel()
     self.text = TextArea()
     self.submitButton = Button(u"Add Comment ")
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:7,代码来源:Comments_add.py


示例8: createCommentsUI

 def createCommentsUI(self, comments):
     """
     Create comments ui
     """
     p = VerticalPanel()
     p.addStyleName(u"comments fbColorLight rounded addSpace")
     p.add(HTML(java.str(u"<h3>Comments on this post: " + java.str(comments.getCount())) + u"</h4>"))
     return p
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:8,代码来源:Stream_get.py


示例9: onModuleLoad

    def onModuleLoad(self):
        panel = DockPanel()
        RootPanel().add(panel)

        panel.setWidth("100%")
        panel.setHeight("100%")
        panel.setSpacing(5)

        title = HTML('<h1>Hello</h1>')
        description = HTML("""""")
        panel.add(title, DockPanel.NORTH)
        panel.add(description, DockPanel.SOUTH)

        links = VerticalPanel()
        links.setSpacing(8)

        panel.add(links, DockPanel.NORTH)

        head = HTML("""
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>Hello</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/examples/helloworld/Hello.py">/home/lkcl/src/pyjamas-desktop/pyjamas-webkit/examples/helloworld/Hello.py</a></font></td></tr></table>
    """)
        panel.add(head, DockPanel.NORTH)

        docs = HTML("""<tt><a href="#Hello">Hello</a>&nbsp;World&nbsp;Example</tt>""")
        panel.add(docs, DockPanel.NORTH)


        modules = eval(r'''['<a href="pyjamas.DOM.html">pyjamas.DOM</a>', '<a href="pyjamas.Window.html">pyjamas.Window</a>']''')
        contents = self.multicolumn(modules)
        contents = self.bigsection('Modules', '#fffff', '#aa55cc', contents)

        panel.add(contents, DockPanel.NORTH)

        classes = eval(r'''['<dl>\n<dt><font face="helvetica, arial"><a href="Hello.html#Hello">Hello</a>\n</font></dt></dl>\n', '<p>\n<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">\n<tr bgcolor="#ffc8d8">\n<td colspan=3 valign=bottom>&nbsp;<br>\n<font color="#000000" face="helvetica, arial"><a name="Hello">class <strong>Hello</strong></a></font></td></tr>\n    \n<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>\n<td width="100%">Methods defined here:<br>\n<dl><dt><a name="Hello-onBrowserEvent"><strong>onBrowserEvent</strong></a>(self, event)</dt></dl>\n\n<dl><dt><a name="Hello-onModuleLoad"><strong>onModuleLoad</strong></a>(self)</dt></dl>\n\n<dl><dt><a name="Hello-onTimer"><strong>onTimer</strong></a>(self)</dt></dl>\n\n<dl><dt><a name="Hello-onWindowResized"><strong>onWindowResized</strong></a>(self, width, height)</dt></dl>\n\n</td></tr></table>']''')
        contents = self.multicolumn(modules)
        contents = self.bigsection(
                'Classes', '#ffffff', '#ee77aa', HTML('\n'.join(classes)))

        panel.add(contents, DockPanel.NORTH)

        functions = eval(r'''['<dl><dt><a name="-greet"><strong>greet</strong></a>(sender, event)</dt></dl>\n']''')
        contents = self.multicolumn(modules)
        contents = self.bigsection(
                'Functions', '#ffffff', '#eeaa77', HTML('\n'.join(functions)))

        panel.add(contents, DockPanel.NORTH)

        data = eval(r'''["<strong>test</strong> = 'hello'"]''')
        contents = self.multicolumn(modules)
        contents = self.bigsection(
                'Data', '#ffffff', '#55aa55', HTML('\n'.join(data)))

        panel.add(contents, DockPanel.NORTH)
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:58,代码来源:docHello.py


示例10: Connect_getUnconnectedFriendsCount

class Connect_getUnconnectedFriendsCount(Showcase):

    """
    Showcase for method <code>connect.getUnconnectedFriendsCount</code>
    """
    
    @java.init
    def __init__(self, *a, **kw):
        self.outer = VerticalPanel()
    #  Handle response
    
    @java.private
    @java.innerclass
    @java.implements(AsyncCallbackInteger)
    class CountCallback(Object):
    
        
        @java.init
        def __init__(self, *a, **kw):
            pass
        
        @java.typed(Throwable)
        def onFailure(self, caught):
            self.handleFailure(caught)
        
        @java.typed(Integer)
        def onSuccess(self, count):
            self.removeLoader(self.outer)
            self.renderResponse(count)
    
    @__init__.register
    @java.typed()
    def __init__(self, ):
        self.__init__._super()
        """
        Create showcase
        """
        self.addLoader(self.outer)
        self.doGetUnconnctedFriendsCount()
        self.initWidget(self.outer)
    
    @java.private
    def doGetUnconnctedFriendsCount(self):
        """
        Get data from facebook
        """
        self.apiClient.connectGetUnconnectedFriendsCount(self.CountCallback())
    
    @java.private
    @java.typed(Integer)
    def renderResponse(self, count):
        """
        Render response
        @param count how many unconnected friends
        """
        self.outer.add(HTML(u"<h4>Unconnected Friends Count</h4>"))
        self.outer.add(HTML(u"Result : " + java.str(count)))
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:57,代码来源:Connect_getUnconnectedFriendsCount.py


示例11: Photos_get

class Photos_get(Showcase):

    """
    Showcase for method call <code>photos.get</code>
    
    @author olamar72
    """
    
    @java.init
    def __init__(self, *a, **kw):
        self.paramsWrapper = None
        self.resultWrapper = None
        self.paramsResultWrapper = None
    method = u"photos.get"
    
    @__init__.register
    @java.typed()
    def __init__(self, ):
        self.__init__._super()
        self.paramsWrapper = HorizontalPanel()
        self.resultWrapper = VerticalPanel()
        self.paramsResultWrapper = VerticalPanel()
        self.paramsWrapper.addStyleName(u"params")
        self.paramsResultWrapper.add(self.paramsWrapper)
        self.paramsResultWrapper.add(self.resultWrapper)
        fs = FriendSelector()
        class _anonymous(FriendSelectionHandler):
            
            @java.typed(Long)
            def onSelected(self, uid):
                self.displayPhotos(uid)
        fs.addFriendSelectionHandler(_anonymous())
        self.paramsWrapper.add(fs)
        self.initWidget(self.paramsResultWrapper)
    #  * Display photos of selected user
    
    @java.private
    @java.typed(Long)
    def displayPhotos(self, subjId):
        self.resultWrapper.add(self.getLoader())
        class _anonymous(AsyncCallback):
            
            @java.typed(Throwable)
            def onFailure(self, caught):
                self.handleFailure(caught)
            
            @java.typed(List)
            def onSuccess(self, result):
                photosPanel = FlowPanel()
                photosPanel.getElement().setId(u"photosPanel")
                self.resultWrapper.clear()
                self.resultWrapper.add(HTML(java.str(u"<h4>Photos size: " + java.str(result.size())) + u"</h4>"))
                for p in result:
                    photosPanel.add(FbPhoto(p.getPid(), Size.thumb))
                self.resultWrapper.add(photosPanel)
                Xfbml.parse(photosPanel.getElement())
        self.apiClient.photosGet(subjId, _anonymous()) #  Get photos from facebook
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:57,代码来源:Photos_get.py


示例12: createUserInputUI

 def createUserInputUI(self, saveButton):
     """
     Create user input UI
     
     @return user input ui
     """
     p = VerticalPanel()
     title = TextBox()
     content = TextBox()
     p.setSpacing(10)
     p.add(self.createInput(u"Title", title))
     p.add(self.createInput(u"Content", content))
     p.add(saveButton)
     class _anonymous(ClickHandler):
         
         @java.typed(ClickEvent)
         def onClick(self, event):
             note = Note.createNote(title.getValue(), content.getValue())
             class _anonymous(AsyncCallback):
                 
                 @java.typed(Throwable)
                 def onFailure(self, caught):
                     Notes_create.self###NOTIMPL QThis###.handleFailure(caught)
                 
                 @java.typed(Long)
                 def onSuccess(self, noteId):
                     p.add(HTML(u"Added note with id " + java.str(noteId)))
                     deleteNoteLink = Anchor(u"Delete")
                     deleteNoteLink.addClickHandler(self.DeleteNoteClickHandler(noteId))
                     p.add(deleteNoteLink)
             self.apiClient.notesCreate(note, _anonymous())
     saveButton.addClickHandler(_anonymous()) #  User clicks save, store it to facebook
     return p
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:33,代码来源:Notes_create.py


示例13: __init__

    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,代码行数:26,代码来源:TopPanel.py


示例14: renderMainContent

 def renderMainContent(self, addContentToPnl):
     """
     Render when user granted us permission to read stream
     """
     streamBody = VerticalPanel()
     streamBody.getElement().setId(u"streamBody")
     menu = HorizontalPanel()
     menu.addStyleName(u"streamMenu")
     menu.setSpacing(5)
     postsLink = Anchor(u"Posts") #  Create menu
     profilesLink = Anchor(u"Profiles")
     albumsLink = Anchor(u"Albums")
     menu.add(HTML(u"<b> Choose Stream : </b> "))
     menu.add(postsLink)
     menu.add(albumsLink)
     menu.add(profilesLink)
     class _anonymous(ClickHandler):
         
         @java.typed(ClickEvent)
         def onClick(self, event):
             self.renderPosts(streamBody, self.stream.getPosts())
             Xfbml.parse(streamBody)
     postsLink.addClickHandler(_anonymous()) #  Click posts link
     class _anonymous(ClickHandler):
         
         @java.typed(ClickEvent)
         def onClick(self, event):
             streamBody.clear()
             self.renderProfiles(streamBody, self.stream.getProfiles())
     profilesLink.addClickHandler(_anonymous()) #  Click profiles link
     class _anonymous(ClickHandler):
         
         @java.typed(ClickEvent)
         def onClick(self, event):
             self.renderAlbums(streamBody, self.stream.getAlbums())
     albumsLink.addClickHandler(_anonymous()) #  Click album links
     addContentToPnl.add(streamBody)
     self.addLoader(streamBody) #  Start loading
     class _anonymous(AsyncCallback):
         
         @java.typed(Throwable)
         def onFailure(self, caught):
             self.handleFailure(caught)
         
         @java.typed(Stream)
         def onSuccess(self, result):
             self.stream = result
             addContentToPnl.insert(menu, 0)
             self.removeLoader(streamBody)
             self.renderPosts(streamBody, result.getPosts())
             Xfbml.parse(streamBody)
     self.apiClient.streamGet(_anonymous()) #  Get stream from facebook.
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:52,代码来源:Stream_get.py


示例15: createInputUi

 def createInputUi(self):
     """
     * Create input text area and submit button.
     """
     vp = VerticalPanel()
     p = HorizontalPanel()
     p.setSpacing(10)
     p.add(FbProfilePic(self.apiClient.getLoggedInUser(), FbProfilePic.Size.square))
     self.text.setHeight(u"100px")
     self.text.setWidth(u"400px")
     vp.add(self.text)
     vp.add(self.submitButton)
     p.add(vp)
     return p
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:14,代码来源:Comments_add.py


示例16: __init__

 def __init__(self, ):
     self.__init__._super()
     outer = VerticalPanel()
     mutualFriends = VerticalPanel()
     mutualFriends.getElement().setId(u"Friends_getMutualFriends-mutualFriends")
     fs = FriendSelector() #  Let the user pick a friends
     class _anonymous(FriendSelectionHandler):
         #  Check if current logged in user has common friends with selected.
         
         @java.typed(Long)
         def onSelected(self, targetUid):
             mutualFriends.clear()
             self.addLoader(mutualFriends)
             class _anonymous(AsyncCallback):
                 
                 @java.typed(Throwable)
                 def onFailure(self, caught):
                     self.handleFailure(caught)
                 
                 @java.typed(List)
                 def onSuccess(self, result):
                     self.removeLoader(mutualFriends)
                     mutualFriends.add(HTML(java.str(u"Number of mutual friends " + java.str(result.size())) + u" with " + FbName(targetUid)))
                     p = ProfilePicsPanel(result)
                     mutualFriends.add(p)
             self.apiClient.friendsGetMutualFriends(targetUid, _anonymous()) #  Call facebook
     fs.addFriendSelectionHandler(_anonymous())
     outer.add(fs)
     outer.add(mutualFriends)
     self.initWidget(outer)
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:30,代码来源:Friends_getMutualFriends.py


示例17: onSuccess

 def onSuccess(self, groups):
     self.removeLoader(outer)
     for g in groups:
         membersWrapper = VerticalPanel()
         membersWrapper.addStyleName(u"membersWrapper")
         memberLink = Anchor(u"See Members")
         class _anonymous(ClickHandler):
             
             @java.typed(ClickEvent)
             def onClick(self, event):
                 self.displayMembers(membersWrapper, g.getGid())
         memberLink.addClickHandler(_anonymous())
         outer.add(HTML(java.str(u"<h4>Group: " + java.str(g.getName())) + u"</h4>"))
         outer.add(memberLink)
         outer.add(membersWrapper)
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:15,代码来源:Groups_get.py


示例18: ProfilePicsPanel

class ProfilePicsPanel(Composite):

    """
    Display Profile Pics in a panel.
    
    CSS Configuration.
    
    <ul>
    <li>.gwittit-ProfilePicsPanel
    <li>.gwittit-ProfilePicsPanel-pics
    </ul>
    """
    
    @java.init
    def __init__(self, *a, **kw):
        self.outer = VerticalPanel()
        self.pics = FlowPanel()
        self.seeAllLink = Anchor(u"See All")
        self.PAGE_SIZE = 10
        self.uids = None
    
    @__init__.register
    @java.typed(List)
    def __init__(self, uids):
        self.__init__._super()
        """
        Create a new Panel
        """
        self.uids = uids
        self.outer.getElement().setId(u"ProfilePicsPanel")
        self.pics.getElement().setId(u"ProfilePicsPanel-pics-" + java.str(System.currentTimeMillis()))
        self.outer.addStyleName(u"gwittit-ProfilePicsPanel")
        self.pics.addStyleName(u"gwittit-ProfilePicsPanel-pics")
        self.outer.add(self.pics)
        self.renderProfilePics() #  Add list of fbprofilepics to the pics panel
        if uids.size() > PAGE_SIZE:
            self.outer.add(self.seeAllLink)
        class _anonymous(ClickHandler):
            
            @java.typed(ClickEvent)
            def onClick(self, event):
                popup = ProfilePicsPopup(uids)
                popup.center()
                popup.show()
        self.seeAllLink.addClickHandler(_anonymous())
        Xfbml.parse(self.pics)
        self.initWidget(self.outer)
    
    @java.private
    def renderProfilePics(self):
        i = 0
        while i < PAGE_SIZE and i < self.uids.size():
            i+= 1
            uid = self.uids.get(i)
            profilePic = FbProfilePic(uid, Size.square)
            profilePic.setWidth(u"35px")
            profilePic.setHeight(u"35px")
            self.pics.add(profilePic)
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:58,代码来源:ProfilePicsPanel.py


示例19: __init__

	def __init__(self, calendar):
		Composite.__init__(self)

		self.calendar = calendar
		self.dayCheckBoxListener = DayCheckBoxListener(calendar)
		self.outer = VerticalPanel()
		self.initWidget(self.outer)
		self.setStyleName("DynaTable-DayFilterWidget")
		self.outer.add(DayCheckBox(self, "Sunday", 0))
		self.outer.add(DayCheckBox(self, "Monday", 1))
		self.outer.add(DayCheckBox(self, "Tuesday", 2))
		self.outer.add(DayCheckBox(self, "Wednesday", 3))
		self.outer.add(DayCheckBox(self, "Thursday", 4))
		self.outer.add(DayCheckBox(self, "Friday", 5))
		self.outer.add(DayCheckBox(self, "Saturday", 6))

		self.buttonAll = Button("All", self)
		self.buttonNone = Button("None", self)

		hp = HorizontalPanel()
		hp.setHorizontalAlignment(HasAlignment.ALIGN_CENTER)
		hp.add(self.buttonAll)
		hp.add(self.buttonNone)
		
		self.outer.add(hp)
		self.outer.setCellVerticalAlignment(hp, HasAlignment.ALIGN_BOTTOM)
		self.outer.setCellHorizontalAlignment(hp, HasAlignment.ALIGN_CENTER)
开发者ID:pombredanne,项目名称:pyjamas-desktop,代码行数:27,代码来源:DayFilterWidget.py


示例20: __init__

 def __init__(self, ):
     self.__init__._super()
     outer = VerticalPanel()
     outer.getElement().setId(u"Friends_getAppUsers")
     self.addLoader(outer)
     class _anonymous(AsyncCallback):
         
         @java.typed(Throwable)
         def onFailure(self, caught):
             self.handleFailure(caught)
         
         @java.typed(List)
         def onSuccess(self, result):
             self.removeLoader(outer)
             outer.add(ProfilePicsPanel(result))
     self.apiClient.friendsGetAppUsers(_anonymous())
     self.initWidget(outer)
开发者ID:pombredanne,项目名称:pygwt-facebook,代码行数:17,代码来源:Friends_getAppUsers.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python AbsolutePanel.AbsolutePanel类代码示例发布时间:2022-05-25
下一篇:
Python ui.Focus类代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap