示例#1
0
    public void elementSelected(ElementSelectedEvent event) {
      String key = (String) event.getElement();
      IMail mail = model.getSession().getMailByID(key);
      model.setSelectedMail(mail);

      // update the info and preview control by assigning the mail directly.
      // another (cleaner) approach would be if the controls would listen
      // to the model on their own...
      mailInfo.setMail(mail);
      mailPreview.setMessage(mail != null ? mail.getMessage() : null);
    }
示例#2
0
 /* (non-Javadoc)
  * @see de.jwic.ecolib.tableviewer.defaults.ListContentProvider#getUniqueKey(java.lang.Object)
  */
 public String getUniqueKey(Object object) {
   IMail mail = (IMail) object;
   return mail.getUniqueID();
 }