Examples of Line


Examples of org.drools.examples.benchmarks.waltz.model.Line

                {
                    throw new IOException( "expected '^p2' in: " + line );
                }
                int p2 = Integer.parseInt( st.nextToken() );

                list.add( new Line( p1,
                                    p2 ) );
            }

            if ( "stage".equals( type ) )
            {
View Full Code Here

Examples of org.eclipse.ecf.tutorial.scribbleshare.toolbox.Line

  private List createTools() {
    List toolList = new ArrayList();

    toolList.add(new Pencil());
    toolList.add(new Box());
    toolList.add(new Line());
    toolList.add(new Oval());

    return toolList;
  }
View Full Code Here

Examples of org.geotools.math.Line

                                                        (a.getCoordinate().y + b.getCoordinate().y)/2);
        double deltaXA_B = a.getCoordinate().x - midPointA_B.getX();
        double deltaYA_B = a.getCoordinate().y - midPointA_B.getY();

        Line bisectorA_B = new Line();
        bisectorA_B.setLine(new Point2D.Double((midPointA_B.getX() + 100*deltaYA_B),
                                               (midPointA_B.getY() - 100*deltaXA_B)),
                            new Point2D.Double((midPointA_B.getX() - 100*deltaYA_B),
                                               (midPointA_B.getY() + 100*deltaXA_B)));
       
        Point2D.Double midPointA_C = new Point2D.Double((a.getCoordinate().x + c.getCoordinate().x)/2,
                                                        (a.getCoordinate().y + c.getCoordinate().y)/2);
        double deltaXA_C = a.getCoordinate().x - midPointA_C.getX();
        double deltaYA_C = a.getCoordinate().y - midPointA_C.getY();     
       
        Line bisectorA_C = new Line();
       
        Point2D intersection = null;
        int i = 1;
        do{
            bisectorA_C.setLine(new Point2D.Double((midPointA_C.getX() + Math.pow(100, i)*deltaYA_C),
                                                   (midPointA_C.getY() - Math.pow(100, i)*deltaXA_C)),
                                new Point2D.Double((midPointA_C.getX() - Math.pow(100, i)*deltaYA_C),
                                                   (midPointA_C.getY() + Math.pow(100, i)*deltaXA_C)));       
            intersection = bisectorA_B.intersectionPoint(bisectorA_C);
            i++;
View Full Code Here

Examples of org.netbeans.modules.exceptions.entity.Line

                    }
                    List<Line> lines = new ArrayList<Line>(stacktrace.getLineCollection());
                    Collections.sort(lines, new LineComparator());
                    Iterator<Line> iterator = lines.iterator();
                    while (iterator.hasNext()){
                        Line line = iterator.next();
                        int j = 0;
                        while (FilteringUtils.areEquals(line, elements[shortestLineIndex+j])){
                            line = iterator.next();
                            j++;
                            if (j >= centeralLine - cycleEnd){
View Full Code Here

Examples of org.newdawn.slick.geom.Line

    float spread = GameplayState.player.gun.opt_spreading-GameplayState.player.gun.opt_spreading_add;
    float rand = new Random().nextFloat()*6-3; //[-3..3]
    vector_mouse.setTheta(vector_mouse.getTheta()+rand/5*spread); //rand/spread_max*(spread-spread_add)
    n_x = vector_mouse.x;
    n_y = vector_mouse.y;
    bullet = new Line(this.x, this.y, curr_x, curr_y);
    while(true) //set 2nd gradient line
    {
      curr_x += n_x; curr_y += n_y;
      if (GameplayState.player.gun.opt_distance_is_power)
        power_add += 0.1f+Elements.extractLevel(ITEM.P_GUN_DISTANCE_IS_POWER)*0.035f;
      drawLine();
      if (checkCollision() == 0)
      {
        float length = bullet.length();
        if (length > 220)
        {
          length = 220;
          original_line_render = true;
        }
        else
          original_line_render = false;
        fire_x = this.x;
        fire_y = this.y;
        while(new Line(x, y, fire_x, fire_y).length() <= length)
        {
          fire_x += n_x;
          fire_y += n_y;
        }
        break;
View Full Code Here

Examples of org.newdawn.slick.geom.Line

      float recoil = GameplayState.player.gun.opt_recoil;
      vector_mouse.setTheta(vector_mouse.getTheta()+new Random().nextFloat()*5-recoil/2);
      n_x = vector_mouse.x;
      n_y = vector_mouse.y;
      g = Game.app.getGraphics();
      bullet = new Line(this.x+GameplayState.player.gun.gun_x, this.y+GameplayState.player.gun.gun_y, this.x, this.y);
      while(true)
      {
        curr_x += n_x; curr_y += n_y;
        drawLine();
        if (checkCollision())
View Full Code Here

Examples of org.newdawn.slick.geom.Line

      float rand = new Random().nextFloat()*22-11; //[-11..11]
      vector_mouse.setTheta(vector_mouse.getTheta()+rand/7*(recoil+2f));
      n_x = vector_mouse.x;
      n_y = vector_mouse.y;
      g = Game.app.getGraphics();
      bullet = new Line(this.x, this.y, curr_x[i], curr_y[i]);
      while(true)
      {
        curr_x[i] += n_x; curr_y[i] += n_y;
        drawLine(i);
        if (checkCollision() || bullet.length() > length)
View Full Code Here

Examples of org.newdawn.slick.geom.Line

      }
      direction = !direction;
      n_x = vector_end.x;
      n_y = vector_end.y;
      g = Game.app.getGraphics();
      bullet = new Line(curr_x[0], curr_y[0], curr_x[0], curr_y[0]);
      int generated_length = new Random().nextInt(45)+size-(size_penalty_annigilator?0:25);
      if (size_penalty_annigilator)
        size_penalty_annigilator = false;
      curr_x[i+1] = curr_x[i]; //lightning special code
      curr_y[i+1] = curr_y[i];
View Full Code Here

Examples of org.nlogo.shape.Line

  // updated coordinates
  private Element createElement(java.awt.Point start, java.awt.Point last) {
    // don't create an element if the arrow tool is the current tool
    if (!editorDialog.editingElements()) {
      if (editorDialog.getElementType() == Line.class) {
        return new Line
            (start, last, editorDialog.getElementColor());
      } else if (editorDialog.getElementType() == Rectangle.class) {
        return new Rectangle
            (start, last, editorDialog.getElementColor());
      } else if (editorDialog.getElementType() == Circle.class) {
View Full Code Here

Examples of org.openide.text.Line

        try {
            DataObject d = DataObject.find(fo);
            LineCookie cookie = d.getCookie(LineCookie.class);
           
            Line.Set lineSet = null;
            Line line = null;
            for (int i = 0; i < rs.getCsErrors().size(); i++) {
                lineSet = cookie.getLineSet();
                line = lineSet.getOriginal(rs.getCsErrors().get(i).getLineNum());
                rs.getCsErrors().get(i).attach(line);
            }
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.