public class NavigationHistory
extends java.lang.Object
Constructor and Description |
---|
NavigationHistory() |
Modifier and Type | Method and Description |
---|---|
HistoryElement |
back()
Apply a back action.
|
HistoryElement |
back(HistoryElement element)
Apply a back action.
|
HistoryElement |
back(java.lang.String urlS)
Apply a back action.
|
HistoryElement |
back(java.lang.String urlS,
java.lang.String anchor)
Apply a back action.
|
void |
clear()
Clear the history.
|
HistoryElement |
forward()
Apply a forward action.
|
int |
getCurrentSize()
Return the current size of the history.
|
boolean |
hasNext()
Return true if the history has a next element.
|
boolean |
hasPrevious()
Return true if the history has a previous lement.
|
void |
setMaxSize(int maxSize)
Set the maximum size of the history.
|
void |
visit(HistoryElement element)
Visit a history element.
|
void |
visit(java.lang.String urlS)
Visit an URL.
|
void |
visit(java.lang.String urlS,
java.lang.String anchor)
Visit an URL.
|
void |
visit(java.net.URL url)
Visit an URL.
|
void |
visit(java.net.URL url,
java.lang.String anchor)
Visit an URL.
|
public void setMaxSize(int maxSize)
maxSize
- the maximum sizepublic int getCurrentSize()
public boolean hasPrevious()
public boolean hasNext()
public HistoryElement back(java.lang.String urlS)
urlS
- the current URL as a Stringpublic HistoryElement back(java.lang.String urlS, java.lang.String anchor)
urlS
- the current URL as a Stringanchor
- the anchorpublic HistoryElement back()
public HistoryElement back(HistoryElement element)
element
- the history elementpublic HistoryElement forward()
public void visit(java.lang.String urlS)
urlS
- the URL as a Stringpublic void visit(HistoryElement element)
element
- the history elementpublic void visit(java.lang.String urlS, java.lang.String anchor)
urlS
- the URL as a Stringanchor
- the anchorpublic void visit(java.net.URL url)
url
- the URLpublic void visit(java.net.URL url, java.lang.String anchor)
url
- the URLanchor
- the anchorpublic void clear()
Copyright © 2016-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence