コード例 #1
0
  private void setFriendsMessages(List<MessageThread> list) {
    ItemDetailListPanel itemFriendsPanel = null;
    for (int i = 0; i < list.size(); i++) {
      final MessageThread messageThread = list.get(i);
      itemFriendsPanel = new ItemDetailListPanel();
      itemFriendsPanel.setFriendsMessages(messageThread, true);
      itemFriendsPanel
          .getActionClickHandler()
          .addClickHandler(
              new ClickHandler() {

                @Override
                public void onClick(ClickEvent event) {
                  handlerManager.fireEvent(
                      new ItemDetailViewMessageThreadEvent(
                          ItemDetailViewEvent.EventType.FRIENDS, messageThread));
                }
              });
      friendsPanel.add(itemFriendsPanel);
    }
  }
コード例 #2
0
  private void setOffers(List<Offer> offerList) {
    int listSize = offerList.size();
    ItemDetailListPanel itemOfferPanel = null;
    for (int i = 0; i < listSize; i++) {
      final Offer offer = offerList.get(i);
      itemOfferPanel = new ItemDetailListPanel();

      itemOfferPanel.setOffersContainer(offer.getBusiness(), offer);
      itemOfferPanel
          .getActionClickHandler()
          .addClickHandler(
              new ClickHandler() {

                @Override
                public void onClick(ClickEvent event) {
                  handlerManager.fireEvent(
                      new ItemDetailViewOfferEvent(ItemDetailViewEvent.EventType.OFFERS, offer));
                }
              });
      offersPanel.add(itemOfferPanel);
    }
  }
コード例 #3
0
  private void setPlaces(List<Business> businessList) {
    int listSize = businessList.size();
    ItemDetailListPanel itemBusinessPanel = null;
    for (int i = 0; i < listSize; i++) {
      final Business business = businessList.get(i);
      itemBusinessPanel = new ItemDetailListPanel();

      itemBusinessPanel.setPlaceContainer(business);
      itemBusinessPanel
          .getActionClickHandler()
          .addClickHandler(
              new ClickHandler() {

                @Override
                public void onClick(ClickEvent event) {
                  handlerManager.fireEvent(
                      new ItemDetailViewPlaceEvent(ItemDetailViewEvent.EventType.PLACES, business));
                }
              });
      placesPanel.add(itemBusinessPanel);
    }
  }