Package com.aelitis.azureus.ui

Examples of com.aelitis.azureus.ui.UIFunctions


    if (getComposite() == null || getComposite().isDisposed()){
    
      return;
       }
   
    UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
    if (uiFunctions != null) {
      uiFunctions.refreshIconBar();
    }
   
    // Store values for columns that are calculate from peer information, so
    // that we only have to do one loop.  (As opposed to each cell doing a loop)
    // Calculate code copied from TrackerTableItem
View Full Code Here


    });
  }

  // @see com.aelitis.azureus.ui.common.table.TableSelectionListener#deselected(com.aelitis.azureus.ui.common.table.TableRowCore[])
  public void deselected(TableRowCore[] rows) {
    UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
    if (uiFunctions != null) {
      uiFunctions.refreshIconBar();
    }
  }
View Full Code Here

    }
  }

  // @see com.aelitis.azureus.ui.common.table.TableSelectionListener#focusChanged(com.aelitis.azureus.ui.common.table.TableRowCore)
  public void focusChanged(TableRowCore focus) {
    UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
    if (uiFunctions != null) {
      uiFunctions.refreshIconBar();
    }
  }
View Full Code Here

    }
  }

  // @see com.aelitis.azureus.ui.common.table.TableSelectionListener#selected(com.aelitis.azureus.ui.common.table.TableRowCore[])
  public void selected(TableRowCore[] rows) {
    UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
    if (uiFunctions != null) {
      uiFunctions.refreshIconBar();
    }
  }
View Full Code Here

    locale_param.addChangeListener( new ParameterChangeAdapter() {
      public void parameterChanged( Parameter p, boolean caused_internally ) {
        MessageText.loadBundle();
        DisplayFormatters.setUnits();
        DisplayFormatters.loadMessages();
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.refreshLanguage();   
        }
      }
    });
   
    return cMain;
View Full Code Here

      Messages.setLanguageText(itemDetails, "MyTorrentsView.menu.showdetails");
      menu.setDefaultItem(itemDetails);
      Utils.setMenuItemImage(itemDetails, "details");
      itemDetails.addListener(SWT.Selection, new DMTask(dms) {
        public void run(DownloadManager dm) {
          UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
          if (uiFunctions != null) {
            uiFunctions.openView(UIFunctions.VIEW_DM_DETAILS, dm);
          }
        }
      });
      itemDetails.setEnabled(hasSelection);
    }

    // Open Bar
    final MenuItem itemBar = new MenuItem(menu, SWT.CHECK);
    Messages.setLanguageText(itemBar, "MyTorrentsView.menu.showdownloadbar");
    Utils.setMenuItemImage(itemBar, "downloadBar");
    itemBar.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager dm) {
        if (DownloadBar.getManager().isOpen(dm)) {
          DownloadBar.close(dm);
        }
        else {
          DownloadBar.open(dm, menu.getShell());
        }
      } // run
    });
    itemBar.setEnabled(hasSelection);
    itemBar.setSelection(barsOpened);

    // ---
    new MenuItem(menu, SWT.SEPARATOR);

    // Run Data File
    final MenuItem itemOpen = new MenuItem(menu, SWT.PUSH);
    Messages.setLanguageText(itemOpen, "MyTorrentsView.menu.open");
    Utils.setMenuItemImage(itemOpen, "run");
    itemOpen.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager[] dms) {
        runDataSources(dms);
      }
    });
    itemOpen.setEnabled(hasSelection);

    // Explore (or open containing folder)
    final boolean use_open_containing_folder = COConfigurationManager.getBooleanParameter("MyTorrentsView.menu.show_parent_folder_enabled");
    final MenuItem itemExplore = new MenuItem(menu, SWT.PUSH);
    Messages.setLanguageText(itemExplore, "MyTorrentsView.menu." + (use_open_containing_folder ? "open_parent_folder" : "explore"));
    itemExplore.addListener(SWT.Selection, new DMTask(dms, false) {
      public void run(DownloadManager dm) {
        ManagerUtils.open(dm, use_open_containing_folder);
      }
    });
    itemExplore.setEnabled(hasSelection);

    // === advanced menu ===

    final MenuItem itemAdvanced = new MenuItem(menu, SWT.CASCADE);
    Messages.setLanguageText(itemAdvanced, "MyTorrentsView.menu.advancedmenu"); //$NON-NLS-1$
    itemAdvanced.setEnabled(hasSelection);

    final Menu menuAdvanced = new Menu(menu.getShell(), SWT.DROP_DOWN);
    itemAdvanced.setMenu(menuAdvanced);

    // advanced > Download Speed Menu //

    long maxDownload = COConfigurationManager.getIntParameter("Max Download Speed KBs", 0) * 1024;
    long maxUpload = COConfigurationManager.getIntParameter("Max Upload Speed KBs", 0) * 1024;

    ViewUtils.addSpeedMenu(menu.getShell(), menuAdvanced, true, hasSelection, downSpeedDisabled, downSpeedUnlimited,
        totalDownSpeed, downSpeedSetMax, maxDownload, upSpeedDisabled, upSpeedUnlimited, totalUpSpeed,
        upSpeedSetMax, maxUpload, dms.length, new ViewUtils.SpeedAdapter() {
          public void setDownSpeed(final int speed) {
            DMTask task = new DMTask(dms) {
              public void run(DownloadManager dm) {
                dm.getStats().setDownloadRateLimitBytesPerSecond(speed);
              }
            };
            task.go();
          }

          public void setUpSpeed(final int speed) {
            DMTask task = new DMTask(dms) {
              public void run(DownloadManager dm) {
                dm.getStats().setUploadRateLimitBytesPerSecond(speed);
              }
            };
            task.go();
          }
        });

    // advanced > Tracker Menu //
    final Menu menuTracker = new Menu(menu.getShell(), SWT.DROP_DOWN);
    final MenuItem itemTracker = new MenuItem(menuAdvanced, SWT.CASCADE);
    Messages.setLanguageText(itemTracker, "MyTorrentsView.menu.tracker");
    itemTracker.setMenu(menuTracker);

    final MenuItem itemChangeTracker = new MenuItem(menuTracker, SWT.PUSH);
    Messages.setLanguageText(itemChangeTracker, "MyTorrentsView.menu.changeTracker"); //$NON-NLS-1$
    Utils.setMenuItemImage(itemChangeTracker, "add_tracker");
    itemChangeTracker.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager[] dms) {
        if ( dms.length > 0 ){
          new TrackerChangerWindow(composite.getDisplay(), dms);
        }
      }
    });
    itemChangeTracker.setEnabled(changeUrl);

    final MenuItem itemEditTracker = new MenuItem(menuTracker, SWT.PUSH);
    Messages.setLanguageText(itemEditTracker, "MyTorrentsView.menu.editTracker");
    Utils.setMenuItemImage(itemEditTracker, "edit_trackers");
    itemEditTracker.addListener(SWT.Selection, new DMTask(dms) {
      public void
      run(
        final DownloadManager[] dms )
      {
        Map<String,List<DownloadManager>>  same_map = new HashMap<String, List<DownloadManager>>();
       
        for ( DownloadManager dm: dms ){
         
          TOTorrent torrent = dm.getTorrent();
         
          if ( torrent == null ){
           
            continue;
          }
         
          List<List<String>> group = TorrentUtils.announceGroupsToList(torrent);
         
          String str = "";
         
          for ( List<String> l: group ){
            str += "[[";
           
            for ( String s:l ){
              str += s + ", ";
            }
          }
         
          List<DownloadManager> dl = same_map.get( str );
         
          if ( dl == null ){
           
            dl = new ArrayList<DownloadManager>();
           
            same_map.put( str, dl );
          }
         
          dl.add(dm );
        }
       
        for ( final List<DownloadManager> set: same_map.values()){
                   
          TOTorrent torrent = set.get(0).getTorrent();

          List<List<String>> group = TorrentUtils.announceGroupsToList(torrent);

          new MultiTrackerEditor(
            null,
            group,
            new TrackerEditorListener()
            {
              public void
              trackersChanged(
                String         str,
                String         str2,
                List<List<String>>   group )
              {
                for ( DownloadManager dm: set ){
                 
                  TOTorrent torrent = dm.getTorrent();
                 
                  TorrentUtils.listToAnnounceGroups(group, torrent);
   
                  try{
                    TorrentUtils.writeToFile(torrent);
                   
                  }catch (Throwable e){
                   
                    Debug.printStackTrace(e);
                  }
   
                  if ( dm.getTrackerClient() != null){
                   
                    dm.getTrackerClient().resetTrackerUrl(true);
                  }
                }
              }
            }, true);
        }
      }
    });
   
    itemEditTracker.setEnabled(hasSelection);

      // edit webseeds
   
    final MenuItem itemEditWebSeeds = new MenuItem(menuTracker, SWT.PUSH);
    Messages.setLanguageText(itemEditWebSeeds, "MyTorrentsView.menu.editWebSeeds");
    itemEditWebSeeds.addListener(SWT.Selection, new DMTask(dms) {
      public void
      run(
        final DownloadManager[] dms )
      {
        final TOTorrent torrent = dms[0].getTorrent();
       
        if ( torrent == null ){
         
          return;
        }
       
        List getright = getURLList( torrent, "url-list" );
        List webseeds = getURLList( torrent, "httpseeds" );
       
        Map ws = new HashMap();
               
        ws.put( "getright", getright );               
        ws.put( "webseeds", webseeds );
       
        ws = BDecoder.decodeStrings( ws );
       
        new WebSeedsEditor(
            null, ws,
            new WebSeedsEditorListener()
            {
              public void
              webSeedsChanged(
                String   oldName,
                String   newName,
                Map   ws )
              {
                try{
                    // String -> byte[]
                 
                  ws = BDecoder.decode( BEncoder.encode( ws ));
                 
                  List  getright =  (List)ws.get( "getright" );
                 
                  if ( getright == null || getright.size() == 0 ){
                   
                    torrent.removeAdditionalProperty( "url-list" );
                   
                  }else{
                   
                    torrent.setAdditionalListProperty( "url-list", getright );
                  }
                 
                  List  webseeds =  (List)ws.get( "webseeds" );
                 
                  if ( webseeds == null || webseeds.size() == 0 ){
                   
                    torrent.removeAdditionalProperty( "httpseeds" );
                   
                  }else{
                   
                    torrent.setAdditionalListProperty( "httpseeds", webseeds );
                  }
     
                  PluginInterface pi = AzureusCoreFactory.getSingleton().getPluginManager().getPluginInterfaceByClass(ExternalSeedPlugin.class);
                 
                  if ( pi != null ){
                   
                    ExternalSeedPlugin ext_seed_plugin = (ExternalSeedPlugin)pi.getPlugin();
                   
                    ext_seed_plugin.downloadChanged( PluginCoreUtils.wrap( dms[0] ));
                  }
           
                }catch (Throwable e){
           
                  Debug.printStackTrace( e );
                }
              }
            },
            true );

      }
     
      protected List
      getURLList(
        TOTorrent  torrent,
        String    key )
      {
        Object obj = torrent.getAdditionalProperty( key );
       
        if ( obj instanceof byte[] ){
         
                  List l = new ArrayList();
                 
              l.add(obj);
             
              return( l );
             
        }else if ( obj instanceof List ){
         
          return((List)obj);
         
        }else{
         
          return( new ArrayList());
        }
      }
    });
   
    itemEditWebSeeds.setEnabled(dms.length==1);

      // manual update
   
    final MenuItem itemManualUpdate = new MenuItem(menuTracker, SWT.PUSH);
    Messages.setLanguageText(itemManualUpdate, "GeneralView.label.trackerurlupdate"); //$NON-NLS-1$
    //itemManualUpdate.setImage(ImageRepository.getImage("edit_trackers"));
    itemManualUpdate.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager dm) {
        dm.requestTrackerAnnounce(false);
      }
    });
    itemManualUpdate.setEnabled(manualUpdate);

    boolean scrape_enabled = COConfigurationManager.getBooleanParameter("Tracker Client Scrape Enable");

    boolean scrape_stopped = COConfigurationManager.getBooleanParameter("Tracker Client Scrape Stopped Enable");

    boolean manualScrape = (!scrape_enabled) || ((!scrape_stopped) && allStopped);

    final MenuItem itemManualScrape = new MenuItem(menuTracker, SWT.PUSH);
    Messages.setLanguageText(itemManualScrape, "GeneralView.label.trackerscrapeupdate");
    //itemManualUpdate.setImage(ImageRepository.getImage("edit_trackers"));
    itemManualScrape.addListener(SWT.Selection, new DMTask(dms, true, true ) {
      public void run(DownloadManager dm) {
        dm.requestTrackerScrape(true);
      }
    });
    itemManualScrape.setEnabled(manualScrape);

    // advanced > files

    final MenuItem itemFiles = new MenuItem(menuAdvanced, SWT.CASCADE);
    Messages.setLanguageText(itemFiles, "ConfigView.section.files");

    final Menu menuFiles = new Menu(composite.getShell(), SWT.DROP_DOWN);
    itemFiles.setMenu(menuFiles);

    final MenuItem itemFileMoveData = new MenuItem(menuFiles, SWT.PUSH);
    Messages.setLanguageText(itemFileMoveData, "MyTorrentsView.menu.movedata");
    itemFileMoveData.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager[] dms) {
        if (dms != null && dms.length > 0) {

          DirectoryDialog dd = new DirectoryDialog(composite.getShell());

          dd.setFilterPath(TorrentOpener.getFilterPathData());

          dd.setText(MessageText.getString("MyTorrentsView.menu.movedata.dialog"));

          String path = dd.open();

          if (path != null) {

            TorrentOpener.setFilterPathData(path);

            File target = new File(path);

            for (int i = 0; i < dms.length; i++) {

              try {
                dms[i].moveDataFiles(target);

              }
              catch (Throwable e) {

                Logger.log(new LogAlert(dms[i], LogAlert.REPEATABLE,
                    "Download data move operation failed", e));
              }
            }
          }
        }
      }
    });
    itemFileMoveData.setEnabled(fileMove);

    final MenuItem itemFileMoveTorrent = new MenuItem(menuFiles, SWT.PUSH);
    Messages.setLanguageText(itemFileMoveTorrent, "MyTorrentsView.menu.movetorrent");
    itemFileMoveTorrent.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager[] dms) {
        if (dms != null && dms.length > 0) {

          DirectoryDialog dd = new DirectoryDialog(composite.getShell());
          String filter_path = TorrentOpener.getFilterPathTorrent();
         
          // If we don't have a decent path, default to the path of the first
          // torrent.
          if (filter_path == null || filter_path.trim().length() == 0) {
            filter_path = new File(dms[0].getTorrentFileName()).getParent();
          }
         
          dd.setFilterPath(filter_path);

          dd.setText(MessageText.getString("MyTorrentsView.menu.movedata.dialog"));

          String path = dd.open();

          if (path != null) {

            File target = new File(path);

            TorrentOpener.setFilterPathTorrent(target.toString());

            for (int i = 0; i < dms.length; i++) {

              try {
                dms[i].moveTorrentFile(target);

              }
              catch (Throwable e) {

                Logger.log(new LogAlert(dms[i], LogAlert.REPEATABLE,
                    "Download torrent move operation failed", e));
              }
            }
          }
        }
      }
    });
    itemFileMoveTorrent.setEnabled(fileMove);
   
    final MenuItem itemCheckFilesExist = new MenuItem(menuFiles, SWT.PUSH);
    Messages.setLanguageText(itemCheckFilesExist, "MyTorrentsView.menu.checkfilesexist");
    itemCheckFilesExist.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager dm) {
        dm.filesExist( true );
      }
    });

    final MenuItem itemFileRescan = new MenuItem(menuFiles, SWT.CHECK);
    Messages.setLanguageText(itemFileRescan, "MyTorrentsView.menu.rescanfile");
    itemFileRescan.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager dm) {
        dm.getDownloadState().setFlag(DownloadManagerState.FLAG_SCAN_INCOMPLETE_PIECES,
            itemFileRescan.getSelection());
      }
    });
    itemFileRescan.setSelection(allScanSelected);
    itemFileRescan.setEnabled(fileRescan);

      // clear allocation
   
    MenuItem itemFileClearAlloc = new MenuItem(menuFiles, SWT.PUSH);
    Messages.setLanguageText(itemFileClearAlloc, "MyTorrentsView.menu.clear_alloc_data");
    itemFileClearAlloc.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager dm) {
        dm.setDataAlreadyAllocated( false );
      }
    });
   
    itemFileClearAlloc.setEnabled(allStopped);
   
      // clear resume
   
    MenuItem itemFileClearResume = new MenuItem(menuFiles, SWT.PUSH);
    Messages.setLanguageText(itemFileClearResume, "MyTorrentsView.menu.clear_resume_data");
    itemFileClearResume.addListener(SWT.Selection, new DMTask(dms) {
      public void run(DownloadManager dm) {
        dm.getDownloadState().clearResumeData();
      }
    });
    itemFileClearResume.setEnabled(allStopped);

    // Advanced - > Rename
    final MenuItem itemRename = new MenuItem(menuAdvanced, SWT.DROP_DOWN);
    Messages.setLanguageText(itemRename, "MyTorrentsView.menu.rename");
    itemRename.setEnabled(hasSelection);
    itemRename.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event event) {
        for (DownloadManager dm : dms) {
          AdvRenameWindow window = new AdvRenameWindow();
          window.open(dm);
        }
      }
    });

    // === advanced > export ===
    // =========================

    if (userMode > 0) {
      final MenuItem itemExport = new MenuItem(menuAdvanced, SWT.CASCADE);
      Messages.setLanguageText(itemExport, "MyTorrentsView.menu.exportmenu"); //$NON-NLS-1$
      Utils.setMenuItemImage(itemExport, "export");
      itemExport.setEnabled(hasSelection);

      final Menu menuExport = new Menu(composite.getShell(), SWT.DROP_DOWN);
      itemExport.setMenu(menuExport);

      // Advanced > Export > Export XML
      final MenuItem itemExportXML = new MenuItem(menuExport, SWT.PUSH);
      Messages.setLanguageText(itemExportXML, "MyTorrentsView.menu.export");
      itemExportXML.addListener(SWT.Selection, new DMTask(dms) {
        public void run(DownloadManager[] dms) {
          DownloadManager dm = dms[0]; // First only.
          if (dm != null) new ExportTorrentWizard(itemExportXML.getDisplay(), dm);
        }
      });

      // Advanced > Export > Export Torrent
      final MenuItem itemExportTorrent = new MenuItem(menuExport, SWT.PUSH);
      Messages.setLanguageText(itemExportTorrent, "MyTorrentsView.menu.exporttorrent");
      itemExportTorrent.addListener(SWT.Selection, new DMTask(dms) {
        public void run(DownloadManager[] dms) {
          // FileDialog for single download
          // DirectoryDialog for multiple.
          File[] destinations = new File[dms.length];
          if (dms.length == 1) {
            FileDialog fd = new FileDialog(composite.getShell(), SWT.SAVE);
            fd.setFileName(dms[0].getTorrentFileName());
            String path = fd.open();
            if (path == null) {return;}
            destinations[0] = new File(path);
          }
          else {
            DirectoryDialog dd = new DirectoryDialog(composite.getShell(), SWT.SAVE);
            String path = dd.open();
            if (path == null) {return;}
            for (int i=0; i<dms.length; i++) {
              destinations[i] = new File(path, new File(dms[i].getTorrentFileName()).getName());
            }
          }
         
          int i=0;
          try {
            for (; i<dms.length; i++) {
              File target = destinations[i];
              if (target.exists()) {
                MessageBox mb = new MessageBox(composite.getShell(), SWT.ICON_QUESTION | SWT.YES | SWT.NO);
                mb.setText(MessageText.getString("exportTorrentWizard.process.outputfileexists.title"));
                mb.setMessage(MessageText.getString("exportTorrentWizard.process.outputfileexists.message") + "\n" + destinations[i].getName());

                int result = mb.open();
                if (result == SWT.NO) {return;}

                if (!target.delete()) {
                  throw (new Exception("Failed to delete file"));
                }
              } // end deal with clashing torrent

              // first copy the torrent - DON'T use "writeTorrent" as this amends the
              // "filename" field in the torrent
              TorrentUtils.copyToFile(dms[i].getDownloadState().getTorrent(), target);

              // now remove the non-standard entries
              TOTorrent dest = TOTorrentFactory.deserialiseFromBEncodedFile(target);
              dest.removeAdditionalProperties();
              dest.serialiseToBEncodedFile(target);
            } // end for
          } // end try
          catch (Throwable e) {
            Logger.log(new LogAlert(dms[i], LogAlert.UNREPEATABLE, "Torrent export failed", e));
          }
        } // end run()
      }); // end DMTask
     
      // Advanced > Export > WebSeed URL
      final MenuItem itemWebSeed = new MenuItem(menuExport, SWT.PUSH);
      Messages.setLanguageText(itemWebSeed, "MyTorrentsView.menu.exporthttpseeds");
      itemWebSeed.addListener(SWT.Selection, new DMTask(dms) {
        public void run(DownloadManager[] dms) {
          final String  NL = "\r\n";
          String  data = "";
         
          boolean http_enable = COConfigurationManager.getBooleanParameter( "HTTP.Data.Listen.Port.Enable" );
         
          String  port;
         
          if ( http_enable ){
           
            int  p = COConfigurationManager.getIntParameter( "HTTP.Data.Listen.Port" );
            int o = COConfigurationManager.getIntParameter( "HTTP.Data.Listen.Port.Override" );
             
            if ( o == 0 ){
             
              port = String.valueOf( p );
             
            }else{
             
              port = String.valueOf( o );
            }
          }else{

            data = "You need to enable the HTTP port or modify the URL(s) appropriately" + NL + NL;
           
            port = "<port>";
          }
           
          String  ip = COConfigurationManager.getStringParameter( "Tracker IP", "" );
         
          if ( ip.length() == 0 ){
           
            data += "You might need to modify the host address in the URL(s)" + NL + NL;
           
            try{
           
              InetAddress ia = AzureusCoreFactory.getSingleton().getInstanceManager().getMyInstance().getExternalAddress();
           
              if ( ia != null ){
               
                ip = IPToHostNameResolver.syncResolve( ia.getHostAddress(), 10000 );
              }
            }catch( Throwable e ){
             
            }
           
            if ( ip.length() == 0 ){
             
              ip = "<host>";
            }
          }
         
          String  base = "http://" + UrlUtils.convertIPV6Host(ip) + ":" + port + "/";
         
          for (int i=0;i<dms.length;i++){
           
            DownloadManager dm = dms[i];
           
            if ( dm == null ){
              continue;
            }
           
            TOTorrent torrent = dm.getTorrent();
           
            if ( torrent == null ){
             
              continue;
            }
           
            data += base + "webseed" + NL;
           
            try{
              data += base + "files/" + URLEncoder.encode( new String( torrent.getHash(), "ISO-8859-1"), "ISO-8859-1" ) + "/" + NL + NL;
             
            }catch( Throwable e ){
             
            }
          }
         
          if ( data.length() > 0){
            ClipboardCopy.copyToClipBoard( data );
          }
        }
      });
    } // export menu

   
    // === advanced > options ===
    // ===========================

    if (userMode > 0) {
      final MenuItem itemExportXML = new MenuItem(menuAdvanced, SWT.PUSH);
      Messages.setLanguageText(itemExportXML, "MainWindow.menu.view.configuration");
      itemExportXML.addListener(SWT.Selection, new DMTask(dms) {
        public void run(DownloadManager[] dms) {
          UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
         
          uiFunctions.openView(UIFunctions.VIEW_DM_MULTI_OPTIONS, dms);
        }
      });
    }
    // === advanced > peer sources ===
    // ===============================
View Full Code Here

      public void run(DownloadManager dm) {
        ManagerUtils.host(azureus_core, dm, composite);
      }
    };
    task.go();
    UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
    if (uiFunctions != null) {
      uiFunctions.openView(UIFunctions.VIEW_MYTRACKER, null);
    }
  }
View Full Code Here

      public void run(DownloadManager dm) {
        ManagerUtils.publish(azureus_core, dm, composite);
      }
    };
    task.go();
    UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
    if (uiFunctions != null) {
      uiFunctions.openView(UIFunctions.VIEW_MYTRACKER, null);
    }
  }
View Full Code Here

    item.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        MessageText.loadBundle(true);
        DisplayFormatters.setUnits();
        DisplayFormatters.loadMessages();
        UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
        if (uiFunctions != null) {
          uiFunctions.refreshLanguage();
        }
      }
    });
   
    item = new MenuItem(menuDebug, SWT.CHECK);
View Full Code Here

                installer.destroy();
              }
            }catch( Throwable e ){
            }
           
            UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
           
            if ( uiFunctions != null ){
             
              uiFunctions.dispose(false, false);
            }
           
            return;
           
          }else if ( arg.equalsIgnoreCase( "--open" )){
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.ui.UIFunctions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.