
com.extjs.gxt.ui.client.util.Point Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gxt Show documentation
Show all versions of gxt Show documentation
Rich Internet Application Framework for GWT
/*
* Sencha GXT 2.3.0 - Sencha for GWT
* Copyright(c) 2007-2013, Sencha, Inc.
* [email protected]
*
* http://www.sencha.com/products/gxt/license/
*/
package com.extjs.gxt.ui.client.util;
/**
* Instances of this class represent places on the (x, y) coordinate plane.
*
* @see Rectangle
*/
public class Point {
/**
* The x coordinate of the point
*/
public int x;
/**
* The y coordinate of the point
*/
public int y;
/**
* Constructs a new point with the given x and y coordinates.
*
* @param x the x coordinate of the new point
* @param y the y coordinate of the new point
*/
public Point(int x, int y) {
this.x = x;
this.y = y;
}
public String toString() {
return ("x: " + x + ", y: " + y);
}
public boolean equals(Object obj) {
if (obj instanceof Point) {
Point p = (Point) obj;
if (x == p.x && y == p.y) {
return true;
}
return false;
}
return super.equals(obj);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy