package PbuliClass;
|
|
import java.awt.Color;
|
|
/**¾ØÐÎÀà*/
|
public class Rectangle {
|
String name;//¾ØÐεÄÃû×Ö
|
int x;//¾ØÐÎµÄÆðµã×ø±êx
|
int y;//¾ØÐÎµÄÆðµã×ø±êy
|
int width;//¾ØÐεij¤¶È
|
int height;//¾ØÐεĿí¶È
|
String floor;//¾ØÐÎËùÔڵIJã
|
Color color;//¾ØÐεÄÑÕÉ«
|
Color colos = null;
|
public Rectangle() {
|
}
|
|
public Rectangle(int x,int y,int width,int height) {
|
this.x=x;
|
this.y=y;
|
this.width=width;
|
this.height=height;
|
|
}
|
|
public String getName() {
|
return name;
|
}
|
public void setName(String name) {
|
this.name = name;
|
}
|
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 String getFloor() {
|
return floor;
|
}
|
public void setFloor(String floor) {
|
this.floor = floor;
|
}
|
public Color getColor() {
|
return color;
|
}
|
public void setColor(String xuanze) {
|
switch (xuanze) {
|
case "ºìÉ«":
|
colos=Color.red ;
|
break;
|
case "À¶É«":
|
colos=Color.blue ;
|
break;
|
case "ÂÌÉ«":
|
colos=Color.green ;
|
break;
|
case "ºÚÉ«":
|
colos=Color.black ;
|
break;
|
case "°×É«":
|
colos=Color.white ;
|
break;
|
case "Æ·ºì":
|
colos=Color.pink ;
|
break;
|
}
|
this.color = colos;
|
}
|
|
|
|
}
|