Package java.awt.geom

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


                        .getBounds(model
                            .getAttributes(cells[i]));
                   
                    // Clone the rectangle to force a repaint
                    if (tmp != null)
                      tmp = (Rectangle2D) tmp.clone();

                    Hashtable attrs = new Hashtable();
                    Object parent = model.getParent(cells[i]);
                    if (tmp == null) {
                      tmp = new Rectangle2D.Double(p
View Full Code Here


    protected void invalidate() {
      // Retrieve current bounds and set local vars
      Rectangle2D tmp = graph.getCellBounds(vertex.getCell());
      if (tmp != null) {
        tmp = (Rectangle2D) tmp.clone();
        graph.toScreen(tmp);
        int handlesize = graph.getHandleSize();
        int s2 = 2 * handlesize;
        double left = tmp.getX() - handlesize;
        double top = tmp.getY() - handlesize;
View Full Code Here

   */
  public AttributeMap cloneEntries(AttributeMap newMap) {
    // Clone Bounds
    Rectangle2D bounds = GraphConstants.getBounds(newMap);
    if (bounds != null)
      GraphConstants.setBounds(newMap, (Rectangle2D) (bounds.clone()));
    // Clone List Of Points
    java.util.List points = GraphConstants.getPoints(newMap);
    if (points != null)
      GraphConstants.setPoints(newMap, clonePoints(points));
    // Clone Edge Label
View Full Code Here

    protected void paintPort(Graphics g, CellView p) {
      boolean offset = (GraphConstants.getOffset(p.getAllAttributes()) != null);
      Rectangle2D r = (offset) ? p.getBounds() : p.getParentView()
          .getBounds();
      r = graph.toScreen((Rectangle2D) r.clone());
      int s = 3;
      r.setFrame(r.getX() - s, r.getY() - s, r.getWidth() + 2 * s, r
          .getHeight()
          + 2 * s);
      graph.getUI().paintCell(g, p, r, true);
View Full Code Here

            Rectangle2D cr2d = gn.getBounds();
            AffineTransform at = gn.getTransform();
            if (at != null)
                cr2d = at.createTransformedShape(cr2d).getBounds2D();

            if (r2d == null) r2d = (Rectangle2D)cr2d.clone();
            r2d.add(cr2d);
        }

        if (r2d == null) {
            if (init == null)
View Full Code Here

     */
    public Rectangle2D getBounds2D(){
        if (usePrimitivePaint){
            Rectangle2D primitiveBounds = node.getPrimitiveBounds();
            if(primitiveBounds != null){
                return (Rectangle2D)(primitiveBounds.clone());
            }
            else{
                return new Rectangle2D.Double(0, 0, 0, 0);
            }
        }
View Full Code Here

            Rectangle2D cr2d = gn.getBounds();
            AffineTransform at = gn.getTransform();
            if (at != null)
                cr2d = at.createTransformedShape(cr2d).getBounds2D();

            if (r2d == null) r2d = (Rectangle2D)cr2d.clone();
            else             r2d.add(cr2d);
        }

        if (r2d == null) {
            if (init == null)
View Full Code Here

        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

            if (p != elem) continue;

            // runElem is a child of elem so include it's bounds.
            Rectangle2D glBounds = layout.getBounds2D();
            if (glBounds != null) {
                if (ret == null) ret = (Rectangle2D)glBounds.clone();
                else             ret.add(glBounds);
            }
        }
        return ret;
    }
View Full Code Here

        Rectangle2D bounds = null;
        for (int i=0; i < count; ++i) {
            Rectangle2D pb = painters[i].getPaintedBounds2D();
            if (pb == null) continue;
            if (bounds == null) bounds = (Rectangle2D)pb.clone();
            else                bounds.add(pb);
        }
        return bounds;
    }
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.