Sweet Home 3D 4.0

com.eteks.sweethome3d.viewcontroller
Class WallController

java.lang.Object
  extended by com.eteks.sweethome3d.viewcontroller.WallController
All Implemented Interfaces:
Controller

public class WallController
extends Object
implements Controller

A MVC controller for wall view.

Author:
Emmanuel Puybaret

Nested Class Summary
static class WallController.Property
          The properties that may be edited by the view associated to this controller.
static class WallController.WallPaint
          The possible values for wall paint type.
static class WallController.WallShape
          The possible values for wall shape.
 
Constructor Summary
WallController(Home home, UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager, UndoableEditSupport undoSupport)
          Creates the controller of wall view with undo support.
 
Method Summary
 void addPropertyChangeListener(WallController.Property property, PropertyChangeListener listener)
          Adds the property change listener in parameter to this controller.
 void displayView(View parentView)
          Displays the view controlled by this controller.
 Float getArcExtentInDegrees()
          Returns the edited arc extent.
 Float getDistanceToEndPoint()
          Returns the edited distance to end point.
 Integer getLeftSideColor()
          Returns the edited color of the left side.
 WallController.WallPaint getLeftSidePaint()
          Returns whether the left side is colored, textured or unknown painted.
 Float getLeftSideShininess()
          Returns the edited left side shininess.
 TextureChoiceController getLeftSideTextureController()
          Returns the texture controller of the wall left side.
 Float getLength()
          Returns the edited length.
 TextureImage getPattern()
          Returns the pattern of edited wall in plan.
 Float getRectangularWallHeight()
          Returns the edited height of a rectangular wall.
 Integer getRightSideColor()
          Returns the edited color of the right side.
 WallController.WallPaint getRightSidePaint()
          Returns whether the right side is colored, textured or unknown painted.
 Float getRightSideShininess()
          Returns the edited right side shininess.
 TextureChoiceController getRightSideTextureController()
          Returns the texture controller of the wall right side.
 WallController.WallShape getShape()
          Returns whether the edited wall is a rectangular wall, a sloping wall or unknown.
 Float getSlopingWallHeightAtEnd()
          Returns the edited height at end of a sloping wall.
 Float getSlopingWallHeightAtStart()
          Returns the edited height at start of a sloping wall.
 Float getThickness()
          Returns the edited thickness.
 Integer getTopColor()
          Returns the edited top color in the 3D view.
 WallController.WallPaint getTopPaint()
          Returns whether the top of the wall in the 3D view uses default rendering, is colored, or unknown painted.
 DialogView getView()
          Returns the view associated with this controller.
 Float getXEnd()
          Returns the edited abscissa of the end point.
 Float getXStart()
          Returns the edited abscissa of the start point.
 Float getYEnd()
          Returns the edited ordinate of the end point.
 Float getYStart()
          Returns the edited ordinate of the start point.
 boolean isEditablePoints()
          Returns whether the point coordinates can be be edited or not.
 void modifyWalls()
          Controls the modification of selected walls in edited home.
 void removePropertyChangeListener(WallController.Property property, PropertyChangeListener listener)
          Removes the property change listener in parameter from this controller.
 void setArcExtentInDegrees(Float arcExtentInDegrees)
          Sets the edited arc extent.
 void setDistanceToEndPoint(Float distanceToEndPoint)
          Sets the edited distance to end point.
 void setEditablePoints(boolean editablePoints)
          Sets whether the point coordinates can be be edited or not.
 void setLeftSideColor(Integer leftSideColor)
          Sets the edited color of the left side.
 void setLeftSidePaint(WallController.WallPaint leftSidePaint)
          Sets whether the left side is colored, textured or unknown painted.
 void setLeftSideShininess(Float leftSideShininess)
          Sets the edited left side shininess.
 void setLength(Float length)
          Sets the edited length.
 void setPattern(TextureImage pattern)
          Sets the pattern of edited wall in plan, and notifies listeners of this change.
 void setRectangularWallHeight(Float rectangularWallHeight)
          Sets the edited height of a rectangular wall.
 void setRightSideColor(Integer rightSideColor)
          Sets the edited color of the right side.
 void setRightSidePaint(WallController.WallPaint rightSidePaint)
          Sets whether the right side is colored, textured or unknown painted.
 void setRightSideShininess(Float rightSideShininess)
          Sets the edited right side shininess.
 void setShape(WallController.WallShape shape)
          Sets whether the edited wall is a rectangular wall, a sloping wall or unknown.
 void setSlopingWallHeightAtEnd(Float sloppingWallHeightAtEnd)
          Sets the edited height at end of a sloping wall.
 void setSlopingWallHeightAtStart(Float slopingWallHeightAtStart)
          Sets the edited height at start of a sloping wall.
 void setThickness(Float thickness)
          Sets the edited thickness.
 void setTopColor(Integer topColor)
          Sets the edited top color in the 3D view.
 void setTopPaint(WallController.WallPaint topPaint)
          Sets whether the top of the wall in the 3D view uses default rendering, is colored, or unknown painted.
 void setXEnd(Float xEnd)
          Sets the edited abscissa of the end point.
 void setXStart(Float xStart)
          Sets the edited abscissa of the start point.
 void setYEnd(Float yEnd)
          Sets the edited ordinate of the end point.
 void setYStart(Float yStart)
          Sets the edited ordinate of the start point.
protected  void updateProperties()
          Updates edited properties from selected walls in the home edited by this controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WallController

public WallController(Home home,
                      UserPreferences preferences,
                      ViewFactory viewFactory,
                      ContentManager contentManager,
                      UndoableEditSupport undoSupport)
Creates the controller of wall view with undo support.

Method Detail

getLeftSideTextureController

public TextureChoiceController getLeftSideTextureController()
Returns the texture controller of the wall left side.


getRightSideTextureController

public TextureChoiceController getRightSideTextureController()
Returns the texture controller of the wall right side.


getView

public DialogView getView()
Returns the view associated with this controller.

Specified by:
getView in interface Controller

displayView

public void displayView(View parentView)
Displays the view controlled by this controller.


addPropertyChangeListener

public void addPropertyChangeListener(WallController.Property property,
                                      PropertyChangeListener listener)
Adds the property change listener in parameter to this controller.


removePropertyChangeListener

public void removePropertyChangeListener(WallController.Property property,
                                         PropertyChangeListener listener)
Removes the property change listener in parameter from this controller.


updateProperties

protected void updateProperties()
Updates edited properties from selected walls in the home edited by this controller.


setXStart

public void setXStart(Float xStart)
Sets the edited abscissa of the start point.


getXStart

public Float getXStart()
Returns the edited abscissa of the start point.


setYStart

public void setYStart(Float yStart)
Sets the edited ordinate of the start point.


getYStart

public Float getYStart()
Returns the edited ordinate of the start point.


setXEnd

public void setXEnd(Float xEnd)
Sets the edited abscissa of the end point.


getXEnd

public Float getXEnd()
Returns the edited abscissa of the end point.


setYEnd

public void setYEnd(Float yEnd)
Sets the edited ordinate of the end point.


getYEnd

public Float getYEnd()
Returns the edited ordinate of the end point.


setLength

public void setLength(Float length)
Sets the edited length.


getLength

public Float getLength()
Returns the edited length.


setDistanceToEndPoint

public void setDistanceToEndPoint(Float distanceToEndPoint)
Sets the edited distance to end point.


getDistanceToEndPoint

public Float getDistanceToEndPoint()
Returns the edited distance to end point.


setEditablePoints

public void setEditablePoints(boolean editablePoints)
Sets whether the point coordinates can be be edited or not.


isEditablePoints

public boolean isEditablePoints()
Returns whether the point coordinates can be be edited or not.


setLeftSideColor

public void setLeftSideColor(Integer leftSideColor)
Sets the edited color of the left side.


getLeftSideColor

public Integer getLeftSideColor()
Returns the edited color of the left side.


setLeftSidePaint

public void setLeftSidePaint(WallController.WallPaint leftSidePaint)
Sets whether the left side is colored, textured or unknown painted.


getLeftSidePaint

public WallController.WallPaint getLeftSidePaint()
Returns whether the left side is colored, textured or unknown painted.


setLeftSideShininess

public void setLeftSideShininess(Float leftSideShininess)
Sets the edited left side shininess.


getLeftSideShininess

public Float getLeftSideShininess()
Returns the edited left side shininess.


setRightSideColor

public void setRightSideColor(Integer rightSideColor)
Sets the edited color of the right side.


getRightSideColor

public Integer getRightSideColor()
Returns the edited color of the right side.


setRightSidePaint

public void setRightSidePaint(WallController.WallPaint rightSidePaint)
Sets whether the right side is colored, textured or unknown painted.


getRightSidePaint

public WallController.WallPaint getRightSidePaint()
Returns whether the right side is colored, textured or unknown painted.

Returns:
WallController.WallPaint.COLORED, WallController.WallPaint.TEXTURED or null

setRightSideShininess

public void setRightSideShininess(Float rightSideShininess)
Sets the edited right side shininess.


getRightSideShininess

public Float getRightSideShininess()
Returns the edited right side shininess.


setPattern

public void setPattern(TextureImage pattern)
Sets the pattern of edited wall in plan, and notifies listeners of this change.


getPattern

public TextureImage getPattern()
Returns the pattern of edited wall in plan.


setTopColor

public void setTopColor(Integer topColor)
Sets the edited top color in the 3D view.


getTopColor

public Integer getTopColor()
Returns the edited top color in the 3D view.


setTopPaint

public void setTopPaint(WallController.WallPaint topPaint)
Sets whether the top of the wall in the 3D view uses default rendering, is colored, or unknown painted.


getTopPaint

public WallController.WallPaint getTopPaint()
Returns whether the top of the wall in the 3D view uses default rendering, is colored, or unknown painted.

Returns:
WallController.WallPaint.DEFAULT, WallController.WallPaint.COLORED or null

setShape

public void setShape(WallController.WallShape shape)
Sets whether the edited wall is a rectangular wall, a sloping wall or unknown.


getShape

public WallController.WallShape getShape()
Returns whether the edited wall is a rectangular wall, a sloping wall or unknown.


setRectangularWallHeight

public void setRectangularWallHeight(Float rectangularWallHeight)
Sets the edited height of a rectangular wall.


getRectangularWallHeight

public Float getRectangularWallHeight()
Returns the edited height of a rectangular wall.


setSlopingWallHeightAtStart

public void setSlopingWallHeightAtStart(Float slopingWallHeightAtStart)
Sets the edited height at start of a sloping wall.


getSlopingWallHeightAtStart

public Float getSlopingWallHeightAtStart()
Returns the edited height at start of a sloping wall.


setSlopingWallHeightAtEnd

public void setSlopingWallHeightAtEnd(Float sloppingWallHeightAtEnd)
Sets the edited height at end of a sloping wall.


getSlopingWallHeightAtEnd

public Float getSlopingWallHeightAtEnd()
Returns the edited height at end of a sloping wall.


setThickness

public void setThickness(Float thickness)
Sets the edited thickness.


getThickness

public Float getThickness()
Returns the edited thickness.


setArcExtentInDegrees

public void setArcExtentInDegrees(Float arcExtentInDegrees)
Sets the edited arc extent.


getArcExtentInDegrees

public Float getArcExtentInDegrees()
Returns the edited arc extent.


modifyWalls

public void modifyWalls()
Controls the modification of selected walls in edited home.


Sweet Home 3D 4.0

© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License