Exemplo n.º 1
0
  /**
   * Create a file download window. If no listener is supplied, torrent will be added when download
   * is complete. If a listener is supplied, caller handles it
   *
   * @param _azureus_core
   * @param parent
   * @param url
   * @param referrer
   * @param listener
   */
  public FileDownloadWindow(
      final Shell parent,
      final String url,
      final String referrer,
      final Map request_properties,
      final TorrentDownloaderCallBackInterface listener) {

    this.parent = parent;
    this.original_url = url;
    this.referrer = referrer;
    this.listener = listener;
    this.request_properties = request_properties;

    try {
      decoded_url = URLDecoder.decode(original_url, "UTF8");
    } catch (Throwable e) {
      decoded_url = original_url;
    }
    Utils.execSWTThread(
        new AERunnable() {
          public void runSupport() {
            init();
          }
        });
  }