Ejemplo n.º 1
0
 public void downloadPathPanelDidEnd_returnCode_contextInfo(
     NSOpenPanel sheet, int returncode, ID contextInfo) {
   if (returncode == SheetCallback.DEFAULT_OPTION) {
     NSArray selected = sheet.filenames();
     if ((selected.lastObject()) != null) {
       host.setDownloadFolder(LocalFactory.createLocal(selected.lastObject().toString()));
     }
   }
   downloadPathPopup
       .itemAtIndex(new NSInteger(0))
       .setTitle(host.getDownloadFolder().getDisplayName());
   downloadPathPopup
       .itemAtIndex(new NSInteger(0))
       .setRepresentedObject(host.getDownloadFolder().getAbsolute());
   downloadPathPopup
       .itemAtIndex(new NSInteger(0))
       .setImage(IconCache.instance().iconForPath(host.getDownloadFolder(), 16));
   downloadPathPopup.selectItemAtIndex(new NSInteger(0));
   downloadPathPanel = null;
   this.itemChanged();
 }