public class Navigator extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
addNavigationEventListener(NavigationEventListener navigationEventListener) |
Book |
getBook() |
String |
getCurrentFragmentId() |
Resource |
getCurrentResource() |
int |
getCurrentSectionPos() |
int |
getCurrentSpinePos()
The current position within the spine.
|
void |
gotoBook(Book book,
Object source) |
int |
gotoFirstSpineSection(Object source) |
int |
gotoLastSpineSection(Object source) |
int |
gotoNextSpineSection(Object source) |
int |
gotoPreviousSpineSection(int pagePos,
Object source) |
int |
gotoPreviousSpineSection(Object source) |
int |
gotoResource(Resource resource,
int pagePos,
Object source) |
int |
gotoResource(Resource resource,
int pagePos,
String fragmentId,
Object source) |
int |
gotoResource(Resource resource,
Object source) |
int |
gotoResource(Resource resource,
String fragmentId,
Object source) |
int |
gotoResource(String resourceHref,
Object source) |
int |
gotoResourceId(String resourceId,
Object source) |
int |
gotoSpineSection(int newSpinePos,
int newPagePos,
Object source)
Go to a specific section.
|
int |
gotoSpineSection(int newSpinePos,
Object source) |
boolean |
hasNextSpineSection() |
boolean |
hasPreviousSpineSection() |
boolean |
removeNavigationEventListener(NavigationEventListener navigationEventListener) |
int |
setCurrentResource(Resource currentResource)
Sets the current index and resource without calling the eventlisteners.
|
void |
setCurrentSpinePos(int currentIndex)
Sets the current index and resource without calling the eventlisteners.
|
public Navigator()
public Navigator(Book book)
public boolean addNavigationEventListener(NavigationEventListener navigationEventListener)
public boolean removeNavigationEventListener(NavigationEventListener navigationEventListener)
public int gotoFirstSpineSection(Object source)
public int gotoPreviousSpineSection(Object source)
public int gotoPreviousSpineSection(int pagePos, Object source)
public boolean hasNextSpineSection()
public boolean hasPreviousSpineSection()
public int gotoNextSpineSection(Object source)
public int gotoResource(Resource resource, int pagePos, String fragmentId, Object source)
public int gotoSpineSection(int newSpinePos, Object source)
public int gotoSpineSection(int newSpinePos, int newPagePos, Object source)
newSpinePos
- source
- public int gotoLastSpineSection(Object source)
public int getCurrentSpinePos()
public Resource getCurrentResource()
public void setCurrentSpinePos(int currentIndex)
currentIndex
- public Book getBook()
public int setCurrentResource(Resource currentResource)
public String getCurrentFragmentId()
public int getCurrentSectionPos()
Copyright © 2009–2017. All rights reserved.