Package java.awt

Examples of java.awt.Rectangle.union()


   */
  private void makeRowsVisible(int minRow, int maxRow) {   
    // Compute the rectangle that includes a row
    Rectangle includingRectangle = getCellRect(minRow, 0, true);
    if (minRow != maxRow) {
      includingRectangle = includingRectangle.
          union(getCellRect(maxRow, 0, true));     
    }
    if (getAutoResizeMode() == AUTO_RESIZE_OFF) {
      int lastColumn = getColumnCount() - 1;
      includingRectangle = includingRectangle.
View Full Code Here


      includingRectangle = includingRectangle.
          union(getCellRect(maxRow, 0, true));     
    }
    if (getAutoResizeMode() == AUTO_RESIZE_OFF) {
      int lastColumn = getColumnCount() - 1;
      includingRectangle = includingRectangle.
          union(getCellRect(minRow, lastColumn, true));
      if (minRow != maxRow) {
        includingRectangle = includingRectangle.
            union(getCellRect(maxRow, lastColumn, true));     
      }
View Full Code Here

    if (getAutoResizeMode() == AUTO_RESIZE_OFF) {
      int lastColumn = getColumnCount() - 1;
      includingRectangle = includingRectangle.
          union(getCellRect(minRow, lastColumn, true));
      if (minRow != maxRow) {
        includingRectangle = includingRectangle.
            union(getCellRect(maxRow, lastColumn, true));     
      }
    }
    scrollRectToVisible(includingRectangle);
  }
View Full Code Here

   */
  private void makeRowsVisible(int minRow, int maxRow) {   
    // Compute the rectangle that includes a row
    Rectangle includingRectangle = getCellRect(minRow, 0, true);
    if (minRow != maxRow) {
      includingRectangle = includingRectangle.
          union(getCellRect(maxRow, 0, true));     
    }
    if (getAutoResizeMode() == AUTO_RESIZE_OFF) {
      int lastColumn = getColumnCount() - 1;
      includingRectangle = includingRectangle.
View Full Code Here

      includingRectangle = includingRectangle.
          union(getCellRect(maxRow, 0, true));     
    }
    if (getAutoResizeMode() == AUTO_RESIZE_OFF) {
      int lastColumn = getColumnCount() - 1;
      includingRectangle = includingRectangle.
          union(getCellRect(minRow, lastColumn, true));
      if (minRow != maxRow) {
        includingRectangle = includingRectangle.
            union(getCellRect(maxRow, lastColumn, true));     
      }
View Full Code Here

    if (getAutoResizeMode() == AUTO_RESIZE_OFF) {
      int lastColumn = getColumnCount() - 1;
      includingRectangle = includingRectangle.
          union(getCellRect(minRow, lastColumn, true));
      if (minRow != maxRow) {
        includingRectangle = includingRectangle.
            union(getCellRect(maxRow, lastColumn, true));     
      }
    }
    scrollRectToVisible(includingRectangle);
  }
View Full Code Here

                    if ((cr == null) || (cr == r)) continue;
                    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) {
                        rects[j] = mr;
View Full Code Here

    Rectangle validArea;
    Rectangle newArea = affectedArea.getValidArea();
    if(originalArea == null) {
      validArea = newArea;
    } else {
      validArea = newArea.union(originalArea);
    }
    getContext().getViewportPane().repaint(validArea.x-2, validArea.y-2, validArea.width+4, validArea.height+4);
  }
 
  @Override
View Full Code Here

        Point point = tracker.get();
        int y = point.getY()-radius;
        int x = point.getX()-radius;
        Rectangle rectangle = new Rectangle(x-4, y-4, radius*2+8, radius*2+8);
        if( lastArea!=null )
            return rectangle.union(lastArea);
        else
            return rectangle;
       
    }

View Full Code Here

            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

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.