com.dlsc.flexgantt.model.paging
Interface IPagingModel

All Known Implementing Classes:
DefaultPagingModel

public interface IPagingModel

A model used for implementing a paging concept within the Gantt chart. When a paging model has been assigned to the Gantt chart then the Gantt chart will display a paging control in the lower-left corner of the layer container. This control allows the user to change the time span of the Gantt chart with a single click. Listeners can be attached to this model so that the application can perform operations like lazy loading of timeline objects whenever the user switches to a page that hasn't been loaded, yet.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
AbstractGanttChart.setPagingModel(IPagingModel)

Method Summary
 void addPagingModelListener(IPagingModelListener l)
          Adds a listener to the paging model.
 void earlierPage()
          Goto the next page that has a smaller start time than the currently used page.
 void firstPage()
          Goto the first page.
 Page getPage()
          Returns the currently used page.
 Page getPage(int index)
          Returns the page for the given index.
 int getPageCount()
          Returns the total number of pages added to the model.
 boolean hasEarlierPage()
          Determines if the model has a page that starts earlier than the currently used page.
 boolean hasLaterPage()
          Determines if the model has a page that starts later than the currently used page.
 void lastPage()
          Goto the last page.
 void laterPage()
          Goto the next page that has a larger start time than the currently used page.
 void removePagingModelListener(IPagingModelListener l)
          Removes a listener from the paging model.
 void setPage(Page page)
          Sets a new page to be used.
 

Method Detail

getPageCount

int getPageCount()
Returns the total number of pages added to the model.

Returns:
the total number of pages in the model
Since:
1.0
See Also:
getPage(int)

getPage

Page getPage(int index)
Returns the page for the given index.

Parameters:
index -
Returns:
a page for the given index
Since:
1.0
See Also:
getPageCount()

getPage

Page getPage()
Returns the currently used page.

Returns:
the currently used page
Since:
1.0
See Also:
setPage(Page)

setPage

void setPage(Page page)
Sets a new page to be used.

Parameters:
page - the new page to use for display
Since:
1.0

firstPage

void firstPage()
Goto the first page.

Since:
1.0

earlierPage

void earlierPage()
Goto the next page that has a smaller start time than the currently used page.

Since:
1.0

laterPage

void laterPage()
Goto the next page that has a larger start time than the currently used page.

Since:
1.0

lastPage

void lastPage()
Goto the last page.

Since:
1.0

hasEarlierPage

boolean hasEarlierPage()
Determines if the model has a page that starts earlier than the currently used page.

Returns:
TRUE if a page exists that has a smaller start time than the currently used page
Since:
1.0
See Also:
earlierPage()

hasLaterPage

boolean hasLaterPage()
Determines if the model has a page that starts later than the currently used page.

Returns:
TRUE if a page exists that has a larger start time than the currently used page
Since:
1.0
See Also:
laterPage()

addPagingModelListener

void addPagingModelListener(IPagingModelListener l)
Adds a listener to the paging model.

Parameters:
l - the listener to add to the model
Since:
1.0

removePagingModelListener

void removePagingModelListener(IPagingModelListener l)
Removes a listener from the paging model.

Parameters:
l - the listener to remove from the model
Since:
1.0