|
Sweet Home 3D 2.5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.eteks.sweethome3d.model.HomePieceOfFurniture
public class HomePieceOfFurniture
A piece of furniture in home.
| Nested Class Summary | |
|---|---|
static class |
HomePieceOfFurniture.Property
The properties of a piece of furniture that may change. |
static class |
HomePieceOfFurniture.SortableProperty
The properties on which home furniture may be sorted. |
| Constructor Summary | |
|---|---|
HomePieceOfFurniture(PieceOfFurniture piece)
Creates a home piece of furniture from an existing piece. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds the property change listener in parameter to this piece. |
HomePieceOfFurniture |
clone()
Returns a clone of this piece. |
boolean |
containsPoint(float x,
float y,
float margin)
Returns true if this piece contains
the point at (x, y)
with a given margin. |
float |
getAngle()
Returns the angle in radians of this piece of furniture. |
String |
getCatalogId()
Returns the catalog ID of this piece of furniture or null if it doesn't exist. |
Integer |
getColor()
Returns the color of this piece of furniture. |
float |
getDepth()
Returns the depth of this piece of furniture. |
String |
getDescription()
Returns the description of this piece of furniture. |
float |
getElevation()
Returns the elevation of the bottom of this piece of furniture. |
static Comparator<HomePieceOfFurniture> |
getFurnitureComparator(HomePieceOfFurniture.SortableProperty property)
Returns a comparator that compares furniture on a given property in ascending order. |
float |
getHeight()
Returns the height of this piece of furniture. |
Content |
getIcon()
Returns the icon of this piece of furniture. |
Content |
getModel()
Returns the 3D model of this piece of furniture. |
float[][] |
getModelRotation()
Returns the rotation 3 by 3 matrix of this piece of furniture that ensures its model is correctly oriented. |
String |
getName()
Returns the name of this piece of furniture. |
TextStyle |
getNameStyle()
Returns the text style used to display piece name. |
float |
getNameXOffset()
Returns the distance along x axis applied to piece abscissa to display piece name. |
float |
getNameYOffset()
Returns the distance along y axis applied to piece ordinate to display piece name. |
Content |
getPlanIcon()
Returns the icon of this piece of furniture displayed in plan or null. |
float[][] |
getPoints()
Returns the points of each corner of a piece. |
BigDecimal |
getPrice()
Returns the price of this piece of furniture or null. |
BigDecimal |
getPriceValueAddedTaxIncluded()
Returns the price of this piece of furniture, Value Added Tax included. |
HomeTexture |
getTexture()
Returns the texture of this piece of furniture. |
BigDecimal |
getValueAddedTax()
Returns the Value Added Tax applied to the price of this piece of furniture. |
BigDecimal |
getValueAddedTaxPercentage()
Returns the Value Added Tax percentage applied to the price of this piece of furniture. |
float |
getWidth()
Returns the width of this piece of furniture. |
float |
getX()
Returns the abscissa of the center of this piece of furniture. |
float |
getY()
Returns the ordinate of the center of this piece of furniture. |
boolean |
intersectsRectangle(float x0,
float y0,
float x1,
float y1)
Returns true if this piece intersects
with the horizontal rectangle which opposite corners are at points
(x0, y0) and (x1, y1). |
boolean |
isBackFaceShown()
Returns true if the back face of the piece of furniture
model should be displayed. |
boolean |
isBottomLeftPointAt(float x,
float y,
float margin)
Returns true if the bottom left point of this piece is
the point at (x, y) with a given margin. |
boolean |
isBottomRightPointAt(float x,
float y,
float margin)
Returns true if the bottom right point of this piece is
the point at (x, y) with a given margin. |
boolean |
isDoorOrWindow()
Returns true if this piece of furniture is a door or a window. |
boolean |
isModelMirrored()
Returns true if the model of this piece should be mirrored. |
boolean |
isMovable()
Returns true if this piece of furniture is movable. |
boolean |
isNameCenterPointAt(float x,
float y,
float margin)
Returns true if the center point at which is displayed the name
of this piece is equal to the point at (x, y)
with a given margin. |
boolean |
isNameVisible()
Returns whether the name of this piece should be drawn or not. |
boolean |
isPointAt(float x,
float y,
float margin)
Returns true if one of the corner of this piece is
the point at (x, y) with a given margin. |
boolean |
isResizable()
Returns true if this piece is resizable. |
boolean |
isTopLeftPointAt(float x,
float y,
float margin)
Returns true if the top left point of this piece is
the point at (x, y) with a given margin. |
boolean |
isTopRightPointAt(float x,
float y,
float margin)
Returns true if the top right point of this piece is
the point at (x, y) with a given margin. |
boolean |
isVisible()
Returns true if this piece of furniture is visible. |
void |
move(float dx,
float dy)
Moves this piece of ( dx, dy) units. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the property change listener in parameter from this piece. |
void |
setAngle(float angle)
Sets the angle of this piece. |
void |
setColor(Integer color)
Sets the color of this piece of furniture or null if piece color is unchanged. |
void |
setDepth(float depth)
Sets the depth of this piece of furniture. |
void |
setDescription(String description)
Sets the description of this piece of furniture. |
void |
setElevation(float elevation)
Sets the elevation of this piece of furniture. |
void |
setHeight(float height)
Sets the height of this piece of furniture. |
void |
setModelMirrored(boolean modelMirrored)
Sets whether the model of this piece of furniture is mirrored or not. |
void |
setName(String name)
Sets the name of this piece of furniture. |
void |
setNameStyle(TextStyle nameStyle)
Sets the text style used to display piece name. |
void |
setNameVisible(boolean nameVisible)
Sets whether the name of this piece is visible or not. |
void |
setNameXOffset(float nameXOffset)
Sets the distance along x axis applied to piece abscissa to display piece name. |
void |
setNameYOffset(float nameYOffset)
Sets the distance along y axis applied to piece ordinate to display piece name. |
void |
setTexture(HomeTexture texture)
Sets the texture of this piece of furniture or null if piece texture is unchanged. |
void |
setVisible(boolean visible)
Sets whether this piece of furniture is visible or not. |
void |
setWidth(float width)
Sets the width of this piece of furniture. |
void |
setX(float x)
Sets the abscissa of the center of this piece. |
void |
setY(float y)
Sets the ordinate of the center of this piece. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HomePieceOfFurniture(PieceOfFurniture piece)
piece - the piece from which data are copied| Method Detail |
|---|
public void addPropertyChangeListener(PropertyChangeListener listener)
listener in parameter to this piece.
public void removePropertyChangeListener(PropertyChangeListener listener)
listener in parameter from this piece.
public String getCatalogId()
null if it doesn't exist.
public String getName()
getName in interface PieceOfFurniturepublic void setName(String name)
public boolean isNameVisible()
public void setNameVisible(boolean nameVisible)
public float getNameXOffset()
public void setNameXOffset(float nameXOffset)
public float getNameYOffset()
public void setNameYOffset(float nameYOffset)
public TextStyle getNameStyle()
public void setNameStyle(TextStyle nameStyle)
public String getDescription()
null.
getDescription in interface PieceOfFurniturepublic void setDescription(String description)
public float getDepth()
getDepth in interface PieceOfFurniturepublic void setDepth(float depth)
IllegalStateException - if this piece of furniture isn't resizablepublic float getHeight()
getHeight in interface PieceOfFurniturepublic void setHeight(float height)
IllegalStateException - if this piece of furniture isn't resizablepublic float getWidth()
getWidth in interface PieceOfFurniturepublic void setWidth(float width)
IllegalStateException - if this piece of furniture isn't resizablepublic float getElevation()
getElevation in interface PieceOfFurniturepublic void setElevation(float elevation)
public boolean isMovable()
true if this piece of furniture is movable.
isMovable in interface PieceOfFurniturepublic boolean isDoorOrWindow()
true if this piece of furniture is a door or a window.
As this method existed before HomeDoorOrWindow class,
you shouldn't rely on the value returned by this method to guess if a piece
is an instance of DoorOrWindow class.
isDoorOrWindow in interface PieceOfFurniturepublic Content getIcon()
getIcon in interface PieceOfFurniturepublic Content getPlanIcon()
null.
getPlanIcon in interface PieceOfFurniturepublic Content getModel()
getModel in interface PieceOfFurniturepublic Integer getColor()
getColor in interface PieceOfFurniturenull if piece color is unchanged.public void setColor(Integer color)
null if piece color is unchanged.
Once this piece is updated, listeners added to this piece will receive a change notification.
public HomeTexture getTexture()
null if piece texture is unchanged.public void setTexture(HomeTexture texture)
null if piece texture is unchanged.
Once this piece is updated, listeners added to this piece will receive a change notification.
public boolean isResizable()
true if this piece is resizable.
isResizable in interface PieceOfFurniturepublic BigDecimal getPrice()
null.
getPrice in interface PieceOfFurniturepublic BigDecimal getValueAddedTaxPercentage()
getValueAddedTaxPercentage in interface PieceOfFurniturepublic BigDecimal getValueAddedTax()
public BigDecimal getPriceValueAddedTaxIncluded()
public boolean isVisible()
true if this piece of furniture is visible.
public void setVisible(boolean visible)
public float getX()
public void setX(float x)
public float getY()
public void setY(float y)
public float getAngle()
public void setAngle(float angle)
public boolean isModelMirrored()
true if the model of this piece should be mirrored.
public void setModelMirrored(boolean modelMirrored)
IllegalStateException - if this piece of furniture isn't resizablepublic float[][] getModelRotation()
getModelRotation in interface PieceOfFurniturepublic boolean isBackFaceShown()
true if the back face of the piece of furniture
model should be displayed.
isBackFaceShown in interface PieceOfFurniturepublic float[][] getPoints()
getPoints in interface Selectable
public boolean intersectsRectangle(float x0,
float y0,
float x1,
float y1)
true if this piece intersects
with the horizontal rectangle which opposite corners are at points
(x0, y0) and (x1, y1).
intersectsRectangle in interface Selectable
public boolean containsPoint(float x,
float y,
float margin)
true if this piece contains
the point at (x, y)
with a given margin.
containsPoint in interface Selectable
public boolean isPointAt(float x,
float y,
float margin)
true if one of the corner of this piece is
the point at (x, y) with a given margin.
public boolean isTopLeftPointAt(float x,
float y,
float margin)
true if the top left point of this piece is
the point at (x, y) with a given margin.
public boolean isTopRightPointAt(float x,
float y,
float margin)
true if the top right point of this piece is
the point at (x, y) with a given margin.
public boolean isBottomLeftPointAt(float x,
float y,
float margin)
true if the bottom left point of this piece is
the point at (x, y) with a given margin.
public boolean isBottomRightPointAt(float x,
float y,
float margin)
true if the bottom right point of this piece is
the point at (x, y) with a given margin.
public boolean isNameCenterPointAt(float x,
float y,
float margin)
true if the center point at which is displayed the name
of this piece is equal to the point at (x, y)
with a given margin.
public void move(float dx,
float dy)
dx, dy) units.
move in interface Selectablepublic HomePieceOfFurniture clone()
clone in interface Selectableclone in class Objectpublic static Comparator<HomePieceOfFurniture> getFurnitureComparator(HomePieceOfFurniture.SortableProperty property)
property in ascending order.
|
Sweet Home 3D 2.5 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
![]() |
© Copyrights 2006-2010 eTeks - All rights reserved
Distributed under GNU General Public License |