Search in sources :

Example 11 with IGroup

use of net.sf.latexdraw.models.interfaces.shape.IGroup in project latexdraw by arnobl.

the class TestIGroup 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);
    IGroup shape2 = shape.duplicate();
    assertEquals(ArrowStyle.BAR_END, shape2.getArrowStyle(0));
    assertEquals(ArrowStyle.CIRCLE_END, shape2.getArrowStyle(1));
}
Also used : IGroup(net.sf.latexdraw.models.interfaces.shape.IGroup) HelperTest(net.sf.latexdraw.HelperTest) Test(org.junit.Test)

Example 12 with IGroup

use of net.sf.latexdraw.models.interfaces.shape.IGroup in project latexdraw by arnobl.

the class TestPSTViewFactory method testCreateGroupViewPST.

@Test
public void testCreateGroupViewPST() {
    IGroup gp = ShapeFactory.INST.createGroup();
    gp.addShape(ShapeFactory.INST.createText());
    Optional<PSTShapeView<IGroup>> view = PSTViewsFactory.INSTANCE.createView(gp);
    assertTrue(view.isPresent());
}
Also used : IGroup(net.sf.latexdraw.models.interfaces.shape.IGroup) Test(org.junit.Test)

Aggregations

IGroup (net.sf.latexdraw.models.interfaces.shape.IGroup)12 IShape (net.sf.latexdraw.models.interfaces.shape.IShape)7 Test (org.junit.Test)5 URL (java.net.URL)3 ResourceBundle (java.util.ResourceBundle)3 Initializable (javafx.fxml.Initializable)3 ShapeProperties (net.sf.latexdraw.commands.shape.ShapeProperties)3 IPoint (net.sf.latexdraw.models.interfaces.shape.IPoint)3 ArrayList (java.util.ArrayList)2 Arrays (java.util.Arrays)2 List (java.util.List)2 Function (java.util.function.Function)2 Collectors (java.util.stream.Collectors)2 FXCollections (javafx.collections.FXCollections)2 ListChangeListener (javafx.collections.ListChangeListener)2 ObservableList (javafx.collections.ObservableList)2 Point3D (javafx.geometry.Point3D)2 Cursor (javafx.scene.Cursor)2 Node (javafx.scene.Node)2 ModifyShapeProperty (net.sf.latexdraw.commands.shape.ModifyShapeProperty)2