Search in sources :

Example 1 with ITextWrapper

use of com.ait.lienzo.client.core.shape.ITextWrapper in project kie-wb-common by kiegroup.

the class WiresTextDecorator method setTextWrapper.

public WiresTextDecorator setTextWrapper(final TextWrapperStrategy strategy) {
    final ITextWrapper wrapper = getTextWrapper(strategy);
    this.textWrapper = wrapper;
    text.setWrapper(textWrapper);
    update();
    return this;
}
Also used : ITextWrapper(com.ait.lienzo.client.core.shape.ITextWrapper)

Example 2 with ITextWrapper

use of com.ait.lienzo.client.core.shape.ITextWrapper in project kie-wb-common by kiegroup.

the class TextWrapperProviderTest method testTruncateWithLineBreak.

@Test
public void testTruncateWithLineBreak() {
    final ITextWrapper wrapper = TextWrapperProvider.get(TextWrapperStrategy.TRUNCATE_WITH_LINE_BREAK, text);
    assertTrue(wrapper instanceof TextLineBreakTruncateWrapper);
}
Also used : ITextWrapper(com.ait.lienzo.client.core.shape.ITextWrapper) TextLineBreakTruncateWrapper(com.ait.lienzo.client.core.shape.TextLineBreakTruncateWrapper) Test(org.junit.Test)

Example 3 with ITextWrapper

use of com.ait.lienzo.client.core.shape.ITextWrapper in project kie-wb-common by kiegroup.

the class TextWrapperProviderTest method testBoundsAndLineBreaks.

@Test
public void testBoundsAndLineBreaks() {
    final ITextWrapper wrapper = TextWrapperProvider.get(TextWrapperStrategy.BOUNDS_AND_LINE_BREAKS, text);
    assertTrue(wrapper instanceof TextBoundsAndLineBreaksWrap);
}
Also used : ITextWrapper(com.ait.lienzo.client.core.shape.ITextWrapper) TextBoundsAndLineBreaksWrap(com.ait.lienzo.client.core.shape.TextBoundsAndLineBreaksWrap) Test(org.junit.Test)

Example 4 with ITextWrapper

use of com.ait.lienzo.client.core.shape.ITextWrapper in project kie-wb-common by kiegroup.

the class TextWrapperProviderTest method testLineBreak.

@Test
public void testLineBreak() {
    final ITextWrapper wrapper = TextWrapperProvider.get(TextWrapperStrategy.LINE_BREAK, text);
    assertTrue(wrapper instanceof TextLineBreakWrap);
}
Also used : ITextWrapper(com.ait.lienzo.client.core.shape.ITextWrapper) TextLineBreakWrap(com.ait.lienzo.client.core.shape.TextLineBreakWrap) Test(org.junit.Test)

Example 5 with ITextWrapper

use of com.ait.lienzo.client.core.shape.ITextWrapper in project kie-wb-common by kiegroup.

the class TextWrapperProviderTest method testTruncate.

@Test
public void testTruncate() {
    final ITextWrapper wrapper = TextWrapperProvider.get(TextWrapperStrategy.TRUNCATE, text);
    assertTrue(wrapper instanceof TextTruncateWrapper);
}
Also used : ITextWrapper(com.ait.lienzo.client.core.shape.ITextWrapper) TextTruncateWrapper(com.ait.lienzo.client.core.shape.TextTruncateWrapper) Test(org.junit.Test)

Aggregations

ITextWrapper (com.ait.lienzo.client.core.shape.ITextWrapper)8 Test (org.junit.Test)6 Text (com.ait.lienzo.client.core.shape.Text)1 TextBoundsAndLineBreaksWrap (com.ait.lienzo.client.core.shape.TextBoundsAndLineBreaksWrap)1 TextBoundsWrap (com.ait.lienzo.client.core.shape.TextBoundsWrap)1 TextLineBreakTruncateWrapper (com.ait.lienzo.client.core.shape.TextLineBreakTruncateWrapper)1 TextLineBreakWrap (com.ait.lienzo.client.core.shape.TextLineBreakWrap)1 TextNoWrap (com.ait.lienzo.client.core.shape.TextNoWrap)1 TextTruncateWrapper (com.ait.lienzo.client.core.shape.TextTruncateWrapper)1 BoundingBox (com.ait.lienzo.client.core.types.BoundingBox)1