@Test public void firstWordIsSplitPartiallyIntoSecondLineWithSecondWordThirdWordFitsLine() throws Exception { StringStyle[] style = TextSplitter.splitStringAlgorithm("MessagePresenter (text) text3blaxxxx", 100.0, dimensionCalculatorDrawHandler); assertContentEquals(style, Arrays.asList("MessagePresen", "ter (text)", "text3blaxxxx")); }
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);  }