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)
 def createDefaultFrontpage(self):
     pp = FbProfilePic(self.apiClient.getLoggedInUser(), Size.square)
     pp.setSize(u"30px", u"30px")
     name = FbName(self.apiClient.getLoggedInUser())
     name.setUseyou(False)
     name.setLinked(False)
     welcomePnl = VerticalPanel()
     welcomePnl.setSpacing(10)
     welcomePnl.add(HTML(java.str(java.str(java.str(u"<h4>Welcome, " + java.str(name)) + u" ") + java.str(pp)) + u"</h4> "))
     welcomePnl.add(HTML(self.wText))
     return welcomePnl
Example #3
0
 def renderLoginInfo(self):
     self.loginInfo.clear()
     uid = self.apiClient.getLoggedInUser()
     fbName = FbName(uid, False)
     fbName.setUseyou(False)
     pic = FbProfilePic(uid, FbProfilePic.Size.square)
     pic.setSize(u"15px", u"15px")
     GWT.log(u"TopMenu: render " + java.str(fbName), None)
     self.loginInfo.add(fbName)
     tmp = SimplePanel()
     tmp.addStyleName(u"miniProfilePic")
     tmp.setWidget(pic)
     self.loginInfo.add(tmp)
     logout = Anchor(u"Logout")
     class _anonymous(ClickHandler):
         
         @java.typed(ClickEvent)
         def onClick(self, event):
             FacebookConnect.logoutAndRedirect(u"/")
     logout.addClickHandler(_anonymous())
     self.loginInfo.add(logout)