Java Rectangle alignsVertically(Rectangle r1, Rectangle r2)

Here you can find the source of alignsVertically(Rectangle r1, Rectangle r2)

Description

aligns Vertically

License

Open Source License

Declaration

static public boolean alignsVertically(Rectangle r1, Rectangle r2) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * SiniaUtils/*w  ww  .  ja  va  2s  .c  om*/
 * Copyright (c) 2011-2 Siniatech Ltd  
 * http://www.siniatech.com/products/siniautils
 *
 * All rights reserved. This project and the accompanying materials are made 
 * available under the terms of the MIT License which can be found in the root  
 * of the project, and at http://www.opensource.org/licenses/mit-license.php
 *
 ******************************************************************************/

import java.awt.Rectangle;

public class Main {
    static public boolean alignsVertically(Rectangle r1, Rectangle r2) {
        return r1.getMaxX() == r2.getMaxX() && r1.getMinX() == r2.getMinX();
    }
}

Related

  1. addTo(Insets i1, Insets i2)
  2. alignComponentsBaseHorizontal(Component left, Component right)
  3. clip(int x, int y, int w, int h)
  4. computeDifference(Rectangle rectA, Rectangle rectB)
  5. expand(final Rectangle rect, final int expansion)
  6. expand(Rectangle rect, int amount)