use of net.sf.latexdraw.command.shape.JoinShapes in project latexdraw by arnobl.
the class ShapeGrouper method configureBindings.
@Override
protected void configureBindings() {
buttonBinder().toProduce(() -> new SeparateShapes(canvas.getDrawing(), getSelectCmd().map(sel -> sel.getShapes()).filter(sel -> sel.size() == 1 && sel.get(0) instanceof Group).map(sel -> (Group) sel.get(0)).orElseThrow())).when(() -> getSelectCmd().map(sel -> sel.getShapes()).filter(sel -> sel.size() == 1 && sel.get(0) instanceof Group).isPresent()).on(sepB).bind();
buttonBinder().toProduce(() -> new JoinShapes(canvas.getDrawing(), getSelectCmd().map(sel -> sel.getShapes()).orElse(List.of()))).on(groupB).bind();
}
Aggregations