Package org.nlogo.shape

Examples of org.nlogo.shape.LinkShape


        lineThickness + (2 / patchSize));
    topology.drawLink(g, link, drawer, patchSize, color, lineThickness);
  }

  private LinkDrawable getLinkDrawable(org.nlogo.api.Link link) {
    LinkShape shape = (LinkShape) linkShapes.shape(link.shape());

    if (shape.isTooSimpleToPaint() && !link.isDirectedLink()) {
      return new LineDrawer();
    } else if (shape.isTooSimpleToPaint()) {
      return new SimpleShapeDrawer(shape);
    } else {
      return new LinkShapeDrawer(shape);
    }
  }
View Full Code Here


    list.update(originalShape, shape);
    dispose();
  }

  private LinkShape getCurrentShape() {
    LinkShape currentShape = (LinkShape) shape.clone();
    currentShape.setName(name.getText());
    currentShape.curviness(Double.parseDouble(curviness.getText()));
    for (int i = 0; i < dashes.length; i++) {
      int index = dashes[i].getSelectedIndex();
      currentShape.setLineVisible(i, index != 0);
      currentShape.setDashiness(i, org.nlogo.shape.LinkLine.dashChoices[index]);
    }
    return currentShape;
  }
View Full Code Here

TOP

Related Classes of org.nlogo.shape.LinkShape

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.