public class Wall extends java.lang.Object implements java.io.Serializable, 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. |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds the property change
listener in parameter to this wall. |
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,
float margin)
Returns
true if this wall contains
the point at (x , y )
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. |
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.
|
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.
|
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 visible at the given level. |
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 |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the property change
listener in parameter from this wall. |
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 |
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 |
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.
|
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(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 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
in parameter to this wall.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
in parameter from this wall.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 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 visible at the given level.isAtLevel
in interface Elevatable
public float[][] getPoints()
getPoints
in interface Selectable
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
)
with a given margin
.containsPoint
in interface Selectable
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 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 void move(float dx, float dy)
dx
, dy
) units.move
in interface Selectable
public Wall clone()
clone
in interface Selectable
clone
in class java.lang.Object
© Copyrights 2006-2014 eTeks - All rights reserved
Distributed under GNU General Public License