}
} else if (item instanceof HomeFurnitureGroup) {
itemBounds.add(getItemsBounds(g, ((HomeFurnitureGroup)item).getFurniture()));
}
// Add to bounds the displayed name of the piece of furniture
HomePieceOfFurniture piece = (HomePieceOfFurniture)item;
float xPiece = piece.getX();
float yPiece = piece.getY();
String pieceName = piece.getName();
if (piece.isVisible()
&& piece.isNameVisible()
&& pieceName.length() > 0) {
float xName = xPiece + piece.getNameXOffset();
float yName = yPiece + piece.getNameYOffset();
TextStyle nameStyle = piece.getNameStyle();
if (nameStyle == null) {
nameStyle = this.preferences.getDefaultTextStyle(piece.getClass());
}
FontMetrics nameFontMetrics = getFontMetrics(componentFont, nameStyle);
Rectangle2D nameBounds = nameFontMetrics.getStringBounds(pieceName, g);
itemBounds.add(xName - nameBounds.getWidth() / 2,
yName - nameFontMetrics.getAscent());