Sweet Home 3D 4.1

com.eteks.sweethome3d.model
Class HomeFurnitureGroup

java.lang.Object
  extended by com.eteks.sweethome3d.model.HomePieceOfFurniture
      extended by com.eteks.sweethome3d.model.HomeFurnitureGroup
All Implemented Interfaces:
Elevatable, PieceOfFurniture, Selectable, Serializable, Cloneable

public class HomeFurnitureGroup
extends HomePieceOfFurniture

A group of furniture of furniture.

Since:
2.3
Author:
Emmanuel Puybaret
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.eteks.sweethome3d.model.HomePieceOfFurniture
HomePieceOfFurniture.Property, HomePieceOfFurniture.SortableProperty
 
Constructor Summary
HomeFurnitureGroup(List<HomePieceOfFurniture> furniture, String name)
          Creates a group from the given furniture list.
 
Method Summary
 HomeFurnitureGroup clone()
          Returns a clone of this group with cloned furniture.
 boolean containsPoint(float x, float y, float margin)
          Returns true if one of the pieces of this group contains the point at (x, y) with a given margin.
 String getCatalogId()
          Returns null.
 String getCurrency()
          Returns the currency of the furniture of this group or null if one piece has no currency or has a currency different from the other furniture.
 float getDepth()
          Returns the depth of this group.
 List<HomePieceOfFurniture> getFurniture()
          Returns an unmodifiable list of the furniture of this group.
 float getHeight()
          Returns the height of this group.
 Content getIcon()
          Returns null.
 Content getModel()
          Returns null.
 float[][] getModelRotation()
          Returns an identity matrix.
 Content getPlanIcon()
          Returns null.
 BigDecimal getPrice()
          Returns the price of the furniture of this group with a price.
 BigDecimal getPriceValueAddedTaxIncluded()
          Returns the total price of the furniture of this group.
 String getStaircaseCutOutShape()
          Returns null.
 BigDecimal getValueAddedTax()
          Returns the VAT of the furniture of this group.
 BigDecimal getValueAddedTaxPercentage()
          Returns the VAT percentage of the furniture of this group or null if one piece has no VAT percentage or has a VAT percentage different from the other furniture.
 float getWidth()
          Returns the width of this group.
 boolean intersectsRectangle(float x0, float y0, float x1, float y1)
          Returns true if one of the pieces of this group intersects with the horizontal rectangle which opposite corners are at points (x0, y0) and (x1, y1).
 boolean isBackFaceShown()
          Returns false.
 boolean isDeformable()
          Returns true if all furniture of this group are deformable.
 boolean isDoorOrWindow()
          Returns true if all furniture of this group are doors or windows.
 boolean isMovable()
          Returns true if all furniture of this group are movable.
 boolean isResizable()
          Returns true if all furniture of this group are resizable.
 boolean isTexturable()
          Returns true if all furniture of this group are texturable.
 void setAngle(float angle)
          Sets the angle of the furniture of this group.
 void setColor(Integer color)
          Sets the color of the furniture of this group.
 void setDepth(float depth)
          Sets the depth of this group, then moves and resizes its furniture accordingly.
 void setElevation(float elevation)
          Sets the elevation of this group, then moves its furniture accordingly.
 void setHeight(float height)
          Sets the height of this group, then moves and resizes its furniture accordingly.
 void setLevel(Level level)
          Set the level of this group and the furniture it contains.
 void setModelMirrored(boolean modelMirrored)
          Sets whether the furniture of this group should be mirrored or not.
 void setMovable(boolean movable)
          Sets whether this piece is movable or not.
 void setPrice(BigDecimal price)
          Sets the price of this group.
 void setTexture(HomeTexture texture)
          Sets the texture of the furniture of this group.
 void setVisible(boolean visible)
          Sets whether the furniture of this group should be visible or not.
 void setWidth(float width)
          Sets the width of this group, then moves and resizes its furniture accordingly.
 void setX(float x)
          Sets the abscissa of this group and moves its furniture accordingly.
 void setY(float y)
          Sets the ordinate of this group and moves its furniture accordingly.
 
Methods inherited from class com.eteks.sweethome3d.model.HomePieceOfFurniture
addPropertyChangeListener, getAngle, getColor, getDescription, getElevation, getFurnitureComparator, getGroundElevation, getLevel, getModelMaterials, getName, getNameAngle, getNameStyle, getNameXOffset, getNameYOffset, getPoints, getShininess, getTexture, getX, getY, isAtLevel, isBottomLeftPointAt, isBottomRightPointAt, isModelMirrored, isNameCenterPointAt, isNameVisible, isPointAt, isTopLeftPointAt, isTopRightPointAt, isVisible, move, removePropertyChangeListener, setDescription, setModelMaterials, setName, setNameAngle, setNameStyle, setNameVisible, setNameXOffset, setNameYOffset, setShininess
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HomeFurnitureGroup

public HomeFurnitureGroup(List<HomePieceOfFurniture> furniture,
                          String name)
Creates a group from the given furniture list. The level of each piece of furniture of the group will be reset to null and if they belong to levels with different elevations, their elevation will be updated to be relative to the elevation of the lowest level.

Method Detail

getFurniture

public List<HomePieceOfFurniture> getFurniture()
Returns an unmodifiable list of the furniture of this group.


getCatalogId

public String getCatalogId()
Returns null.

Overrides:
getCatalogId in class HomePieceOfFurniture

isMovable

public boolean isMovable()
Returns true if all furniture of this group are movable.

Specified by:
isMovable in interface PieceOfFurniture
Overrides:
isMovable in class HomePieceOfFurniture

setMovable

public void setMovable(boolean movable)
Sets whether this piece is movable or not.

Overrides:
setMovable in class HomePieceOfFurniture
Since:
3.1

isDoorOrWindow

public boolean isDoorOrWindow()
Returns true if all furniture of this group are doors or windows.

Specified by:
isDoorOrWindow in interface PieceOfFurniture
Overrides:
isDoorOrWindow in class HomePieceOfFurniture

isResizable

public boolean isResizable()
Returns true if all furniture of this group are resizable.

Specified by:
isResizable in interface PieceOfFurniture
Overrides:
isResizable in class HomePieceOfFurniture

isDeformable

public boolean isDeformable()
Returns true if all furniture of this group are deformable.

Specified by:
isDeformable in interface PieceOfFurniture
Overrides:
isDeformable in class HomePieceOfFurniture
Since:
3.0

isTexturable

public boolean isTexturable()
Returns true if all furniture of this group are texturable.

Specified by:
isTexturable in interface PieceOfFurniture
Overrides:
isTexturable in class HomePieceOfFurniture
Since:
3.5

getWidth

public float getWidth()
Returns the width of this group.

Specified by:
getWidth in interface PieceOfFurniture
Overrides:
getWidth in class HomePieceOfFurniture

getDepth

public float getDepth()
Returns the depth of this group.

Specified by:
getDepth in interface PieceOfFurniture
Overrides:
getDepth in class HomePieceOfFurniture

getHeight

public float getHeight()
Returns the height of this group.

Specified by:
getHeight in interface PieceOfFurniture
Overrides:
getHeight in class HomePieceOfFurniture

getIcon

public Content getIcon()
Returns null.

Specified by:
getIcon in interface PieceOfFurniture
Overrides:
getIcon in class HomePieceOfFurniture

getPlanIcon

public Content getPlanIcon()
Returns null.

Specified by:
getPlanIcon in interface PieceOfFurniture
Overrides:
getPlanIcon in class HomePieceOfFurniture

getModel

public Content getModel()
Returns null.

Specified by:
getModel in interface PieceOfFurniture
Overrides:
getModel in class HomePieceOfFurniture

getModelRotation

public float[][] getModelRotation()
Returns an identity matrix.

Specified by:
getModelRotation in interface PieceOfFurniture
Overrides:
getModelRotation in class HomePieceOfFurniture

getStaircaseCutOutShape

public String getStaircaseCutOutShape()
Returns null.

Specified by:
getStaircaseCutOutShape in interface PieceOfFurniture
Overrides:
getStaircaseCutOutShape in class HomePieceOfFurniture
Since:
3.5

getPrice

public BigDecimal getPrice()
Returns the price of the furniture of this group with a price.

Specified by:
getPrice in interface PieceOfFurniture
Overrides:
getPrice in class HomePieceOfFurniture

setPrice

public void setPrice(BigDecimal price)
Sets the price of this group.

Overrides:
setPrice in class HomePieceOfFurniture
Throws:
UnsupportedOperationException - if the price of one of the pieces is set
Since:
4.0

getValueAddedTaxPercentage

public BigDecimal getValueAddedTaxPercentage()
Returns the VAT percentage of the furniture of this group or null if one piece has no VAT percentage or has a VAT percentage different from the other furniture.

Specified by:
getValueAddedTaxPercentage in interface PieceOfFurniture
Overrides:
getValueAddedTaxPercentage in class HomePieceOfFurniture

getCurrency

public String getCurrency()
Returns the currency of the furniture of this group or null if one piece has no currency or has a currency different from the other furniture.

Specified by:
getCurrency in interface PieceOfFurniture
Overrides:
getCurrency in class HomePieceOfFurniture
Since:
3.5

getValueAddedTax

public BigDecimal getValueAddedTax()
Returns the VAT of the furniture of this group.

Overrides:
getValueAddedTax in class HomePieceOfFurniture

getPriceValueAddedTaxIncluded

public BigDecimal getPriceValueAddedTaxIncluded()
Returns the total price of the furniture of this group.

Overrides:
getPriceValueAddedTaxIncluded in class HomePieceOfFurniture

isBackFaceShown

public boolean isBackFaceShown()
Returns false.

Specified by:
isBackFaceShown in interface PieceOfFurniture
Overrides:
isBackFaceShown in class HomePieceOfFurniture

setColor

public void setColor(Integer color)
Sets the color of the furniture of this group.

Overrides:
setColor in class HomePieceOfFurniture
Parameters:
color - the color of this piece of furniture or null if piece color is the default one

setTexture

public void setTexture(HomeTexture texture)
Sets the texture of the furniture of this group.

Overrides:
setTexture in class HomePieceOfFurniture
Parameters:
texture - the texture of this piece of furniture or null if piece texture is the default one

setAngle

public void setAngle(float angle)
Sets the angle of the furniture of this group.

Overrides:
setAngle in class HomePieceOfFurniture

setX

public void setX(float x)
Sets the abscissa of this group and moves its furniture accordingly.

Overrides:
setX in class HomePieceOfFurniture

setY

public void setY(float y)
Sets the ordinate of this group and moves its furniture accordingly.

Overrides:
setY in class HomePieceOfFurniture

setWidth

public void setWidth(float width)
Sets the width of this group, then moves and resizes its furniture accordingly.

Overrides:
setWidth in class HomePieceOfFurniture

setDepth

public void setDepth(float depth)
Sets the depth of this group, then moves and resizes its furniture accordingly.

Overrides:
setDepth in class HomePieceOfFurniture

setHeight

public void setHeight(float height)
Sets the height of this group, then moves and resizes its furniture accordingly.

Overrides:
setHeight in class HomePieceOfFurniture

setElevation

public void setElevation(float elevation)
Sets the elevation of this group, then moves its furniture accordingly.

Overrides:
setElevation in class HomePieceOfFurniture

setModelMirrored

public void setModelMirrored(boolean modelMirrored)
Sets whether the furniture of this group should be mirrored or not.

Overrides:
setModelMirrored in class HomePieceOfFurniture

setVisible

public void setVisible(boolean visible)
Sets whether the furniture of this group should be visible or not.

Overrides:
setVisible in class HomePieceOfFurniture

setLevel

public void setLevel(Level level)
Set the level of this group and the furniture it contains.

Overrides:
setLevel in class HomePieceOfFurniture

intersectsRectangle

public boolean intersectsRectangle(float x0,
                                   float y0,
                                   float x1,
                                   float y1)
Returns true if one of the pieces of this group intersects with the horizontal rectangle which opposite corners are at points (x0, y0) and (x1, y1).

Specified by:
intersectsRectangle in interface Selectable
Overrides:
intersectsRectangle in class HomePieceOfFurniture
Since:
3.5

containsPoint

public boolean containsPoint(float x,
                             float y,
                             float margin)
Returns true if one of the pieces of this group contains the point at (x, y) with a given margin.

Specified by:
containsPoint in interface Selectable
Overrides:
containsPoint in class HomePieceOfFurniture
Since:
3.5

clone

public HomeFurnitureGroup clone()
Returns a clone of this group with cloned furniture.

Specified by:
clone in interface Selectable
Overrides:
clone in class HomePieceOfFurniture

Sweet Home 3D 4.1

© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License