|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.History
public class History
Representation of the navigation history of a single window.
Constructor Summary | |
---|---|
History(WebWindow window)
Creates a new navigation history for the specified window. |
Method Summary | |
---|---|
protected void |
addPage(Page page)
Adds a new page to the navigation history. |
History |
back()
Goes back one step in the navigation history, if possible. |
History |
forward()
Goes forward one step in the navigation history, if possible. |
int |
getIndex()
Returns the current (zero-based) index within the navigation history. |
int |
getLength()
Returns the length of the navigation history. |
URL |
getUrl(int index)
Returns the URL at the specified index in the navigation history, or null if the index is not valid. |
History |
go(int relativeIndex)
Goes forward or backwards in the navigation history, according to whether the specified relative index is positive or negative. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public History(WebWindow window)
window
- the window which owns the new navigation historyMethod Detail |
---|
public int getLength()
public int getIndex()
public URL getUrl(int index)
index
- the index of the URL to be returned
public History back() throws IOException
IOException
- if an IO error occurspublic History forward() throws IOException
IOException
- if an IO error occurspublic History go(int relativeIndex) throws IOException
relativeIndex
- the index to move to, relative to the current index
IOException
- if an IO error occurspublic String toString()
toString
in class Object
protected void addPage(Page page)
page
- the page to add to the navigation history
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |