public class NavigationHistory extends Object implements NavigationEventListener
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_HISTORY_SIZE |
Constructor and Description |
---|
NavigationHistory(Navigator navigator) |
Modifier and Type | Method and Description |
---|---|
void |
addLocation(nl.siegmann.epublib.browsersupport.NavigationHistory.Location location)
Adds the location after the current position.
|
void |
addLocation(Resource resource) |
void |
addLocation(String href) |
String |
getCurrentHref() |
int |
getCurrentPos() |
int |
getCurrentSize() |
long |
getHistoryWaitTime()
If the time between a navigation event is less than the historyWaitTime then the new location is not added to the history.
|
int |
getMaxHistorySize() |
void |
initBook(Book book) |
boolean |
move(int delta)
Moves the current positions delta positions.
|
void |
navigationPerformed(NavigationEvent navigationEvent)
If this is not the source of the navigationEvent then the addLocation will be called with the href of the currentResource in the navigationEvent.
|
void |
setHistoryWaitTime(long historyWaitTime) |
void |
setMaxHistorySize(int maxHistorySize) |
public static final int DEFAULT_MAX_HISTORY_SIZE
public NavigationHistory(Navigator navigator)
public int getCurrentPos()
public int getCurrentSize()
public void initBook(Book book)
public long getHistoryWaitTime()
public void setHistoryWaitTime(long historyWaitTime)
public void addLocation(Resource resource)
public void addLocation(nl.siegmann.epublib.browsersupport.NavigationHistory.Location location)
location
- public void addLocation(String href)
public boolean move(int delta)
delta
- public void navigationPerformed(NavigationEvent navigationEvent)
navigationPerformed
in interface NavigationEventListener
public String getCurrentHref()
public void setMaxHistorySize(int maxHistorySize)
public int getMaxHistorySize()
Copyright © 2009–2017. All rights reserved.