use of com.ait.lienzo.client.core.shape.Picture in project drools-wb by kiegroup.
the class BaseGuidedDecisionTreeShape method setupControl.
protected Group setupControl(final ImageResource resource, final Command command) {
final Group controlGroup = new Group();
final Picture p = new Picture(resource, picture1 -> {
final double offsetX = -picture1.getImageData().getWidth() / 2;
final double offsetY = -picture1.getImageData().getHeight() / 2;
picture1.setLocation(new Point2D(offsetX, offsetY));
picture1.addNodeMouseClickHandler(e -> command.execute());
}, ImageSelectionMode.SELECT_BOUNDS);
controlGroup.add(p);
return controlGroup;
}