Package gfriends.client.model

Examples of gfriends.client.model.ContactItem


      GreetingItem greetingItem = null;
      for (int i = 0; i < result.size(); i++) {

        greetingItem = result.get(i);

        ContactItem currentContact = null;
        for (ContactItem contactItem : contactItemList) {
          if (contactItem.getEmail().equals(greetingItem.getEmail())) {
            currentContact = contactItem;
            break;
          }
        }

        if (currentContact.isEnable()) {
          cellFormatter.addStyleName(i - skipCount, 0, currentContact.getStyle() + "_bkcolor");
          StringBuilder sb = new StringBuilder();

          if (isLocalStorageSupported() && greetingItem.getTimestamp() > lastTimestamp) {
            sb.append("<img src='/images/new_icon.jpg' width='33px' Height='19px'/><br/>");
            newMsgNum++;
          }
          sb.append("[" + DateTimeFormat.getMediumDateTimeFormat().format(greetingItem.getDataTime()) + "]&nbsp;&nbsp;&nbsp;").append("<b>")
              .append(currentContact.getNickName()).append(" wrote: </b>").append("<br/>").append("<blockquote><pre>")
              .append(greetingItem.isEncrypt() ? decrypt(encryptKey, greetingItem.getContent()) : greetingItem.getContent())
              .append("</pre></blockquote>");

          this.flexTable.setHTML(i - skipCount, 0, sb.toString());
View Full Code Here


      String query = "select from " + Contact.class.getName();
      @SuppressWarnings("unchecked")
      List<Contact> contactList = (List<Contact>) pm.newQuery(query).execute();

      ContactItem contactItem = null;
      for (Contact contact : contactList) {
        if (contact.isEnable()) {
          contactItem = new ContactItem();
          contactItem.setNickName(contact.getNickName());
          contactItem.setEmail(contact.getEmail());
          contactItem.setRegisterDate(contact.getRegisterDate());
          contactItem.setStyle(contact.getStyle());
          result.add(contactItem);
        }
      }
    } finally {
      if (pm != null) {
View Full Code Here

    flexTable.setWidth("100%");
    flexTable.setCellSpacing(2);
    flexTable.setCellPadding(2);

    for (int i = 0; i < this.contactItemList.size(); i++) {
      ContactItem contactItem = this.contactItemList.get(i);
      final String contactName = contactItem.getNickName();
      final String contactEmail = contactItem.getEmail();
      final HTML contactLink = new HTML("<a href=\"javascript:undefined;\">" + contactName + "</a>");
      cellFormatter.addStyleName(i, 0, contactItem.getStyle() + "_bkcolor");
      flexTable.setWidget(i, 0, contactLink);

      // Open the contact info popup when the user clicks a contact
      contactLink.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
View Full Code Here

TOP

Related Classes of gfriends.client.model.ContactItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.