|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.weblab.portlet.tool.MediaUnitSplitter
public class MediaUnitSplitter
MediaUnitSplitter manage splitted Text media units for pagination. It split a given media unit in pages of given size. It manage page navigation to get page offset of the current part.
| Constructor Summary | |
|---|---|
MediaUnitSplitter()
|
|
MediaUnitSplitter(org.ow2.weblab.core.model.MediaUnit unit,
int textSize)
Constructor |
|
| Method Summary | |
|---|---|
int |
getAvaiblePageCount()
Number of page for this splitter |
int |
getCurrentPageEndOffset()
The end offset of text in the current page |
int |
getCurrentPageIndex()
Current page number |
int |
getCurrentPageStartOffset()
The start offset of text in the current page |
org.ow2.weblab.core.model.MediaUnit |
getMediaUnit()
|
int |
getTextSize()
|
int |
nextPage()
change current page to the next page, if exist. |
int |
prevPage()
change current page to the previous page, if exist. |
int |
setCurrentPageIndex(int currentPage)
Set the current page for this splitter |
void |
setMediaUnit(org.ow2.weblab.core.model.MediaUnit mu)
|
void |
setTextSize(int textSize)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MediaUnitSplitter()
public MediaUnitSplitter(org.ow2.weblab.core.model.MediaUnit unit,
int textSize)
unit - the unit to splittextSize - the size of each parts| Method Detail |
|---|
public int getCurrentPageStartOffset()
public int getCurrentPageEndOffset()
public int nextPage()
public int prevPage()
public int getAvaiblePageCount()
public int getCurrentPageIndex()
public int setCurrentPageIndex(int currentPage)
currentPage - the page number to set
public org.ow2.weblab.core.model.MediaUnit getMediaUnit()
public void setMediaUnit(org.ow2.weblab.core.model.MediaUnit mu)
public int getTextSize()
public void setTextSize(int textSize)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||