public class History extends Object implements Serializable
Constructor and Description |
---|
History(WebWindow window)
Creates a new navigation history for the specified window.
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
removeCurrent()
Removes the current URL from the history.
|
String |
toString() |
public History(WebWindow window)
window
- the window which owns the new navigation historypublic int getLength()
public int getIndex()
public URL getUrl(int index)
index
- the index of the URL to be returnedpublic 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 indexIOException
- if an IO error occurspublic void removeCurrent()
protected void addPage(Page page)
page
- the page to add to the navigation historyCopyright © 2002–2015 Gargoyle Software Inc.. All rights reserved.