@Test public void manyShortWordsWithEnoughSpace() throws Exception { StringStyle[] style = TextSplitter.splitStringAlgorithm("test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test", 5000.0, dimensionCalculatorDrawHandler); assertContentEquals(style, Arrays.asList("test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test")); }
public static StringStyle[] splitStringAlgorithm(String text, double width, DrawHandler drawer) { return splitStringAndHeightAlgorithm(text, width, drawer).getWrappedLines(); }
TextSplitter { public static StringStyle[] splitStringAlgorithm(String text, double width, DrawHandler drawer) { return splitStringAndHeightAlgorithm(text, width, drawer).getWrappedLines(); } }
TextSplitter { public static StringStyle[] splitStringAlgorithm(String text, double width, DrawHandler drawer) { return splitStringAndHeightAlgorithm(text, width, drawer).getWrappedLines(); }  }
TextSplitter { public static StringStyle[] splitStringAlgorithm(String text, double width, DrawHandler drawer) { return splitStringAndHeightAlgorithm(text, width, drawer).getWrappedLines(); }  static void drawText(DrawHandler drawer, String[] textLines, double topLeftX, double topLeftY, double width, double height, AlignHorizontal hAlignment, AlignVertical vAlignment); static boolean checkifStringFitsNoWordwrap(String text, double width, DrawHandler drawer); static boolean checkifStringFitsWithWordwrap(String text, double width, DrawHandler drawer); static double getSplitStringHeight(String text, double width, DrawHandler drawer); static double getSplitStringHeight(String[] textLines, double width, DrawHandler drawer); static StringStyle[] splitStringAlgorithm(String text, double width, DrawHandler drawer); static double getTextMinWidth(String text, DrawHandler drawer); static double getTextMinWidth(String[] textLines, DrawHandler drawer); }
TextSplitter { public static StringStyle[] splitStringAlgorithm(String text, double width, DrawHandler drawer) { return splitStringAndHeightAlgorithm(text, width, drawer).getWrappedLines(); }  static void drawText(DrawHandler drawer, String[] textLines, double topLeftX, double topLeftY, double width, double height, AlignHorizontal hAlignment, AlignVertical vAlignment); static boolean checkifStringFitsNoWordwrap(String text, double width, DrawHandler drawer); static boolean checkifStringFitsWithWordwrap(String text, double width, DrawHandler drawer); static double getSplitStringHeight(String text, double width, DrawHandler drawer); static double getSplitStringHeight(String[] textLines, double width, DrawHandler drawer); static StringStyle[] splitStringAlgorithm(String text, double width, DrawHandler drawer); static double getTextMinWidth(String text, DrawHandler drawer); static double getTextMinWidth(String[] textLines, DrawHandler drawer);  }