Examples of Shape


Examples of org.freeplane.features.cloud.CloudModel.Shape

      }
      final CloudModel toStyle = CloudModel.createModel(to);
      final Color color = fromStyle.getColor();
      if(color != null)
          toStyle.setColor(color);
      final Shape shape = fromStyle.getShape();
      if(shape != null)
          toStyle.setShape(shape);
    }
View Full Code Here

Examples of org.freeplane.features.link.ConnectorModel.Shape

      return;
    final MapView mapView = (MapView) e.getComponent();
    final Object object = mapView.detectCollision(new Point(originX, originY));
    if (object instanceof ConnectorModel) {
      final ConnectorModel arrowLinkModel = (ConnectorModel) object;
      final Shape shape = arrowLinkModel.getShape();
      if (Shape.EDGE_LIKE.equals(shape) || Shape.LINE.equals(shape) && ! arrowLinkModel.isSelfLink()) {
        return;
      }
      draggedLink = arrowLinkModel;
      draggedLinkOldStartPoint = draggedLink.getStartInclination();
View Full Code Here

Examples of org.jboss.weld.examples.osgi.paint.api.Shape

    }

    private void addShape(ShapeProvider provider) {
        if (!providers.containsKey(provider.getId())) {
            providers.put(provider.getId(), provider);
            Shape shape = provider.getShape();
            JButton button = new JButton(shape.getIcon());
            button.setActionCommand(provider.getId());
            button.setToolTipText(shape.getName());
            button.addActionListener(actionListener);
            toolbar.add(button);
            toolbar.validate();
            if (goneComponents.containsKey(provider.getId())) {
                for (ShapeComponent comp : goneComponents.get(provider.getId())) {
View Full Code Here

Examples of org.jbox2d.collision.shapes.Shape

   * Get the world manifold.
   */
  public void getWorldManifold(WorldManifold worldManifold) {
    final Body bodyA = m_fixtureA.getBody();
    final Body bodyB = m_fixtureB.getBody();
    final Shape shapeA = m_fixtureA.getShape();
    final Shape shapeB = m_fixtureB.getShape();

    worldManifold.initialize(m_manifold, bodyA.getTransform(), shapeA.m_radius,
        bodyB.getTransform(), shapeB.m_radius);
  }
View Full Code Here

Examples of org.jmol.shape.Shape

        translateSelected();
      g3d.renderBackground();
      if (renderers == null)
        renderers = new ShapeRenderer[JmolConstants.SHAPE_MAX];
      for (int i = 0; i < JmolConstants.SHAPE_MAX && g3d.currentlyRendering(); ++i) {
        Shape shape = shapeManager.getShape(i);
        if (shape == null)
          continue;
        getRenderer(i, g3d).render(g3d, modelSet, shape);
        if (logTime)
          Logger.checkTimer("render time " + JmolConstants.getShapeClassName(i));
View Full Code Here

Examples of org.jzy3d.plot3d.primitives.Shape

        // Define range and precision for the function to plot
        Range range = new Range(-.5, .5);
        int steps   = 50;
       
        // Create the object to represent the function over the given range.
        final Shape surface = (Shape)Builder.buildOrthonormal(new OrthonormalGrid(range, steps, range, steps), mapper);
        surface.setColorMapper(new ColorMapper(new ColorMapRainbow(), surface.getBounds().getZmin(), surface.getBounds().getZmax()));
        surface.setFaceDisplayed(true);
        surface.setWireframeDisplayed(true);
        surface.setWireframeColor(Color.BLACK);
       
        // Setup a colorbar for the surface object and add it to the scene
        Chart chart = getChart();
        chart.getScene().getGraph().add(surface);
        ColorbarLegend cbar = new ColorbarLegend(surface, chart.getView().getAxe().getLayout());
        surface.setLegend(cbar);
    }
View Full Code Here

Examples of org.mongodb.morphia.testmodel.Shape

        final DBCollection shapes = getDb().getCollection("shapes");
        final DBCollection shapeshifters = getDb().getCollection("shapeshifters");

        getMorphia().map(Circle.class).map(Rectangle.class).map(ShapeShifter.class);

        final Shape rectangle = new Rectangle(2, 5);

        final DBObject rectangleDbObj = getMorphia().toDBObject(rectangle);
        shapes.save(rectangleDbObj);

        final BasicDBObject rectangleDbObjLoaded = (BasicDBObject) shapes.findOne(new BasicDBObject(Mapper.ID_KEY,
                                                                                                    rectangleDbObj.get(Mapper.ID_KEY)));
        final Shape rectangleLoaded = getMorphia().fromDBObject(Shape.class, rectangleDbObjLoaded, new DefaultEntityCache());

        assertTrue(rectangle.getArea() == rectangleLoaded.getArea());
        assertTrue(rectangleLoaded instanceof Rectangle);

        final ShapeShifter shifter = new ShapeShifter();
        shifter.setReferencedShape(rectangleLoaded);
        shifter.setMainShape(new Circle(2.2));
View Full Code Here

Examples of org.newdawn.fizzy.Shape

   *
   * @param g The graphics context on which to draw
   * @param body The body to be rendered
   */
  private void drawBody(Graphics2D g, Body body) {
    Shape shape = body.getShape();
    drawShape(g,body,shape);
  }
View Full Code Here

Examples of org.newdawn.slick.geom.Shape

   */

  Rectangle tmprect = new Rectangle(0, 0, 0, 0);

  public boolean isInView(Actor a) {
    Shape ab = a.getShape();
    tmprect.setBounds(ab.getX(), ab.getY(), ab.getMaxX(), ab.getMaxY());
    boolean v = tmprect.intersects(vrect);
    return v;
  }
View Full Code Here

Examples of org.nlogo.api.Shape

    }
  }

  // Import shapes from another model
  private void importSelectedShapes() {
    Shape shape;
    String name;
    Object[] choices = {"Replace", "Rename", I18N.guiJ().get("common.buttons.cancel")};
    int[] selected = list.getSelectedIndices();
    ArrayList<Shape> shapesToAdd = new ArrayList<Shape>();

    // For each selected shape, add it to the current model's file and the turtledrawer,
    for (int i = 0; i < selected.length; ++i) {
      shape = list.getShape(selected[i]);

      // If the shape exists, give the user the chance to overwrite or rename
      while (manager.shapesList().exists(shape.getName())) {
        int choice = javax.swing.JOptionPane.showOptionDialog
            (this,
                "A shape with the name \"" + shape.getName() + "\" already exists in this model.\n" +
                    "Do you want to replace the existing shape or rename the imported one?",
                "Import",
                javax.swing.JOptionPane.YES_NO_CANCEL_OPTION,
                javax.swing.JOptionPane.WARNING_MESSAGE, null,
                choices, choices[0]);

        if (choice == 0) // overwrite
        {
          shapesToAdd.add(shape);
          break;
        } else if (choice == 1) // rename
        {
          name = javax.swing.JOptionPane.showInputDialog
              (this, "Import shape as:", "Import Shapes", javax.swing.JOptionPane.PLAIN_MESSAGE);
          // if the user cancels the inputdialog, then name could
          // be null causing a nullpointerexception later on
          if (name != null) {
            shape.setName(name);
          }
        } else {
          return;
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.