Package net.sf.latexdraw.glib.models.interfaces.shape

Examples of net.sf.latexdraw.glib.models.interfaces.shape.IShape


  }


  @Test
  public void testContains() {
    IShape sh1 = ShapeFactory.createRectangle();
    IShape sh2 = ShapeFactory.createRectangle();
    IShape sh3 = ShapeFactory.createRectangle();
    IShape sh4 = ShapeFactory.createRectangle();

    drawing.getShapes().add(sh1);
    drawing.getShapes().add(sh2);
    drawing.getShapes().add(sh3);
View Full Code Here


  }


  @Test
  public void testIsEmpty() {
    IShape sh1 = ShapeFactory.createRectangle();
    IShape sh2 = ShapeFactory.createRectangle();
    IShape sh3 = ShapeFactory.createRectangle();

    drawing.getShapes().clear();
    assertTrue(drawing.isEmpty());
    drawing.getShapes().add(sh1);
    assertFalse(drawing.isEmpty());
View Full Code Here

  }


  @Test
  public void testClear() {
    IShape sh1 = ShapeFactory.createRectangle();
    IShape sh2 = ShapeFactory.createRectangle();
    IShape sh3 = ShapeFactory.createRectangle();

    drawing.getShapes().add(sh1);
    drawing.getShapes().add(sh2);
    drawing.getShapes().add(sh3);
    drawing.clear();
View Full Code Here

  @Test
  public void testSetSelectionList() {
    List<IShape> list = new ArrayList<>();
    IGroup selection  = drawing.getSelection();
    IShape sh = ShapeFactory.createRectangle();
    IShape sh2;

    list.add(sh);
    drawing.setSelection(list);
    assertEquals(selection, drawing.getSelection());
    assertEquals(1, drawing.getSelection().size());
View Full Code Here

import org.junit.Test;

public abstract class TestIGroup<T extends IGroup> extends TestIShape<T> {
  @Test
  public void testAddShapeIShape() {
    IShape sh1 = ShapeFactory.createRectangle();
    IShape sh2 = ShapeFactory.createRectangle();

    shape.addShape(sh1);
    shape.addShape(sh2);
    assertEquals(2, shape.getShapes().size());
    assertEquals(sh1, shape.getShapes().get(0));
View Full Code Here

  }


  @Test
  public void testAddShapeIShapeInt() {
    IShape sh1 = ShapeFactory.createRectangle();
    IShape sh2 = ShapeFactory.createRectangle();
    IShape sh3 = ShapeFactory.createRectangle();

    shape.addShape(sh1, 1);
    assertEquals(0, shape.getShapes().size());
    shape.addShape(sh1, -2);
    assertEquals(0, shape.getShapes().size());
View Full Code Here

  }


  @Test
  public void testRemoveShapeIShape() {
    IShape sh1 = ShapeFactory.createRectangle();
    IShape sh2 = ShapeFactory.createRectangle();
    IShape sh3 = ShapeFactory.createRectangle();

    shape.getShapes().add(sh1);
    shape.getShapes().add(sh2);
    shape.getShapes().add(sh3);
    shape.removeShape(sh2);
View Full Code Here

  }


  @Test
  public void testRemoveShapeInt() {
    IShape sh1 = ShapeFactory.createRectangle();
    IShape sh2 = ShapeFactory.createRectangle();
    IShape sh3 = ShapeFactory.createRectangle();

    shape.getShapes().add(sh1);
    shape.getShapes().add(sh2);
    shape.getShapes().add(sh3);
View Full Code Here

  }


  @Test
  public void testGetShapeAt() {
    IShape sh1 = ShapeFactory.createRectangle();
    IShape sh2 = ShapeFactory.createRectangle();
    IShape sh3 = ShapeFactory.createRectangle();

    shape.getShapes().add(sh1);
    shape.getShapes().add(sh2);
    shape.getShapes().add(sh3);
View Full Code Here

  }


  @Test
  public void testSize() {
    IShape sh1 = ShapeFactory.createRectangle();
    IShape sh2 = ShapeFactory.createRectangle();
    IShape sh3 = ShapeFactory.createRectangle();

    shape.getShapes().add(sh1);
    assertEquals(1, shape.size());
    shape.getShapes().add(sh2);
    assertEquals(2, shape.size());
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.glib.models.interfaces.shape.IShape

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.