Examples of clone()


Examples of java.awt.Point.clone()

            pointVec.add(sPoint1.clone());
            pointVec.add(ePoint1.clone());
           
            if (numArrows > 1) {
                pointVec.add(sPoint2.clone());
                pointVec.add(ePoint2.clone());
            }
           
        }

        Point[] ret = new Point[pointVec.size()];
View Full Code Here

Examples of java.awt.Rectangle.clone()

                    if (rectEnd < index - 1) {
                        rectEnd = index - 1;
                    }
                    modified.add(new Segment(rect.x, rectEnd));
                } else {
                    modified.add((Rectangle)rect.clone());
                }
            }
            clear();
            add(modified);
        }
View Full Code Here

Examples of java.awt.RenderingHints.clone()

      // If the user has specified a hint for this, then we don't
      // want to change it, so change only if this hint is not
      // already specified
            if (!(config.containsKey(JAI.KEY_REPLACE_INDEX_COLOR_MODEL))) {
                RenderingHints hints = (RenderingHints)configuration;
                config = (RenderingHints)hints.clone();
                config.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, Boolean.FALSE);
            }
        }

        return config;
View Full Code Here

Examples of java.awt.geom.AffineTransform.clone()

        } else if (!dirtyNodes.containsKey(gnWRef))
            doPut = true;

        if (doPut) {
            AffineTransform at = gn.getTransform();
            if (at != null) at = (AffineTransform)at.clone();
            dirtyNodes.put(gnWRef, at);
        }

        Rectangle2D r2d = gnce.getFrom();
        if (r2d == null)
View Full Code Here

Examples of java.awt.geom.Area.clone()

      newArea=new Area( generalPaths[ i ] );

      //---if this is not the first area, subtract cumulative area
      if( i > 0 )
      {
        areas[ i ]=(Area) newArea.clone();
        areas[ i ].subtract( totalArea );

        totalArea=newArea;
      }
      else
View Full Code Here

Examples of java.awt.geom.GeneralPath.clone()

                    glyphPath.transform(atScale);
                }
                glyphs.put(gid, glyphPath);
            }
        }
        return glyphPath != null ? (GeneralPath) glyphPath.clone() : null; // todo: expensive
    }

    @Override
    public void dispose()
    {
View Full Code Here

Examples of java.awt.geom.Line2D.clone()

     */
    public static Shape clone(Shape shape) {
        Shape result = null;
        if (shape instanceof Line2D) {
            Line2D line = (Line2D) shape;
            result = (Shape) line.clone();   
        }
        // RectangularShape includes:  Arc2D, Ellipse2D, Rectangle2D, RoundRectangle2D.
        else if (shape instanceof RectangularShape) {
            RectangularShape rectangle = (RectangularShape) shape;
            result = (Shape) rectangle.clone();
View Full Code Here

Examples of java.awt.geom.Point2D.clone()

  public boolean init(MouseEvent e) {   
    Point2D pt = editor.locatePoint(e.getPoint());
   
    if (model == null) {
      model = new LineModel()
      model.addPoint((Point2D) pt.clone());
      ctr = new PolyLineController(model)
      editor.getEditControllers().add(ctr);
      index = 0;
     
      // add property chane listener
View Full Code Here

Examples of java.awt.geom.Rectangle2D.clone()

        if (usePrimitivePaint){
            Rectangle2D primitiveBounds = node.getPrimitiveBounds();
            if(primitiveBounds == null)
                return new Rectangle2D.Double(0, 0, 0, 0);

            return (Rectangle2D)(primitiveBounds.clone());
        }

        // When not using Primitive paint we return out bounds in our
        // parent's user space.  This makes sense since this is the
        // space that we will draw our selves into (since paint unlike
View Full Code Here

Examples of java.awt.geom.RectangularShape.clone()

        GraphModel model = _controller.getGraphModel();
        Shape shape = (model.isComposite(node)) ? _compositeShape : _nodeShape;

        if (shape instanceof RectangularShape) {
            RectangularShape r = (RectangularShape) shape;
            shape = (Shape) (r.clone());
        } else {
            shape = new GeneralPath(shape);
        }

        Paint fill = model.isComposite(node) ? _compositeFill : _nodeFill;
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.