Search in sources :

Example 1 with TextBoundsWrap

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

the class WiresTextDecorator method initialize.

private void initialize() {
    this.text = new Text("").setAlpha(TEXT_ALPHA).setFontFamily(TEXT_FONT_FAMILY).setFontSize(TEXT_FONT_SIZE).setFillColor(TEXT_FILL_COLOR).setStrokeColor(TEXT_STROKE_COLOR).setStrokeWidth(TEXT_STROKE_WIDTH).setTextAlign(TEXT_ALIGN).setDraggable(false);
    this.textWrapper = new TextBoundsWrap(text, new BoundingBox(0, 0, 1, 1));
    this.text.setWrapper(textWrapper);
    this.currentTextLayout = TEXT_LAYOUT_ALIGN;
    textContainer.add(text);
    // Ensure path bounds are available on the selection context.
    text.setFillBoundsForSelection(true);
    initializeHandlers();
}
Also used : BoundingBox(com.ait.lienzo.client.core.types.BoundingBox) Text(com.ait.lienzo.client.core.shape.Text) TextBoundsWrap(com.ait.lienzo.client.core.shape.TextBoundsWrap)

Aggregations

Text (com.ait.lienzo.client.core.shape.Text)1 TextBoundsWrap (com.ait.lienzo.client.core.shape.TextBoundsWrap)1 BoundingBox (com.ait.lienzo.client.core.types.BoundingBox)1