getCeilingTextureController().setTexture(null);
setCeilingPaint(null);
setCeilingShininess(null);
} else {
// Search the common properties among selected rooms
Room firstRoom = selectedRooms.get(0);
String name = firstRoom.getName();
if (name != null) {
for (int i = 1; i < selectedRooms.size(); i++) {
if (!name.equals(selectedRooms.get(i).getName())) {
name = null;
break;
}
}
}
setName(name);
// Search the common areaVisible value among rooms
Boolean areaVisible = firstRoom.isAreaVisible();
for (int i = 1; i < selectedRooms.size(); i++) {
if (areaVisible != selectedRooms.get(i).isAreaVisible()) {
areaVisible = null;
break;
}
}
setAreaVisible(areaVisible);
// Search the common floorVisible value among rooms
Boolean floorVisible = firstRoom.isFloorVisible();
for (int i = 1; i < selectedRooms.size(); i++) {
if (floorVisible != selectedRooms.get(i).isFloorVisible()) {
floorVisible = null;
break;
}
}
setFloorVisible(floorVisible);
// Search the common floor color among rooms
Integer floorColor = firstRoom.getFloorColor();
if (floorColor != null) {
for (int i = 1; i < selectedRooms.size(); i++) {
if (!floorColor.equals(selectedRooms.get(i).getFloorColor())) {
floorColor = null;
break;
}
}
}
setFloorColor(floorColor);
// Search the common floor texture among rooms
HomeTexture floorTexture = firstRoom.getFloorTexture();
if (floorTexture != null) {
for (int i = 1; i < selectedRooms.size(); i++) {
if (!floorTexture.equals(selectedRooms.get(i).getFloorTexture())) {
floorTexture = null;
break;
}
}
}
getFloorTextureController().setTexture(floorTexture);
if (floorColor != null) {
setFloorPaint(RoomPaint.COLORED);
} else if (floorTexture != null) {
setFloorPaint(RoomPaint.TEXTURED);
} else {
setFloorPaint(null);
}
// Search the common floor shininess among rooms
Float floorShininess = firstRoom.getFloorShininess();
for (int i = 1; i < selectedRooms.size(); i++) {
if (!floorShininess.equals(selectedRooms.get(i).getFloorShininess())) {
floorShininess = null;
break;
}
}
setFloorShininess(floorShininess);
// Search the common ceilingVisible value among rooms
Boolean ceilingVisible = firstRoom.isCeilingVisible();
for (int i = 1; i < selectedRooms.size(); i++) {
if (ceilingVisible != selectedRooms.get(i).isCeilingVisible()) {
ceilingVisible = null;
break;
}
}
setCeilingVisible(ceilingVisible);
// Search the common ceiling color among rooms
Integer ceilingColor = firstRoom.getCeilingColor();
if (ceilingColor != null) {
for (int i = 1; i < selectedRooms.size(); i++) {
if (!ceilingColor.equals(selectedRooms.get(i).getCeilingColor())) {
ceilingColor = null;
break;
}
}
}
setCeilingColor(ceilingColor);
// Search the common ceiling texture among rooms
HomeTexture ceilingTexture = firstRoom.getCeilingTexture();
if (ceilingTexture != null) {
for (int i = 1; i < selectedRooms.size(); i++) {
if (!ceilingTexture.equals(selectedRooms.get(i).getCeilingTexture())) {
ceilingTexture = null;
break;
}
}
}
getCeilingTextureController().setTexture(ceilingTexture);
if (ceilingColor != null) {
setCeilingPaint(RoomPaint.COLORED);
} else if (ceilingTexture != null) {
setCeilingPaint(RoomPaint.TEXTURED);
} else {
setCeilingPaint(null);
}
// Search the common ceiling shininess among rooms
Float ceilingShininess = firstRoom.getCeilingShininess();
for (int i = 1; i < selectedRooms.size(); i++) {
if (!ceilingShininess.equals(selectedRooms.get(i).getCeilingShininess())) {
ceilingShininess = null;
break;
}