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();

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


  }


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

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

  }


  @Test
  public void testClear() {
    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.clear();
View Full Code Here

    g.setColor(lineColor);
    g.fill(path);
  }

  protected void paintArrow(final Graphics2D g, final Color fColour, final boolean asShadow) {
    final IShape shape    = model.getShape();
    final Color lineColor = asShadow ? shape.getShadowCol() : shape.getLineColour();
    final Color fillColor = asShadow ? shape.getShadowCol() : fColour;

    switch(model.getArrowStyle()) {
      case LEFT_DBLE_ARROW    :
      case RIGHT_DBLE_ARROW    :
      case RIGHT_ARROW      :
View Full Code Here

        return; // There is no template

      // We get the list of the templates
      final SVGFilter filter = new SVGFilter();
      final File[] files = templateDir.listFiles();
      IShape template;
      File thumbnail;

      // We export the updated template
      if(files!=null)
                for(final File file : files)
View Full Code Here

              setProgress(0);

        // Adding loaded shapes.
        incrProgressBar       = Math.max(50./(svgDoc.getDocumentElement().getChildNodes().getLength()+ui.getPresentations().size()), 1.);
        final IShape shape     = toLatexdraw(svgDoc, incrProgressBar);

        if(shape instanceof IGroup) { // If several shapes have been loaded
          final IGroup group = (IGroup)shape;
          final double incr  = Math.max(50./group.size(), 1.);
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.