Package java.awt

Examples of java.awt.Rectangle.union()


            PMElement pme = iter.nextElement();
            if ((pme != null) && (pme.getBounds() != null)) {
                if (bounds == null) {
                    bounds = pme.getBounds();
                } else {
                    bounds = bounds.union(pme.getBounds());
                }
            }
        }
        return bounds;
    }
View Full Code Here


        GraphicsDevice[] gs = ge.getScreenDevices();
        for (int j = 0; j < gs.length; j++) {
            GraphicsDevice gd = gs[j];
            GraphicsConfiguration[] gc = gd.getConfigurations();
            for (int i = 0; i < gc.length; i++) {
                virtualBounds = virtualBounds.union(gc[i].getBounds());
            }
        }
        // zoom out if its too big for the screen
        while (zoom > 0
                && (requiredWidth > virtualBounds.width || requiredHeight > virtualBounds.height)) {
View Full Code Here

        GraphicsDevice[] gs = ge.getScreenDevices();
        for (int j = 0; j < gs.length; j++) {
            GraphicsDevice gd = gs[j];
            GraphicsConfiguration[] gc = gd.getConfigurations();
            for (int i = 0; i < gc.length; i++) {
                virtualBounds = virtualBounds.union(gc[i].getBounds());
            }
        }
        // zoom out if its too big for the screen
        while (zoom > 0
                && (requiredWidth > virtualBounds.width || requiredHeight > virtualBounds.height)) {
View Full Code Here

        GraphicsDevice[] gs = ge.getScreenDevices();
        for (int j = 0; j < gs.length; j++) {
            GraphicsDevice gd = gs[j];
            GraphicsConfiguration[] gc = gd.getConfigurations();
            for (int i = 0; i < gc.length; i++) {
                virtualBounds = virtualBounds.union(gc[i].getBounds());
            }
        }
        if (GUIPreferences.getInstance().getWindowSizeHeight() != 0) {
            int x = GUIPreferences.getInstance().getWindowPosX();
            int y = GUIPreferences.getInstance().getWindowPosY();
View Full Code Here

        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        GraphicsDevice[] gs = ge.getScreenDevices();
        for (GraphicsDevice gd : gs) {
            GraphicsConfiguration[] gc = gd.getConfigurations();
            for (GraphicsConfiguration element : gc) {
                virtualBounds = virtualBounds.union(element.getBounds());
            }
        }
        if (GUIPreferences.getInstance().getWindowSizeHeight() != 0) {
            int x = GUIPreferences.getInstance().getWindowPosX();
            int y = GUIPreferences.getInstance().getWindowPosY();
View Full Code Here

   private static final Insets EMPTY_INSETS = new Insets(0, 0, 0, 0);

   public static Rectangle getRowBounds(JTable table, int first, int last)
   {
      Rectangle result = table.getCellRect(first, -1, true);
      result = result.union(table.getCellRect(last, -1, true));
      Insets i = table.getInsets();

      result.x = i.left;
      result.width = table.getWidth() - i.left - i.right;
View Full Code Here

                    }
                    cost2 = (overhead                 +
                             (cr.height*lineOverhead) +
                             (cr.height*cr.width));

                    mr = r.union(cr);
                    cost3 = (overhead                 +
                             (mr.height*lineOverhead) +
                             (mr.height*mr.width));
                    if (cost3 <= cost1+cost2) {
                        r = rects[i] = mr;
View Full Code Here

      finderBounds = bounds;

      // LATER: Fix repaint region to be smaller
      if (repaint)
      {
        old = old.union(finderBounds);
        old.grow(3, 3);
        repaint(old);
      }
    }
  }
View Full Code Here

      {
        pt = pts.get(i);
        buf.append(" l " + Math.round(pt.getX()) + " "
            + Math.round(pt.getY()));

        r = r.union(new Rectangle(pt.getPoint()));
      }

      String d = buf.toString();
      elem.setAttribute("path", d);
      elem.setAttribute("filled", "false");
View Full Code Here

            Rectangle rect = null;
            if (figIterator.hasNext()) rect = ((Figure) figIterator.next()).getDisplayBox();

            while (figIterator.hasNext()) {
                Figure fig = (Figure) figIterator.next();
                rect.union(fig.getDisplayBox());
            }

            if (rect == null) return;

            adjustFigureToCenter(drawingView, rect);
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.