All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java.awt.Insets Maven / Gradle / Ivy

Go to download

JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.

There is a newer version: 0.6.8
Show newest version
package java.awt;

@SuppressWarnings("WeakerAccess")
public class Insets implements Cloneable, java.io.Serializable {
	public int top;
	public int left;
	public int bottom;
	public int right;

	public Insets(int top, int left, int bottom, int right) {
		this.top = top;
		this.left = left;
		this.bottom = bottom;
		this.right = right;
	}

	public void set(int top, int left, int bottom, int right) {
		this.top = top;
		this.left = left;
		this.bottom = bottom;
		this.right = right;
	}

	public boolean equals(Object obj) {
		if (obj instanceof Insets) {
			Insets that = (Insets) obj;
			return ((this.top == that.top) && (this.left == that.left) && (this.bottom == that.bottom) && (this.right == that.right));
		}
		return false;
	}

	public int hashCode() {
		return left + bottom + right + top;
	}

	public String toString() {
		return "Insets[top=" + top + ",left=" + left + ",bottom=" + bottom + ",right=" + right + "]";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy