Sweet Home 3D 3.4

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, java.io.Serializable, java.lang.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(java.util.List<HomePieceOfFurniture> furniture, java.lang.String name)
          Creates a group from the given furniture list.
 
Method Summary
 HomeFurnitureGroup clone()
          Returns a clone of this group with cloned furniture.
 java.lang.String getCatalogId()
          Returns null.
 float getDepth()
          Returns the depth of this group.
 java.util.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.
 java.math.BigDecimal getPrice()
          Returns the price of the furniture of this group with a price.
 java.math.BigDecimal getPriceValueAddedTaxIncluded()
          Returns the total price of the furniture of this group.
 java.math.BigDecimal getValueAddedTax()
          Returns the VAT of the furniture of this group.
 java.math.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 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.
 void setAngle(float angle)
          Sets the angle of the furniture of this group.
 void setColor(java.lang.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 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, containsPoint, getAngle, getColor, getCurrency, getDescription, getElevation, getFurnitureComparator, getGroundElevation, getLevel, getName, getNameStyle, getNameXOffset, getNameYOffset, getPoints, getShininess, getStaircaseCutOutShape, getTexture, getX, getY, intersectsRectangle, isAtLevel, isBottomLeftPointAt, isBottomRightPointAt, isModelMirrored, isNameCenterPointAt, isNameVisible, isPointAt, isTexturable, isTopLeftPointAt, isTopRightPointAt, isVisible, move, removePropertyChangeListener, setDescription, setName, 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(java.util.List<HomePieceOfFurniture> furniture,
                          java.lang.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 java.util.List<HomePieceOfFurniture> getFurniture()
Returns an unmodifiable list of the furniture of this group.


getCatalogId

public java.lang.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

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

getPrice

public java.math.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

getValueAddedTaxPercentage

public java.math.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

getValueAddedTax

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

Overrides:
getValueAddedTax in class HomePieceOfFurniture

getPriceValueAddedTaxIncluded

public java.math.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(java.lang.Integer color)
Sets the color of the furniture of this group.

Overrides:
setColor in class HomePieceOfFurniture

setTexture

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

Overrides:
setTexture in class HomePieceOfFurniture

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

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 3.4

? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License