?? xyconstraints.java
字號:
package com.flying.util;
import java.io.Serializable;
//tools
public class XYConstraints implements Cloneable, Serializable {
int x;
int y;
int width;
int height;
public XYConstraints() {
this( 0, 0, 0, 0 );
}
public XYConstraints( int x, int y, int width, int height ) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
public int getX() {
return x;
}
public void setX( int x ) {
this.x = x;
}
public int getY() {
return y;
}
public void setY( int y ) {
this.y = y;
}
public int getWidth() {
return width;
}
public void setWidth( int width ) {
this.width = width;
}
public int getHeight() {
return height;
}
public void setHeight( int height ) {
this.height = height;
}
public int hashCode() {
return x ^ y * 37 ^ width * 43 ^ height * 47;
}
public boolean equals( Object that ) {
if ( that instanceof XYConstraints ) {
XYConstraints other = ( XYConstraints ) that;
return other.x == x && other.y == y && other.width == width && other.height == height;
} else {
return false;
}
}
public Object clone() {
return new XYConstraints( x, y, width, height );
}
public String toString() {
return String.valueOf( ( new StringBuffer( "XYConstraints[" ) ).append( x ).append( "," ).append( y ).append( "," ).append( width ).append( "," ).append( height ).append( "]" ) );
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -