<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_191) on Wed Oct 31 14:02:11 UTC 2018 --> <title>WebHistory (JavaFX 8)</title> <meta name="date" content="2018-10-31"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="WebHistory (JavaFX 8)"; } } catch(err) { } //--> var methods = {"i0":10,"i1":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/WebHistory.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">JavaFX 8</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../javafx/scene/web/WebEvent.html" title="class in javafx.scene.web"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../javafx/scene/web/WebHistory.Entry.html" title="class in javafx.scene.web"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?javafx/scene/web/WebHistory.html" target="_top">Frames</a></li> <li><a href="WebHistory.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li><a href="#nested.class.summary">Nested</a> | </li> <li>Field | </li> <li>Constr | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li>Constr | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">javafx.scene.web</div> <h2 title="Class WebHistory" class="title">Class WebHistory</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>javafx.scene.web.WebHistory</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public final class <span class="typeNameLabel">WebHistory</span> extends java.lang.Object</pre> <div class="block">The <code>WebHistory</code> class represents a session history associated with a <a href="../../../javafx/scene/web/WebEngine.html" title="class in javafx.scene.web"><code>WebEngine</code></a> instance. A single instance of <code>WebHistory</code> for a particular web engine can be obtained through the <a href="../../../javafx/scene/web/WebEngine.html#getHistory--"><code>WebEngine.getHistory()</code></a> method. The history is basically a list of entries. Each entry represents a visited page and it provides access to relevant page info, such as URL, title, and the date the page was last visited. Entries in the list are arranged in the order in which the corresponding pages were visited from oldest to newest. The list can be obtained by using the <a href="../../../javafx/scene/web/WebHistory.html#getEntries--"><code>getEntries()</code></a> method. The history and the corresponding list of entries change as <code>WebEngine</code> navigates across the web. The list may expand or shrink depending on browser actions. These changes can be listened to by the <a href="../../../javafx/collections/ObservableList.html" title="interface in javafx.collections"><code>ObservableList</code></a> API that the list exposes. The index of the history entry associated with the currently visited page is represented by the <a href="../../../javafx/scene/web/WebHistory.html#currentIndexProperty--"><code>currentIndexProperty()</code></a>. The current index can be used to navigate to any entry in the history by using the <a href="../../../javafx/scene/web/WebHistory.html#go-int-"><code>go(int)</code></a> method. The <a href="../../../javafx/scene/web/WebHistory.html#maxSizeProperty--"><code>maxSizeProperty()</code></a> sets the maximum history size, which is the size of the history list.</div> <dl> <dt><span class="simpleTagLabel">Since:</span></dt> <dd>JavaFX 2.2</dd> </dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== PROPERTY SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="property.summary"> <!-- --> </a> <h3>Property Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Property Summary table, listing properties, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Type</th> <th class="colLast" scope="col">Property and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/web/WebHistory.html#currentIndexProperty">currentIndex</a></span></code> <div class="block">Defines the index of the current <code>Entry</code> in the history.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/web/WebHistory.html#maxSizeProperty">maxSize</a></span></code> <div class="block">Defines the maximum size of the history list.</div> </td> </tr> </table> </li> </ul> <!-- ======== NESTED CLASS SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="nested.class.summary"> <!-- --> </a> <h3>Nested Class Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>class </code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/web/WebHistory.Entry.html" title="class in javafx.scene.web">WebHistory.Entry</a></span></code> <div class="block">The <code>Entry</code> class represents a single entry in the session history.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/web/WebHistory.html#currentIndexProperty--">currentIndexProperty</a></span>()</code> <div class="block">Defines the index of the current <code>Entry</code> in the history.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/web/WebHistory.html#getCurrentIndex--">getCurrentIndex</a></span>()</code> <div class="block">Gets the value of the property currentIndex.</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code><a href="../../../javafx/collections/ObservableList.html" title="interface in javafx.collections">ObservableList</a><<a href="../../../javafx/scene/web/WebHistory.Entry.html" title="class in javafx.scene.web">WebHistory.Entry</a>></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/web/WebHistory.html#getEntries--">getEntries</a></span>()</code> <div class="block">Returns an unmodifiable observable list of all entries in the history.</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/web/WebHistory.html#getMaxSize--">getMaxSize</a></span>()</code> <div class="block">Gets the value of the property maxSize.</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/web/WebHistory.html#go-int-">go</a></span>(int offset)</code> <div class="block">Navigates the web engine to the URL defined by the <code>Entry</code> object within the specified position relative to the current entry.</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/web/WebHistory.html#maxSizeProperty--">maxSizeProperty</a></span>()</code> <div class="block">Defines the maximum size of the history list.</div> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/scene/web/WebHistory.html#setMaxSize-int-">setMaxSize</a></span>(int value)</code> <div class="block">Sets the value of the property maxSize.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ PROPERTY DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="property.detail"> <!-- --> </a> <h3>Property Detail</h3> <a name="currentIndexProperty"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>currentIndex</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a> currentIndexProperty</pre> <div class="block">Defines the index of the current <code>Entry</code> in the history. The current entry is the entry associated with the currently loaded page. The index belongs to the range of (<tt>index >= 0 && index < getEntries().size()</tt>)</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/web/WebHistory.html#getCurrentIndex--"><code>getCurrentIndex()</code></a></dd> </dl> </li> </ul> <a name="maxSizeProperty"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>maxSize</h4> <pre>public <a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a> maxSizeProperty</pre> <div class="block">Defines the maximum size of the history list. If the list reaches its maximum and a new entry is added, the first entry is removed from the history. <p> The value specified for this property can not be negative, otherwise <code>IllegalArgumentException</code> is thrown.</div> <dl> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>100</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/web/WebHistory.html#getMaxSize--"><code>getMaxSize()</code></a>, <a href="../../../javafx/scene/web/WebHistory.html#setMaxSize-int-"><code>setMaxSize(int)</code></a></dd> </dl> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="currentIndexProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>currentIndexProperty</h4> <pre>public <a href="../../../javafx/beans/property/ReadOnlyIntegerProperty.html" title="class in javafx.beans.property">ReadOnlyIntegerProperty</a> currentIndexProperty()</pre> <div class="block">Defines the index of the current <code>Entry</code> in the history. The current entry is the entry associated with the currently loaded page. The index belongs to the range of (<tt>index >= 0 && index < getEntries().size()</tt>)</div> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/web/WebHistory.html#getCurrentIndex--"><code>getCurrentIndex()</code></a></dd> </dl> </li> </ul> <a name="getCurrentIndex--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getCurrentIndex</h4> <pre>public int getCurrentIndex()</pre> <div class="block">Gets the value of the property currentIndex.</div> <dl> <dt><span class="simpleTagLabel">Property description:</span></dt> <dd>Defines the index of the current <code>Entry</code> in the history. The current entry is the entry associated with the currently loaded page. The index belongs to the range of (<tt>index >= 0 && index < getEntries().size()</tt>)</dd> </dl> </li> </ul> <a name="maxSizeProperty--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>maxSizeProperty</h4> <pre>public <a href="../../../javafx/beans/property/IntegerProperty.html" title="class in javafx.beans.property">IntegerProperty</a> maxSizeProperty()</pre> <div class="block">Defines the maximum size of the history list. If the list reaches its maximum and a new entry is added, the first entry is removed from the history. <p> The value specified for this property can not be negative, otherwise <code>IllegalArgumentException</code> is thrown.</div> <dl> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>100</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/scene/web/WebHistory.html#getMaxSize--"><code>getMaxSize()</code></a>, <a href="../../../javafx/scene/web/WebHistory.html#setMaxSize-int-"><code>setMaxSize(int)</code></a></dd> </dl> </li> </ul> <a name="setMaxSize-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setMaxSize</h4> <pre>public void setMaxSize(int value)</pre> <div class="block">Sets the value of the property maxSize.</div> <dl> <dt><span class="simpleTagLabel">Property description:</span></dt> <dd>Defines the maximum size of the history list. If the list reaches its maximum and a new entry is added, the first entry is removed from the history. <p> The value specified for this property can not be negative, otherwise <code>IllegalArgumentException</code> is thrown.</dd> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>100</dd> </dl> </li> </ul> <a name="getMaxSize--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getMaxSize</h4> <pre>public int getMaxSize()</pre> <div class="block">Gets the value of the property maxSize.</div> <dl> <dt><span class="simpleTagLabel">Property description:</span></dt> <dd>Defines the maximum size of the history list. If the list reaches its maximum and a new entry is added, the first entry is removed from the history. <p> The value specified for this property can not be negative, otherwise <code>IllegalArgumentException</code> is thrown.</dd> <dt><span class="simpleTagLabel">Default value:</span></dt> <dd>100</dd> </dl> </li> </ul> <a name="getEntries--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getEntries</h4> <pre>public <a href="../../../javafx/collections/ObservableList.html" title="interface in javafx.collections">ObservableList</a><<a href="../../../javafx/scene/web/WebHistory.Entry.html" title="class in javafx.scene.web">WebHistory.Entry</a>> getEntries()</pre> <div class="block">Returns an unmodifiable observable list of all entries in the history.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>list of all history entries</dd> </dl> </li> </ul> <a name="go-int-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>go</h4> <pre>public void go(int offset) throws java.lang.IndexOutOfBoundsException</pre> <div class="block">Navigates the web engine to the URL defined by the <code>Entry</code> object within the specified position relative to the current entry. A negative <code>offset</code> value specifies the position preceding to the current entry, and a positive <code>offset</code> value specifies the position following the current entry. For example, -1 points to the previous entry, and 1 points to the next entry, corresponding to pressing a web browser's 'back' and 'forward' buttons, respectively. The zero <code>offset</code> value is silently ignored (no-op). The effective entry position should belong to the rage of [0..size-1]. Otherwise, <code>IndexOutOfBoundsException</code> is thrown.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>offset</code> - a negative value specifies a position preceding the current entry, a positive value specifies a position following the current entry, zero value causes no effect</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.IndexOutOfBoundsException</code> - if the effective entry position is out of range</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/WebHistory.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">JavaFX 8</div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../javafx/scene/web/WebEvent.html" title="class in javafx.scene.web"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../javafx/scene/web/WebHistory.Entry.html" title="class in javafx.scene.web"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?javafx/scene/web/WebHistory.html" target="_top">Frames</a></li> <li><a href="WebHistory.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li><a href="#nested.class.summary">Nested</a> | </li> <li>Field | </li> <li>Constr | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li>Constr | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small><font size="-1"><a href="http://bugreport.java.com/bugreport/" target="_blank">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="https://docs.oracle.com/javase/8/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="https://docs.oracle.com/javase/8/docs/legal/cpyr.html" target="_blank">Copyright</a> © 2008, 2018, Oracle and/or its affiliates. All rights reserved. Use is subject to <a href="http://download.oracle.com/otndocs/jcp/java_se-8-mrel-spec/license.html" target="_blank">license terms</a>. Also see the <a target="_blank" href="http://www.oracle.com/technetwork/java/redist-137594.html" target="_blank">documentation redistribution policy</a>.</font></small></p> </body> </html>