Class PageSplitter
- java.lang.Object
-
- ch.sahits.game.openpatrician.javafx.control.PageSplitter
-
public class PageSplitter extends java.lang.ObjectUtility class to help separate the spliting up of a text into lines and pages.- Author:
- Andi Hotz, (c) Sahits GmbH, 2013 Created on Aug 7, 2013
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCENTERED_STYLEstatic java.lang.StringHEADING_STYLEstatic java.lang.StringPARAGRAPH_STYLEstatic java.lang.String[]STYLES
-
Constructor Summary
Constructors Constructor Description PageSplitter(double pageHeigth, double pageWidth, double lineSpacing, double initialHeigth, javafx.scene.text.Font font)Initialize the page splitter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetWordSplitter(IWordSplitter splitter)java.util.List<Page>splitIntoPages(ch.sahits.game.openpatrician.utilities.model.Text text)Splitting up the text onto pages.
-
-
-
Field Detail
-
CENTERED_STYLE
public static final java.lang.String CENTERED_STYLE
- See Also:
- Constant Field Values
-
PARAGRAPH_STYLE
public static final java.lang.String PARAGRAPH_STYLE
- See Also:
- Constant Field Values
-
HEADING_STYLE
public static final java.lang.String HEADING_STYLE
- See Also:
- Constant Field Values
-
STYLES
public static final java.lang.String[] STYLES
-
-
Constructor Detail
-
PageSplitter
public PageSplitter(double pageHeigth, double pageWidth, double lineSpacing, double initialHeigth, javafx.scene.text.Font font)Initialize the page splitter.- Parameters:
pageHeigth- height of a pagepageWidth- width of a pagelineSpacing- spacing between two linesinitialHeigth- initial height of the pagefont- to be used.
-
-
Method Detail
-
setWordSplitter
public void setWordSplitter(IWordSplitter splitter)
-
splitIntoPages
public java.util.List<Page> splitIntoPages(ch.sahits.game.openpatrician.utilities.model.Text text)
Splitting up the text onto pages.- Parameters:
text- to be split- Returns:
- list of Pages.
-
-