本文整理匯總了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);