@Test public void testTruncateWithLineBreak() { final ITextWrapper wrapper = TextWrapperProvider.get(TextWrapperStrategy.TRUNCATE_WITH_LINE_BREAK, text); assertTrue(wrapper instanceof TextLineBreakTruncateWrapper); }
public static ITextWrapper get(final TextWrapperStrategy strategy, final Text text) { switch (strategy) { case BOUNDS_AND_LINE_BREAKS: return new TextBoundsAndLineBreaksWrap(text); case LINE_BREAK: return new TextLineBreakWrap(text); case NO_WRAP: return new TextNoWrap(text); case TRUNCATE: return new TextLineBreakTruncateWrapper(text, new BoundingBox()); case TRUNCATE_WITH_LINE_BREAK: return new TextLineBreakTruncateWrapper(text, new BoundingBox()); default: return new TextBoundsWrap(text); } }
TextWrapperProvider { public static ITextWrapper get(final TextWrapperStrategy strategy, final Text text) { switch (strategy) { case BOUNDS_AND_LINE_BREAKS: return new TextBoundsAndLineBreaksWrap(text); case LINE_BREAK: return new TextLineBreakWrap(text); case NO_WRAP: return new TextNoWrap(text); case TRUNCATE: return new TextLineBreakTruncateWrapper(text, new BoundingBox()); case TRUNCATE_WITH_LINE_BREAK: return new TextLineBreakTruncateWrapper(text, new BoundingBox()); default: return new TextBoundsWrap(text); } } }
TextWrapperProvider { public static ITextWrapper get(final TextWrapperStrategy strategy, final Text text) { switch (strategy) { case BOUNDS_AND_LINE_BREAKS: return new TextBoundsAndLineBreaksWrap(text); case LINE_BREAK: return new TextLineBreakWrap(text); case NO_WRAP: return new TextNoWrap(text); case TRUNCATE: return new TextLineBreakTruncateWrapper(text, new BoundingBox()); case TRUNCATE_WITH_LINE_BREAK: return new TextLineBreakTruncateWrapper(text, new BoundingBox()); default: return new TextBoundsWrap(text); } }  }
TextWrapperProvider { public static ITextWrapper get(final TextWrapperStrategy strategy, final Text text) { switch (strategy) { case BOUNDS_AND_LINE_BREAKS: return new TextBoundsAndLineBreaksWrap(text); case LINE_BREAK: return new TextLineBreakWrap(text); case NO_WRAP: return new TextNoWrap(text); case TRUNCATE: return new TextLineBreakTruncateWrapper(text, new BoundingBox()); case TRUNCATE_WITH_LINE_BREAK: return new TextLineBreakTruncateWrapper(text, new BoundingBox()); default: return new TextBoundsWrap(text); } }  static ITextWrapper get(final TextWrapperStrategy strategy,
                                   final Text text); }
TextWrapperProvider { public static ITextWrapper get(final TextWrapperStrategy strategy, final Text text) { switch (strategy) { case BOUNDS_AND_LINE_BREAKS: return new TextBoundsAndLineBreaksWrap(text); case LINE_BREAK: return new TextLineBreakWrap(text); case NO_WRAP: return new TextNoWrap(text); case TRUNCATE: return new TextLineBreakTruncateWrapper(text, new BoundingBox()); case TRUNCATE_WITH_LINE_BREAK: return new TextLineBreakTruncateWrapper(text, new BoundingBox()); default: return new TextBoundsWrap(text); } }  static ITextWrapper get(final TextWrapperStrategy strategy,
                                   final Text text);  }