Sweet Home 3D 4.1

com.eteks.sweethome3d.model
Class HomeDoorOrWindow

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

public class HomeDoorOrWindow
extends HomePieceOfFurniture
implements DoorOrWindow

A door or a window in home.

Since:
1.7
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
HomeDoorOrWindow(DoorOrWindow doorOrWindow)
          Creates a home door or window from an existing one.
 
Method Summary
 HomeDoorOrWindow clone()
          Returns a clone of this door or window.
 Sash[] getSashes()
          Returns a copy of the sashes attached to this door or window.
 float getWallDistance()
          Returns the default distance that should lie at the back side of this door or window.
 float getWallThickness()
          Returns the default thickness of the wall in which this door or window should be placed.
 boolean isBoundToWall()
          Returns true if the location and the size of this door or window were bound to a wall, last time they were updated.
 boolean isDoorOrWindow()
          Returns always true.
 void setAngle(float angle)
          Sets the angle of this door or window and resets its boundToWall flag if the angle changed.
 void setBoundToWall(boolean boundToWall)
          Sets whether the location and the size of this door or window were bound to a wall, last time they were updated.
 void setDepth(float depth)
          Sets the depth of this door or window and resets its boundToWall flag if the depth changed.
 void setX(float x)
          Sets the abscissa of this door or window and resets its boundToWall flag if the abscissa changed.
 void setY(float y)
          Sets the ordinate of this door or window and resets its boundToWall flag if the ordinate changed.
 
Methods inherited from class com.eteks.sweethome3d.model.HomePieceOfFurniture
addPropertyChangeListener, containsPoint, getAngle, getCatalogId, getColor, getCurrency, getDepth, getDescription, getElevation, getFurnitureComparator, getGroundElevation, getHeight, getIcon, getLevel, getModel, getModelMaterials, getModelRotation, getName, getNameAngle, getNameStyle, getNameXOffset, getNameYOffset, getPlanIcon, getPoints, getPrice, getPriceValueAddedTaxIncluded, getShininess, getStaircaseCutOutShape, getTexture, getValueAddedTax, getValueAddedTaxPercentage, getWidth, getX, getY, intersectsRectangle, isAtLevel, isBackFaceShown, isBottomLeftPointAt, isBottomRightPointAt, isDeformable, isModelMirrored, isMovable, isNameCenterPointAt, isNameVisible, isPointAt, isResizable, isTexturable, isTopLeftPointAt, isTopRightPointAt, isVisible, move, removePropertyChangeListener, setColor, setDescription, setElevation, setHeight, setLevel, setModelMaterials, setModelMirrored, setMovable, setName, setNameAngle, setNameStyle, setNameVisible, setNameXOffset, setNameYOffset, setPrice, setShininess, setTexture, setVisible, setWidth
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.eteks.sweethome3d.model.PieceOfFurniture
getColor, getCurrency, getDepth, getDescription, getElevation, getHeight, getIcon, getModel, getModelRotation, getName, getPlanIcon, getPrice, getStaircaseCutOutShape, getValueAddedTaxPercentage, getWidth, isBackFaceShown, isDeformable, isMovable, isResizable, isTexturable
 

Constructor Detail

HomeDoorOrWindow

public HomeDoorOrWindow(DoorOrWindow doorOrWindow)
Creates a home door or window from an existing one.

Parameters:
doorOrWindow - the door or window from which data are copied
Method Detail

getWallThickness

public float getWallThickness()
Returns the default thickness of the wall in which this door or window should be placed.

Specified by:
getWallThickness in interface DoorOrWindow
Returns:
a value in percentage of the depth of the door or the window.

getWallDistance

public float getWallDistance()
Returns the default distance that should lie at the back side of this door or window.

Specified by:
getWallDistance in interface DoorOrWindow
Returns:
a distance in percentage of the depth of the door or the window.

getSashes

public Sash[] getSashes()
Returns a copy of the sashes attached to this door or window. If no sash is defined an empty array is returned.

Specified by:
getSashes in interface DoorOrWindow

isBoundToWall

public boolean isBoundToWall()
Returns true if the location and the size of this door or window were bound to a wall, last time they were updated.


setBoundToWall

public void setBoundToWall(boolean boundToWall)
Sets whether the location and the size of this door or window were bound to a wall, last time they were updated.


setX

public void setX(float x)
Sets the abscissa of this door or window and resets its boundToWall flag if the abscissa changed.

Overrides:
setX in class HomePieceOfFurniture

setY

public void setY(float y)
Sets the ordinate of this door or window and resets its boundToWall flag if the ordinate changed.

Overrides:
setY in class HomePieceOfFurniture

setAngle

public void setAngle(float angle)
Sets the angle of this door or window and resets its boundToWall flag if the angle changed.

Overrides:
setAngle in class HomePieceOfFurniture

setDepth

public void setDepth(float depth)
Sets the depth of this door or window and resets its boundToWall flag if the depth changed.

Overrides:
setDepth in class HomePieceOfFurniture

isDoorOrWindow

public boolean isDoorOrWindow()
Returns always true.

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

clone

public HomeDoorOrWindow clone()
Returns a clone of this door or window.

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