当前位置: 首页>>代码示例>>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;未经允许,请勿转载。