juife
v0.1a

net.sf.juife
Interface NavigationHistoryModel

All Known Implementing Classes:
DefaultNavigationHistoryModel

public interface NavigationHistoryModel

This interface defines the data model for the navigation history list in NavigationPane.

The change of the current page can be handled by registering an ActionListener using the addActionListener(java.awt.event.ActionListener) method.


Method Summary
 void addActionListener(java.awt.event.ActionListener l)
          Registers the specified ActionListener to be notified about changes of the history list.
 void addPage(NavigationPage page)
          Adds the specified page to the history list after the current page.
 void clearHistory()
          Removes all pages from history list except the current page.
 NavigationPage getCurrentPage()
          Gets the current page in the history list.
 int getPageCount()
          Gets the current number of pages in the history list.
 NavigationPage goBack()
          Goes to the previous page in the history list.
 void goFirst()
          Goes to the first page in the history list.
 NavigationPage goForward()
          Goes to the next page in the history list.
 void goLast()
          Goes to the last page in the history list.
 boolean hasBack()
          Determines whether there is at least one page before the current page in the history list.
 boolean hasForward()
          Determines whether there is at least one page after the current page in the history list.
 void removeActionListener(java.awt.event.ActionListener l)
          Removes the specified listener.
 

Method Detail

addActionListener

void addActionListener(java.awt.event.ActionListener l)
Registers the specified ActionListener to be notified about changes of the history list.

Parameters:
l - The ActionListener to register.

removeActionListener

void removeActionListener(java.awt.event.ActionListener l)
Removes the specified listener.

Parameters:
l - The ActionListener to remove.

addPage

void addPage(NavigationPage page)
Adds the specified page to the history list after the current page. All pages after the the current page are removed from the history list and the added page becomes current.

Parameters:
page - The page to be added to the history list.

goBack

NavigationPage goBack()
Goes to the previous page in the history list. This means that the previous page becomes the current page of the history list.

Returns:
The new current page or null if there is no previous page in the history list.
See Also:
hasBack()

hasBack

boolean hasBack()
Determines whether there is at least one page before the current page in the history list.

Returns:
true if there is at least one page before the current page in the history list, false otherwise.

goForward

NavigationPage goForward()
Goes to the next page in the history list. This means that the next page becomes the current page of the history list.

Returns:
The new current page or null if there is no next page in the history list.
See Also:
hasForward()

hasForward

boolean hasForward()
Determines whether there is at least one page after the current page in the history list.

Returns:
true if there is at least one page after the current page in the history list, false otherwise.

goFirst

void goFirst()
Goes to the first page in the history list. This means that the first page becomes the current page of the history list.


goLast

void goLast()
Goes to the last page in the history list. This means that the last page becomes the current page of the history list.


getCurrentPage

NavigationPage getCurrentPage()
Gets the current page in the history list.

Returns:
The current page in the history list or null if the history list is empty.

getPageCount

int getPageCount()
Gets the current number of pages in the history list.

Returns:
The current number of pages in the history list.

clearHistory

void clearHistory()
Removes all pages from history list except the current page.


juife
v0.1a

Copyright © 2005 Grigor Iliev. All rights reserved. SourceForge.net Logo