本文整理汇总了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();
}
}
示例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);
}
示例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);
}
示例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);
}
示例5: onDownloadUpdated
import org.cef.callback.CefDownloadItemCallback; //导入依赖的package包/类
@Override
public void onDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback) {
}
示例6: onDownloadUpdated
import org.cef.callback.CefDownloadItemCallback; //导入依赖的package包/类
@Override
public void onDownloadUpdated(CefBrowser browser,
CefDownloadItem downloadItem, CefDownloadItemCallback callback) {
}
示例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);
示例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);