Search in sources :

Example 1 with ShapeGlyph

use of org.uberfire.ext.wires.core.api.factories.ShapeGlyph in project drools-wb by kiegroup.

the class GuidedDecisionTreeStencilPaletteBuilder method build.

public PaletteShape build(final LienzoPanel dragProxyParentPanel, final FactoryHelper helper, final ShapeFactory factory, final boolean isReadOnly) {
    // If the Editor is not Read Only delegate to super class
    if (!isReadOnly) {
        return super.build(dragProxyParentPanel, helper, factory);
    }
    // Otherwise make a Read Only Stencil
    final PaletteShape paletteShape = new PaletteShape();
    final ShapeGlyph glyph = drawGlyph(factory, helper);
    final Text description = drawDescription(factory, helper);
    final Rectangle bounding = drawBoundingBox(factory, helper);
    // Build Palette Shape
    paletteShape.setBounding(bounding);
    paletteShape.setGroup(scaleGlyph(glyph));
    paletteShape.setDescription(description);
    return paletteShape;
}
Also used : ShapeGlyph(org.uberfire.ext.wires.core.api.factories.ShapeGlyph) Rectangle(com.ait.lienzo.client.core.shape.Rectangle) Text(com.ait.lienzo.client.core.shape.Text) PaletteShape(org.uberfire.ext.wires.core.client.palette.PaletteShape)

Aggregations

Rectangle (com.ait.lienzo.client.core.shape.Rectangle)1 Text (com.ait.lienzo.client.core.shape.Text)1 ShapeGlyph (org.uberfire.ext.wires.core.api.factories.ShapeGlyph)1 PaletteShape (org.uberfire.ext.wires.core.client.palette.PaletteShape)1