public class Wall extends HomeObject implements Selectable, Elevatable
Modifier and Type | Class and Description |
---|---|
static class |
Wall.Property
The properties of a wall that may change.
|
Constructor and Description |
---|
Wall(float xStart,
float yStart,
float xEnd,
float yEnd,
float thickness)
Deprecated.
specify a height with the other constructor.
|
Wall(float xStart,
float yStart,
float xEnd,
float yEnd,
float thickness,
float height)
Creates a wall from (
xStart ,yStart )
to (xEnd , yEnd ),
with given thickness and height. |
Wall(float xStart,
float yStart,
float xEnd,
float yEnd,
float thickness,
float height,
TextureImage pattern)
Creates a wall from (
xStart ,yStart )
to (xEnd , yEnd ),
with given thickness, height and pattern. |
Wall(java.lang.String id,
float xStart,
float yStart,
float xEnd,
float yEnd,
float thickness,
float height)
Creates a wall from (
xStart ,yStart )
to (xEnd , yEnd ),
with given thickness and height. |
Wall(java.lang.String id,
float xStart,
float yStart,
float xEnd,
float yEnd,
float thickness,
float height,
TextureImage pattern)
Creates a wall from (
xStart ,yStart )
to (xEnd , yEnd ),
with given thickness, height and pattern. |
Modifier and Type | Method and Description |
---|---|
Wall |
clone()
Returns a clone of this wall expected
its wall at start and wall at end aren't copied.
|
static java.util.List<Wall> |
clone(java.util.List<Wall> walls)
Returns a clone of the
walls list. |
boolean |
containsPoint(float x,
float y,
boolean includeBaseboards,
float margin)
Returns
true if this wall contains the point at (x , y )
possibly including its baseboards, with a given margin . |
boolean |
containsPoint(float x,
float y,
float margin)
Returns
true if this wall contains the point at (x , y )
not including its baseboards, with a given margin . |
boolean |
containsWallEndAt(float x,
float y,
float margin)
Returns
true if this wall end line contains
the point at (x , y )
with a given margin around the wall end line. |
boolean |
containsWallStartAt(float x,
float y,
float margin)
Returns
true if this wall start line contains
the point at (x , y )
with a given margin around the wall start line. |
static java.util.List<Wall> |
duplicate(java.util.List<Wall> walls)
Returns a duplicate of the
walls list. |
java.lang.Float |
getArcExtent()
Returns the arc extent of a round wall or
null if this wall isn't round. |
java.lang.Float |
getHeight()
Returns the height of this wall.
|
java.lang.Float |
getHeightAtEnd()
Returns the height of this wall at its end point.
|
Baseboard |
getLeftSideBaseboard()
Returns the left side baseboard of this wall.
|
java.lang.Integer |
getLeftSideColor()
Returns left side color of this wall.
|
float |
getLeftSideShininess()
Returns the left side shininess of this wall.
|
HomeTexture |
getLeftSideTexture()
Returns the left side texture of this wall.
|
float |
getLength()
Returns the length of this wall.
|
Level |
getLevel()
Returns the level which this wall belongs to.
|
TextureImage |
getPattern()
Returns the pattern of this wall in the plan.
|
float[][] |
getPoints()
Returns the points of each corner of a wall not including its baseboards.
|
float[][] |
getPoints(boolean includeBaseboards)
Returns the points of each corner of a wall possibly including its baseboards.
|
Baseboard |
getRightSideBaseboard()
Returns the right side baseboard of this wall.
|
java.lang.Integer |
getRightSideColor()
Returns right side color of this wall.
|
float |
getRightSideShininess()
Returns the right side shininess of this wall.
|
HomeTexture |
getRightSideTexture()
Returns the right side texture of this wall.
|
float |
getStartPointToEndPointDistance()
Returns the distance from the start point of this wall to its end point.
|
float |
getThickness()
Returns the thickness of this wall.
|
java.lang.Integer |
getTopColor()
Returns the color of the top of this wall in the 3D view.
|
Wall |
getWallAtEnd()
Returns the wall joined to this wall at end point.
|
Wall |
getWallAtStart()
Returns the wall joined to this wall at start point.
|
float |
getXArcCircleCenter()
Returns the abscissa of the arc circle center of this wall.
|
float |
getXEnd()
Returns the end point abscissa of this wall.
|
float |
getXStart()
Returns the start point abscissa of this wall.
|
float |
getYArcCircleCenter()
Returns the ordinate of the arc circle center of this wall.
|
float |
getYEnd()
Returns the end point ordinate of this wall.
|
float |
getYStart()
Returns the start point ordinate of this wall.
|
boolean |
intersectsRectangle(float x0,
float y0,
float x1,
float y1)
Returns
true if this wall intersects
with the horizontal rectangle which opposite corners are at points
(x0 , y0 ) and (x1 , y1 ). |
boolean |
isAtLevel(Level level)
Returns
true if this wall is at the given level
or at a level with the same elevation and a smaller elevation index
or if the elevation of its highest point is higher than level elevation. |
boolean |
isMiddlePointAt(float x,
float y,
float margin)
Returns
true if the middle point of this wall is the point at (x , y )
with a given margin . |
boolean |
isTrapezoidal()
Returns
true if the height of this wall is different
at its start and end points. |
void |
move(float dx,
float dy)
Moves this wall of (
dx , dy ) units. |
void |
setArcExtent(java.lang.Float arcExtent)
Sets the arc extent of a round wall.
|
void |
setHeight(java.lang.Float height)
Sets the height of this wall.
|
void |
setHeightAtEnd(java.lang.Float heightAtEnd)
Sets the height of this wall at its end point.
|
void |
setLeftSideBaseboard(Baseboard leftSideBaseboard)
Sets the left side baseboard of this wall.
|
void |
setLeftSideColor(java.lang.Integer leftSideColor)
Sets left side color of this wall.
|
void |
setLeftSideShininess(float leftSideShininess)
Sets the left side shininess of this wall.
|
void |
setLeftSideTexture(HomeTexture leftSideTexture)
Sets the left side texture of this wall.
|
void |
setLevel(Level level)
Sets the level of this wall.
|
void |
setPattern(TextureImage pattern)
Sets the pattern of this wall in the plan, and notifies
listeners of this change.
|
void |
setRightSideBaseboard(Baseboard rightSideBaseboard)
Sets the right side baseboard of this wall.
|
void |
setRightSideColor(java.lang.Integer rightSideColor)
Sets right side color of this wall.
|
void |
setRightSideShininess(float rightSideShininess)
Sets the right side shininess of this wall.
|
void |
setRightSideTexture(HomeTexture rightSideTexture)
Sets the right side texture of this wall.
|
void |
setThickness(float thickness)
Sets wall thickness.
|
void |
setTopColor(java.lang.Integer topColor)
Sets the color of the top of this wall in the 3D view, and notifies
listeners of this change.
|
void |
setWallAtEnd(Wall wallAtEnd)
Sets the wall joined to this wall at end point.
|
void |
setWallAtStart(Wall wallAtStart)
Sets the wall joined to this wall at start point.
|
void |
setXEnd(float xEnd)
Sets the end point abscissa of this wall.
|
void |
setXStart(float xStart)
Sets the start point abscissa of this wall.
|
void |
setYEnd(float yEnd)
Sets the end point ordinate of this wall.
|
void |
setYStart(float yStart)
Sets the start point ordinate of this wall.
|
addPropertyChangeListener, addPropertyChangeListener, createId, duplicate, firePropertyChange, getContentProperty, getId, getProperty, getPropertyNames, isContentProperty, removePropertyChangeListener, removePropertyChangeListener, setProperty, setProperty
public Wall(float xStart, float yStart, float xEnd, float yEnd, float thickness)
xStart
,yStart
)
to (xEnd
, yEnd
),
with given thickness. Height, left and right colors are null
.public Wall(float xStart, float yStart, float xEnd, float yEnd, float thickness, float height)
xStart
,yStart
)
to (xEnd
, yEnd
),
with given thickness and height. Pattern, left and right colors are null
.public Wall(java.lang.String id, float xStart, float yStart, float xEnd, float yEnd, float thickness, float height)
xStart
,yStart
)
to (xEnd
, yEnd
),
with given thickness and height. Pattern, left and right colors are null
.public Wall(float xStart, float yStart, float xEnd, float yEnd, float thickness, float height, TextureImage pattern)
xStart
,yStart
)
to (xEnd
, yEnd
),
with given thickness, height and pattern.
Colors are null
.public Wall(java.lang.String id, float xStart, float yStart, float xEnd, float yEnd, float thickness, float height, TextureImage pattern)
xStart
,yStart
)
to (xEnd
, yEnd
),
with given thickness, height and pattern.
Colors are null
.public float getXStart()
public void setXStart(float xStart)
public float getYStart()
public void setYStart(float yStart)
public float getXEnd()
public void setXEnd(float xEnd)
public float getYEnd()
public void setYEnd(float yEnd)
public float getLength()
public float getStartPointToEndPointDistance()
public void setArcExtent(java.lang.Float arcExtent)
public java.lang.Float getArcExtent()
null
if this wall isn't round.public float getXArcCircleCenter()
public float getYArcCircleCenter()
public Wall getWallAtStart()
public void setWallAtStart(Wall wallAtStart)
wallAtStart
- a wall or null
to detach this wall
from any wall it was attached to before.public Wall getWallAtEnd()
public void setWallAtEnd(Wall wallAtEnd)
wallAtEnd
- a wall or null
to detach this wall
from any wall it was attached to before.public float getThickness()
public void setThickness(float thickness)
public java.lang.Float getHeight()
getHeightAtEnd
returns a value not null
, the returned height should be
considered as the height of this wall at its start point.public void setHeight(java.lang.Float height)
public java.lang.Float getHeightAtEnd()
public void setHeightAtEnd(java.lang.Float heightAtEnd)
public boolean isTrapezoidal()
true
if the height of this wall is different
at its start and end points.public java.lang.Integer getLeftSideColor()
public void setLeftSideColor(java.lang.Integer leftSideColor)
public java.lang.Integer getRightSideColor()
public void setRightSideColor(java.lang.Integer rightSideColor)
public HomeTexture getLeftSideTexture()
public void setLeftSideTexture(HomeTexture leftSideTexture)
public HomeTexture getRightSideTexture()
public void setRightSideTexture(HomeTexture rightSideTexture)
public float getLeftSideShininess()
public void setLeftSideShininess(float leftSideShininess)
public float getRightSideShininess()
public void setRightSideShininess(float rightSideShininess)
public Baseboard getLeftSideBaseboard()
public void setLeftSideBaseboard(Baseboard leftSideBaseboard)
public Baseboard getRightSideBaseboard()
public void setRightSideBaseboard(Baseboard rightSideBaseboard)
public TextureImage getPattern()
public void setPattern(TextureImage pattern)
public java.lang.Integer getTopColor()
public void setTopColor(java.lang.Integer topColor)
public Level getLevel()
getLevel
in interface Elevatable
public void setLevel(Level level)
public boolean isAtLevel(Level level)
true
if this wall is at the given level
or at a level with the same elevation and a smaller elevation index
or if the elevation of its highest point is higher than level
elevation.isAtLevel
in interface Elevatable
public float[][] getPoints()
getPoints
in interface Selectable
public float[][] getPoints(boolean includeBaseboards)
public boolean intersectsRectangle(float x0, float y0, float x1, float y1)
true
if this wall 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 wall contains the point at (x
, y
)
not including its baseboards, with a given margin
.containsPoint
in interface Selectable
public boolean containsPoint(float x, float y, boolean includeBaseboards, float margin)
true
if this wall contains the point at (x
, y
)
possibly including its baseboards, with a given margin
.public boolean isMiddlePointAt(float x, float y, float margin)
true
if the middle point of this wall is the point at (x
, y
)
with a given margin
.public boolean containsWallStartAt(float x, float y, float margin)
true
if this wall start line contains
the point at (x
, y
)
with a given margin
around the wall start line.public boolean containsWallEndAt(float x, float y, float margin)
true
if this wall end line contains
the point at (x
, y
)
with a given margin
around the wall end line.public void move(float dx, float dy)
dx
, dy
) units.move
in interface Selectable
public static java.util.List<Wall> duplicate(java.util.List<Wall> walls)
walls
list. All existing walls
are copied and their wall at start and end point are set with copied
walls only if they belong to the returned list.
The id of duplicated walls are regenerated.public static java.util.List<Wall> clone(java.util.List<Wall> walls)
walls
list. All existing walls
are copied and their wall at start and end point are set with copied
walls only if they belong to the returned list.public Wall clone()
clone
in interface Selectable
clone
in class HomeObject
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License