Sweet Home 3D 4.0

com.eteks.sweethome3d.viewcontroller
Class ModelMaterialsController

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

public class ModelMaterialsController
extends Object
implements Controller

A MVC controller for model materials choice.

Since:
4.0
Author:
Emmanuel Puybaret

Nested Class Summary
static class ModelMaterialsController.Property
           
 
Constructor Summary
ModelMaterialsController(String title, UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager)
           
 
Method Summary
 void addPropertyChangeListener(ModelMaterialsController.Property property, PropertyChangeListener listener)
          Adds the property change listener in parameter to this controller.
 String getDialogTitle()
          Returns the text that should be displayed as materials choice dialog title.
 HomeMaterial[] getMaterials()
          Returns the materials displayed by view.
 Content getModel()
          Returns the 3D model which materials are displayed by the view.
 float getModelDepth()
          Returns the depth of the 3D model used to preview materials change.
 float getModelHeight()
          Returns the height of the 3D model used to preview materials change.
 float[][] getModelRotation()
          Returns the rotation of the 3D model used to preview materials change.
 float getModelWidth()
          Returns the width of the 3D model used to preview materials change.
 TextureChoiceController getTextureController()
          Returns the texture controller of the model materials.
 View getView()
          Returns the view associated with this controller.
 boolean isBackFaceShown()
          Returns true if the 3D model used to preview materials change should show back face.
 void removePropertyChangeListener(ModelMaterialsController.Property property, PropertyChangeListener listener)
          Removes the property change listener in parameter from this controller.
 void setMaterials(HomeMaterial[] materials)
          Sets the materials displayed by view and fires a PropertyChangeEvent.
 void setModel(Content model)
          Sets the 3D model which materials are displayed by the view and fires a PropertyChangeEvent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelMaterialsController

public ModelMaterialsController(String title,
                                UserPreferences preferences,
                                ViewFactory viewFactory,
                                ContentManager contentManager)
Method Detail

getView

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

Specified by:
getView in interface Controller

addPropertyChangeListener

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


removePropertyChangeListener

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


setModel

public void setModel(Content model)
Sets the 3D model which materials are displayed by the view and fires a PropertyChangeEvent.


getModel

public Content getModel()
Returns the 3D model which materials are displayed by the view.


getModelRotation

public float[][] getModelRotation()
Returns the rotation of the 3D model used to preview materials change.


getModelWidth

public float getModelWidth()
Returns the width of the 3D model used to preview materials change.


getModelDepth

public float getModelDepth()
Returns the depth of the 3D model used to preview materials change.


getModelHeight

public float getModelHeight()
Returns the height of the 3D model used to preview materials change.


isBackFaceShown

public boolean isBackFaceShown()
Returns true if the 3D model used to preview materials change should show back face.


setMaterials

public void setMaterials(HomeMaterial[] materials)
Sets the materials displayed by view and fires a PropertyChangeEvent.


getMaterials

public HomeMaterial[] getMaterials()
Returns the materials displayed by view.


getDialogTitle

public String getDialogTitle()
Returns the text that should be displayed as materials choice dialog title.


getTextureController

public TextureChoiceController getTextureController()
Returns the texture controller of the model materials.


Sweet Home 3D 4.0

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