Ejemplo n.º 1
0
 private void addDownloadPath(Selector action, Local f) {
   if (downloadPathPopup.menu().itemWithTitle(f.getDisplayName()) == null) {
     downloadPathPopup
         .menu()
         .addItemWithTitle_action_keyEquivalent(f.getDisplayName(), action, StringUtils.EMPTY);
     downloadPathPopup.lastItem().setTarget(this.id());
     downloadPathPopup.lastItem().setImage(IconCache.instance().iconForPath(f, 16));
     downloadPathPopup.lastItem().setRepresentedObject(f.getAbsolute());
     if (host.getDownloadFolder().equals(f)) {
       downloadPathPopup.selectItem(downloadPathPopup.lastItem());
     }
   }
 }