Search in sources :

Example 1 with FocusableLienzoPanel

use of org.uberfire.ext.wires.core.client.canvas.FocusableLienzoPanel in project drools-wb by kiegroup.

the class GuidedDecisionTreePaletteGroup method addStencil.

public void addStencil(final ShapeFactory factory, final GuidedDecisionTreeStencilPaletteBuilder stencilBuilder, final FactoryHelper helper, final boolean isReadOnly) {
    final LienzoPanel panel = new FocusableLienzoPanel(GuidedDecisionTreeStencilPaletteBuilder.STENCIL_WIDTH, GuidedDecisionTreeStencilPaletteBuilder.STENCIL_HEIGHT + ShapeFactoryUtil.SPACE_BETWEEN_BOUNDING);
    final Layer layer = new Layer();
    panel.getScene().add(layer);
    // Create a new PaletteShape from the given factory
    final PaletteShape shape = stencilBuilder.build(panel, helper, factory, isReadOnly);
    layer.add(shape);
    layer.batch();
    add(panel);
}
Also used : LienzoPanel(com.ait.lienzo.client.widget.LienzoPanel) FocusableLienzoPanel(org.uberfire.ext.wires.core.client.canvas.FocusableLienzoPanel) PaletteShape(org.uberfire.ext.wires.core.client.palette.PaletteShape) Layer(com.ait.lienzo.client.core.shape.Layer) FocusableLienzoPanel(org.uberfire.ext.wires.core.client.canvas.FocusableLienzoPanel)

Aggregations

Layer (com.ait.lienzo.client.core.shape.Layer)1 LienzoPanel (com.ait.lienzo.client.widget.LienzoPanel)1 FocusableLienzoPanel (org.uberfire.ext.wires.core.client.canvas.FocusableLienzoPanel)1 PaletteShape (org.uberfire.ext.wires.core.client.palette.PaletteShape)1