examples/MailWithMvp4g/src/com/mvp4g/example/client/widgets/Mailboxes.java
public void addImageItem(FOLDER_TYPE folder) {

    TreeItem item;
    switch (folder) {
      case INBOX:
        item = new TreeItem(imageItemHTML(images.inbox(),
                                          "Inbox"));
        break;
      case DRAFS:
        item = new TreeItem(imageItemHTML(images.drafts(),
                                          "Drafts"));
        break;
      case TEMPLATES:
        item = new TreeItem(imageItemHTML(images.templates(),
                                          "Templates"));
        break;
      case SENT:
        item = new TreeItem(imageItemHTML(images.sent(),
                                          "Sent"));
        break;
      default:
        item = new TreeItem(imageItemHTML(images.trash(),
                                          "Trash"));
        break;

    }

    root.addItem(item);
  }
/**
   * A helper method to simplify adding tree items that have attached images.
   */
A helper method to simplify adding tree items that have attached images.
A helper method to simplify adding tree items that have attached images .
public void addImageItem(FOLDER_TYPE folder) {
    TreeItem item;
    switch (folder) {
      case INBOX:
        item = new TreeItem(imageItemHTML(images.inbox(),
                                          "Inbox"));
        break;
      case DRAFS:
        item = new TreeItem(imageItemHTML(images.drafts(),
                                          "Drafts"));
        break;
      case TEMPLATES:
        item = new TreeItem(imageItemHTML(images.templates(),
                                          "Templates"));
        break;
      case SENT:
        item = new TreeItem(imageItemHTML(images.sent(),
                                          "Sent"));
        break;
      default:
        item = new TreeItem(imageItemHTML(images.trash(),
                                          "Trash"));
        break;
    }
    root.addItem(item);
  }
public void addImageItem ( FOLDER_TYPE folder ) { TreeItem item ; switch ( folder ) { case INBOX : item = new TreeItem ( imageItemHTML ( images . inbox ( ) , "Inbox" ) ) ; break ; case DRAFS : item = new TreeItem ( imageItemHTML ( images . drafts ( ) , "Drafts" ) ) ; break ; case TEMPLATES : item = new TreeItem ( imageItemHTML ( images . templates ( ) , "Templates" ) ) ; break ; case SENT : item = new TreeItem ( imageItemHTML ( images . sent ( ) , "Sent" ) ) ; break ; default : item = new TreeItem ( imageItemHTML ( images . trash ( ) , "Trash" ) ) ; break ; } root . addItem ( item ) ; }
A helper method to simplify adding tree items that have attached images.
A helper method to simplify adding tree items that have attached images .