Package java.awt

Examples of java.awt.Rectangle.union()


      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

    double minY = 0;
    double maxX = 0;
    double maxY = 0;

    Rectangle area = bgRect.getBounds().union(underRect.getBounds());
    if (tabRect != null) area = area.union(tabRect.getBounds());
    if (line != null) {
      area = area.union(new Rectangle(line.getBounds()) );
      if (triangle != null) area = area.union(triangle.getBounds());
    }
    if (moveRect != null) {
View Full Code Here

    double maxY = 0;

    Rectangle area = bgRect.getBounds().union(underRect.getBounds());
    if (tabRect != null) area = area.union(tabRect.getBounds());
    if (line != null) {
      area = area.union(new Rectangle(line.getBounds()) );
      if (triangle != null) area = area.union(triangle.getBounds());
    }
    if (moveRect != null) {
      Rectangle movingRect = moveRect.getShape().getBounds();
      movingRect.grow(10,10);
View Full Code Here

    Rectangle area = bgRect.getBounds().union(underRect.getBounds());
    if (tabRect != null) area = area.union(tabRect.getBounds());
    if (line != null) {
      area = area.union(new Rectangle(line.getBounds()) );
      if (triangle != null) area = area.union(triangle.getBounds());
    }
    if (moveRect != null) {
      Rectangle movingRect = moveRect.getShape().getBounds();
      movingRect.grow(10,10);
      area = area.union(movingRect);
View Full Code Here

      r = textArea.modelToView(start);
      if (r==null) { // Not yet visible; i.e. JUnit tests
        return;
      }
      if (end!=start) {
        r = r.union(textArea.modelToView(end));
      }
    } catch (BadLocationException ble) { // Never happens
      ble.printStackTrace();
      textArea.setSelectionStart(start);
      textArea.setSelectionEnd(end);
View Full Code Here

      r = textArea.modelToView(start);
      if (r==null) { // Not yet visible; i.e. JUnit tests
        return;
      }
      if (end!=start) {
        r = r.union(textArea.modelToView(end));
      }
    } catch (BadLocationException ble) { // Never happens
      ble.printStackTrace();
      if (select) {
        textArea.setSelectionStart(start);
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);
        d += " l " + Math.round(pt.getX()) + " "
            + Math.round(pt.getY());

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

      elem.setAttribute("path", d);
      elem.setAttribute("filled", "false");
      elem.setAttribute("strokecolor", strokeColor);
View Full Code Here

    public static Rectangle getVirtualScreenBounds() {
        Rectangle virtualBounds = new Rectangle();
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        for (GraphicsDevice gd : ge.getScreenDevices()) {
            if (gd.getType() == GraphicsDevice.TYPE_RASTER_SCREEN) {
                virtualBounds = virtualBounds.union(gd.getDefaultConfiguration().getBounds());
            }
        }
        return virtualBounds;
    }
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.