當前位置: 首頁>>代碼示例>>Java>>正文


Java CefDownloadItemCallback類代碼示例

本文整理匯總了Java中org.cef.callback.CefDownloadItemCallback的典型用法代碼示例。如果您正苦於以下問題:Java CefDownloadItemCallback類的具體用法?Java CefDownloadItemCallback怎麽用?Java CefDownloadItemCallback使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CefDownloadItemCallback類屬於org.cef.callback包,在下文中一共展示了CefDownloadItemCallback類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: update

import org.cef.callback.CefDownloadItemCallback; //導入依賴的package包/類
void update(CefDownloadItem downloadItem, CefDownloadItemCallback callback) {
  int percentComplete = downloadItem.getPercentComplete();
  String rcvBytes = humanReadableByteCount(downloadItem.getReceivedBytes());
  String totalBytes = humanReadableByteCount(downloadItem.getTotalBytes());
  String speed = humanReadableByteCount(downloadItem.getCurrentSpeed()) + "it/s";

  if (downloadItem.getReceivedBytes() >= 5 && isHidden_) {
    dialog_.setVisible(true);
    dialog_.toFront();
    owner_.toBack();
    isHidden_ = false;
  }
  Runtime.getRuntime().runFinalization();

  callback_ = callback;
  status_.setText(rcvBytes + " of " + totalBytes + " - " + percentComplete + "%" + " - " + speed);
  dlAbort_.setEnabled(downloadItem.isInProgress());
  dlRemoveEntry_.setEnabled(!downloadItem.isInProgress() || downloadItem.isCanceled() || downloadItem.isComplete());
  if (!downloadItem.isInProgress() && !downloadItem.isCanceled() && !downloadItem.isComplete()) {
    fileName_.setText("FAILED - " + fileName_.getText());
    callback.cancel();
  }
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:24,代碼來源:DownloadDialog.java

示例2: onDownloadUpdated

import org.cef.callback.CefDownloadItemCallback; //導入依賴的package包/類
@Override
public void onDownloadUpdated(CefBrowser browser,
                              CefDownloadItem downloadItem,
                              CefDownloadItemCallback callback) {
  DownloadObject dlObject = downloadObjects_.get(downloadItem.getId());
  if (dlObject == null)
    return;
  dlObject.update(downloadItem, callback);
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:10,代碼來源:DownloadDialog.java

示例3: onDownloadUpdated

import org.cef.callback.CefDownloadItemCallback; //導入依賴的package包/類
@Override
public void onDownloadUpdated(CefBrowser browser,
                              CefDownloadItem downloadItem,
                              CefDownloadItemCallback callback) {
  if (downloadHandler_ != null && browser != null)
    downloadHandler_.onDownloadUpdated(browser, downloadItem, callback);
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:8,代碼來源:CefClient.java

示例4: onDownloadUpdated

import org.cef.callback.CefDownloadItemCallback; //導入依賴的package包/類
@Override
public void onDownloadUpdated(CefBrowser browser,
		CefDownloadItem downloadItem, 
                       CefDownloadItemCallback callback) {
	if (downloadHandler_ != null && browser != null)
		downloadHandler_.onDownloadUpdated(browser, downloadItem, callback);
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:8,代碼來源:CefClient.java

示例5: onDownloadUpdated

import org.cef.callback.CefDownloadItemCallback; //導入依賴的package包/類
@Override
public void onDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback) {
}
 
開發者ID:Panda-Programming-Language,項目名稱:Pandomium,代碼行數:4,代碼來源:CefDownloadHandlerAdapter.java

示例6: onDownloadUpdated

import org.cef.callback.CefDownloadItemCallback; //導入依賴的package包/類
@Override
public void onDownloadUpdated(CefBrowser browser,
    CefDownloadItem downloadItem, CefDownloadItemCallback callback) {
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:5,代碼來源:CefDownloadHandlerAdapter.java

示例7: onDownloadUpdated

import org.cef.callback.CefDownloadItemCallback; //導入依賴的package包/類
/**
 * Called when a download's status or progress information has been updated.
 *
 * @param browser      The desired browser.
 * @param downloadItem The downloading item.
 * @param callback     Execute callback to cancel the download
 */
public void onDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback);
 
開發者ID:Panda-Programming-Language,項目名稱:Pandomium,代碼行數:9,代碼來源:CefDownloadHandler.java

示例8: onDownloadUpdated

import org.cef.callback.CefDownloadItemCallback; //導入依賴的package包/類
/**
 * Called when a download's status or progress information has been updated.
 * @param browser The desired browser.
 * @param downloadItem The downloading item.
 * @param callback Execute callback to cancel the download
 */
public void onDownloadUpdated(CefBrowser browser,
                              CefDownloadItem downloadItem,
                              CefDownloadItemCallback callback);
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:10,代碼來源:CefDownloadHandler.java


注:本文中的org.cef.callback.CefDownloadItemCallback類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。