Sweet Home 3D 3.4

com.eteks.sweethome3d.model
Class HomeLight

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

public class HomeLight
extends HomePieceOfFurniture
implements Light

A light in home.

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

Nested Class Summary
static class HomeLight.Property
          The properties of a light that may change.
 
Nested classes/interfaces inherited from class com.eteks.sweethome3d.model.HomePieceOfFurniture
HomePieceOfFurniture.SortableProperty
 
Constructor Summary
HomeLight(Light light)
          Creates a home light from an existing one.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds the property change listener in parameter to this piece.
 HomeLight clone()
          Returns a clone of this light.
 LightSource[] getLightSources()
          Returns the sources managed by this light.
 float getPower()
          Returns the power of this light.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes the property change listener in parameter from this piece.
 void setPower(float power)
          Sets the power of this light.
 
Methods inherited from class com.eteks.sweethome3d.model.HomePieceOfFurniture
containsPoint, getAngle, getCatalogId, getColor, getCurrency, getDepth, getDescription, getElevation, getFurnitureComparator, getGroundElevation, getHeight, getIcon, getLevel, getModel, getModelRotation, getName, getNameStyle, getNameXOffset, getNameYOffset, getPlanIcon, getPoints, getPrice, getPriceValueAddedTaxIncluded, getShininess, getStaircaseCutOutShape, getTexture, getValueAddedTax, getValueAddedTaxPercentage, getWidth, getX, getY, intersectsRectangle, isAtLevel, isBackFaceShown, isBottomLeftPointAt, isBottomRightPointAt, isDeformable, isDoorOrWindow, isModelMirrored, isMovable, isNameCenterPointAt, isNameVisible, isPointAt, isResizable, isTexturable, isTopLeftPointAt, isTopRightPointAt, isVisible, move, setAngle, setColor, setDepth, setDescription, setElevation, setHeight, setLevel, setModelMirrored, setMovable, setName, setNameStyle, setNameVisible, setNameXOffset, setNameYOffset, setShininess, setTexture, setVisible, setWidth, setX, setY
 
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, isDoorOrWindow, isMovable, isResizable, isTexturable
 

Constructor Detail

HomeLight

public HomeLight(Light light)
Creates a home light from an existing one.

Parameters:
light - the light from which data are copied
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds the property change listener in parameter to this piece.

Overrides:
addPropertyChangeListener in class HomePieceOfFurniture
Since:
3.0

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the property change listener in parameter from this piece.

Overrides:
removePropertyChangeListener in class HomePieceOfFurniture
Since:
3.0

getLightSources

public LightSource[] getLightSources()
Returns the sources managed by this light. Each light source point is a percentage of the width, the depth and the height of this light. with the abscissa origin at the left side of the piece, the ordinate origin at the front side of the piece and the elevation origin at the bottom side of the piece.

Specified by:
getLightSources in interface Light
Returns:
a copy of light sources array.

getPower

public float getPower()
Returns the power of this light.

Since:
3.0

setPower

public void setPower(float power)
Sets the power of this light. Once this light is updated, listeners added to this piece will receive a change notification.

Since:
3.0

clone

public HomeLight clone()
Returns a clone of this light.

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