当前位置: 首页>>代码示例>>Java>>正文


Java WebHistory.getEntries方法代码示例

本文整理汇总了Java中javafx.scene.web.WebHistory.getEntries方法的典型用法代码示例。如果您正苦于以下问题:Java WebHistory.getEntries方法的具体用法?Java WebHistory.getEntries怎么用?Java WebHistory.getEntries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.web.WebHistory的用法示例。


在下文中一共展示了WebHistory.getEntries方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: goBack

import javafx.scene.web.WebHistory; //导入方法依赖的package包/类
public void goBack(){
    final WebHistory history = webEngine.getHistory();
    ObservableList<WebHistory.Entry> entryList = history.getEntries();
    int currentIndex = history.getCurrentIndex();
    Platform.runLater(new Runnable() {
        @Override
        public void run() {
            try {
                history.go(-1);
            }catch(Exception e){
                webEngine.loadContent(body);
            }
        }
    });
}
 
开发者ID:ashoknailwal,项目名称:desktop-gmail-client,代码行数:16,代码来源:ZoomInMailView.java

示例2: goBack

import javafx.scene.web.WebHistory; //导入方法依赖的package包/类
public String goBack() {
    final WebHistory history = webEngine.getHistory();
    ObservableList<WebHistory.Entry> entryList = history.getEntries();
    int currentIndex = history.getCurrentIndex();
    //    Out("currentIndex = "+currentIndex);
    //    Out(entryList.toString().replace("],","]\n"));
    if (currentIndex > 0) {
        Platform.runLater(() -> {
            history.go(-1);
        });
    }
    return entryList.get(currentIndex > 0 ? currentIndex - 1 : currentIndex).getUrl();
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:14,代码来源:FInfoDialogWeb.java

示例3: goForward

import javafx.scene.web.WebHistory; //导入方法依赖的package包/类
public String goForward() {
    final WebHistory history = webEngine.getHistory();
    ObservableList<WebHistory.Entry> entryList = history.getEntries();
    int currentIndex = history.getCurrentIndex();
    //    Out("currentIndex = "+currentIndex);
    //    Out(entryList.toString().replace("],","]\n"));
    if (currentIndex < entryList.size() - 1) {
        Platform.runLater(() -> {
            history.go(1);
        });
    }
    return entryList
        .get(currentIndex < entryList.size() - 1 ? currentIndex + 1 : currentIndex)
        .getUrl();
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:16,代码来源:FInfoDialogWeb.java

示例4: goBack

import javafx.scene.web.WebHistory; //导入方法依赖的package包/类
public String goBack() {
    final WebHistory history = webEngine.getHistory();
    ObservableList<WebHistory.Entry> entryList = history.getEntries();
    int currentIndex = history.getCurrentIndex();
    //    Out("currentIndex = "+currentIndex);
    //    Out(entryList.toString().replace("],","]\n"));
    Platform.runLater(() -> {
        history.go(-1);
    });
    return entryList.get(currentIndex > 0 ? currentIndex - 1 : currentIndex).getUrl();
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:12,代码来源:BrowserFX.java

示例5: goForward

import javafx.scene.web.WebHistory; //导入方法依赖的package包/类
public String goForward() {
    final WebHistory history = webEngine.getHistory();
    ObservableList<WebHistory.Entry> entryList = history.getEntries();
    int currentIndex = history.getCurrentIndex();
    //    Out("currentIndex = "+currentIndex);
    //    Out(entryList.toString().replace("],","]\n"));
    Platform.runLater(() -> {
        history.go(1);
    });
    return entryList
        .get(currentIndex < entryList.size() - 1 ? currentIndex + 1 : currentIndex)
        .getUrl();
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:14,代码来源:BrowserFX.java

示例6: goBack

import javafx.scene.web.WebHistory; //导入方法依赖的package包/类
public String goBack()
    {    
      final WebHistory history = engine.getHistory();
      ObservableList<WebHistory.Entry> entryList=history.getEntries();
      int currentIndex=history.getCurrentIndex();
//      Out("currentIndex = "+currentIndex);
//      Out(entryList.toString().replace("],","]\n"));

      Platform.runLater(new Runnable() { public void run() { history.go(-1); } });
      return entryList.get(currentIndex>0?currentIndex-1:currentIndex).getUrl();
    }
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:12,代码来源:OneNameControllerDisplay.java

示例7: goForward

import javafx.scene.web.WebHistory; //导入方法依赖的package包/类
public String goForward()
    {    
      final WebHistory history=engine.getHistory();
      ObservableList<WebHistory.Entry> entryList=history.getEntries();
      int currentIndex=history.getCurrentIndex();
//      Out("currentIndex = "+currentIndex);
//      Out(entryList.toString().replace("],","]\n"));

      Platform.runLater(new Runnable() { public void run() { history.go(1); } });
      return entryList.get(currentIndex<entryList.size()-1?currentIndex+1:currentIndex).getUrl();
    }
 
开发者ID:BitcoinAuthenticator,项目名称:Wallet,代码行数:12,代码来源:OneNameControllerDisplay.java


注:本文中的javafx.scene.web.WebHistory.getEntries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。