Package java.awt

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


                    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

    // Click in the middle of the column 2 header.
    Rectangle r = new Rectangle(0, 0, 100, 100);
    Point[] columnHeaderCenters = new Point[TABLE_COLUMNS];
    for (int i=0; i<TABLE_COLUMNS; ++i) {
      when(header.getHeaderRect(i)).thenReturn((Rectangle) r.clone());
      columnHeaderCenters[i] = new Point((int) r.getCenterX(), (int) r.getCenterY());
      r.x += r.width;
    }

    when(e.getButton()).thenReturn(MouseEvent.BUTTON1);
View Full Code Here

    if (oldClip.contains(x, y, width, height) || (width <= 0 || height <= 0)) {
      g.setClip(x, y, width, height);
    } else if (oldClip.intersects(x, y, width, height)) {
      Rectangle currentRect = oldClip.getBounds();
      g.setClip(SwingUtilities.computeIntersection(x, y, width, height, (Rectangle)currentRect.clone()));
    }

    if (alignWithParent) {
      Component parent = component.getParent();
      xoff = component.getLocation().x;
View Full Code Here

                sourceRegion =
                    J2KImageReader.getReducedRect(sourceRegion, minResLevels,
                                                  resolution, stepX, stepY);
            }

            destinationRegion = (Rectangle)sourceRegion.clone();

            J2KImageReader.computeRegionsWrapper(param,
                                                 false,
                                                 this.width,
                                                 this.height,
View Full Code Here

            colorModel = input.getColorModel();
        }

        if (sourceRegion == null)
            sourceRegion = (Rectangle)originalRegion.clone();
        else
            sourceRegion = sourceRegion.intersection(originalRegion);

        if (sourceRegion.isEmpty())
            throw new RuntimeException(I18N.getString("RawImageWriter1"));
View Full Code Here

        this.height = dim.height;

        Rectangle sourceRegion =
                new Rectangle(0, 0, this.width, this.height);

        originalRegion = (Rectangle)sourceRegion.clone();

        destinationRegion = (Rectangle)sourceRegion.clone();

        if (param != null) {
            RawImageReader.computeRegionsWrapper(param,
View Full Code Here

        Rectangle sourceRegion =
                new Rectangle(0, 0, this.width, this.height);

        originalRegion = (Rectangle)sourceRegion.clone();

        destinationRegion = (Rectangle)sourceRegion.clone();

        if (param != null) {
            RawImageReader.computeRegionsWrapper(param,
                                          this.width, this.height,
                                          param.getDestination(),
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.