use of net.sf.latexdraw.model.api.shape.Group in project latexdraw by arnobl.
the class TestPSTViewFactory method testCreateGroupViewPST.
@Test
void testCreateGroupViewPST() {
final Group gp = ShapeFactory.INST.createGroup();
gp.addShape(ShapeFactory.INST.createText());
final Optional<PSTShapeView<Group>> view = factory.createView(gp);
assertTrue(view.isPresent());
}
use of net.sf.latexdraw.model.api.shape.Group in project latexdraw by arnobl.
the class TestGroup method testDuplicateArrow.
@Test
public void testDuplicateArrow() {
shape.addShape(ShapeFactory.INST.createPolyline(Collections.emptyList()));
shape.setArrowStyle(ArrowStyle.BAR_END, 0);
shape.setArrowStyle(ArrowStyle.CIRCLE_END, 1);
final Group shape2 = shape.duplicate();
assertEquals(ArrowStyle.BAR_END, shape2.getArrowStyle(0));
assertEquals(ArrowStyle.CIRCLE_END, shape2.getArrowStyle(1));
}
use of net.sf.latexdraw.model.api.shape.Group in project latexdraw by arnobl.
the class TestDrawing method testSetSelectionList1.
@Test
public void testSetSelectionList1() {
final List<Shape> list = new ArrayList<>();
final Group selection = drawing.getSelection();
final Shape sh = ShapeFactory.INST.createRectangle();
list.add(sh);
drawing.setSelection(list);
assertEquals(selection, drawing.getSelection());
assertEquals(1, drawing.getSelection().size());
assertEquals(sh, drawing.getSelection().getShapeAt(0).orElseThrow());
}
Aggregations