use of com.ait.lienzo.client.core.shape.Group in project kie-wb-common by kiegroup.
the class LienzoPictureGlyphRendererTest method testDestroy.
@Test
@SuppressWarnings("unchecked")
public void testDestroy() {
final Group glyphView = tested.render(glyph, 100, 100);
assertNotNull(glyphView);
glyphView.removeFromParent();
verify(picture, times(1)).removeFromParent();
}
use of com.ait.lienzo.client.core.shape.Group in project kie-wb-common by kiegroup.
the class LienzoPanelUtils method newPanel.
public LienzoPanel newPanel(final Glyph glyph, final int width, final int height) {
final Group glyphGroup = glyphLienzoGlyphRenderer.render(glyph, width, height);
final com.ait.lienzo.client.widget.LienzoPanel panel = new LienzoPanel(width, height);
final Layer layer = new Layer();
panel.add(layer.setTransformable(true));
layer.add(glyphGroup);
return panel;
}
use of com.ait.lienzo.client.core.shape.Group in project kie-wb-common by kiegroup.
the class LienzoImageStripGlyphRenderer method render.
@Override
public Group render(final ImageStripGlyph glyph, final double width, final double height) {
final Group group = new Group();
final Image image = imageBuilder.apply(ImageStripRegistry.getName(glyph.getStripType()), glyph.getIndex());
scaleShape(image, width, height);
group.add(image);
return group;
}
use of com.ait.lienzo.client.core.shape.Group in project kie-wb-common by kiegroup.
the class MorphActionsToolboxView method configureDropDown.
private void configureDropDown(final ActionsToolbox toolbox) {
final Point2DGrid grid = createFixedGrid(GRID_BUTTON_SIZE, GRID_BUTTON_PADDING, toolbox.size());
final Group glyphView = renderGlyph(StunnerCommonIconsGlyphFactory.GEARS, BUTTON_SIZE);
gridItem = getToolboxFactory().buttons().dropRight(glyphView).grid(grid).decorate(getToolboxFactory().decorators().button().setPadding(BUTTON_PADDING).configure(path -> path.setFillColor(ColorName.LIGHTGREY))).decorateGrid(getToolboxFactory().decorators().button().setPadding(GRID_DECORATOR_PADDING).configure(path -> path.setFillColor("#e6e6e6")));
getToolboxView().add(gridItem);
}
use of com.ait.lienzo.client.core.shape.Group in project kie-wb-common by kiegroup.
the class WiresScalableContainer method addScalable.
public WiresScalableContainer addScalable(final IPrimitive<?> child) {
if (isScalable(child)) {
scalableChildren.add(child);
add(child);
} else {
if (null == transformableContainer) {
transformableContainer = new Group();
addChild(transformableContainer);
}
transformableContainer.add(child);
scaleRatio = null;
}
scaleRequired = true;
return this;
}
Aggregations