Class PageSplitter


  • public class PageSplitter
    extends java.lang.Object
    Utility 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
    • 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
      void setWordSplitter​(IWordSplitter splitter)  
      java.util.List<Page> splitIntoPages​(ch.sahits.game.openpatrician.utilities.model.Text text)
      Splitting up the text onto pages.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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 page
        pageWidth - width of a page
        lineSpacing - spacing between two lines
        initialHeigth - initial height of the page
        font - 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.