Sweet Home 3D 4.0

com.eteks.sweethome3d.viewcontroller
Class ImportedFurnitureWizardController

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

public class ImportedFurnitureWizardController
extends WizardController
implements Controller

Wizard controller to manage furniture importation.

Author:
Emmanuel Puybaret

Nested Class Summary
protected  class ImportedFurnitureWizardController.ImportedFurnitureWizardStepState
          Step state superclass.
static class ImportedFurnitureWizardController.Property
           
static class ImportedFurnitureWizardController.Step
           
 
Nested classes/interfaces inherited from class com.eteks.sweethome3d.viewcontroller.WizardController
WizardController.WizardControllerStepState
 
Constructor Summary
ImportedFurnitureWizardController(CatalogPieceOfFurniture piece, UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager)
          Creates a controller that edits piece values.
ImportedFurnitureWizardController(Home home, String modelName, UserPreferences preferences, FurnitureController furnitureController, ViewFactory viewFactory, ContentManager contentManager, UndoableEditSupport undoSupport)
          Creates a controller that edits a new imported home piece of furniture with a given modelName.
ImportedFurnitureWizardController(Home home, UserPreferences preferences, FurnitureController furnitureController, ViewFactory viewFactory, ContentManager contentManager, UndoableEditSupport undoSupport)
          Creates a controller that edits a new imported home piece of furniture.
ImportedFurnitureWizardController(String modelName, UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager)
          Creates a controller that edits a new catalog piece of furniture with a given modelName.
ImportedFurnitureWizardController(UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager)
          Creates a controller that edits a new catalog piece of furniture.
 
Method Summary
 void addPieceOfFurniture(HomePieceOfFurniture piece)
          Controls new piece added to home.
 void addPropertyChangeListener(ImportedFurnitureWizardController.Property property, PropertyChangeListener listener)
          Adds the property change listener in parameter to this home.
 void finish()
          Imports piece in catalog and/or home and posts an undoable operation.
 FurnitureCategory getCategory()
          Returns the category of the imported piece.
 Integer getColor()
          Returns the color of the imported piece.
 ContentManager getContentManager()
          Returns the content manager of this controller.
 float getDepth()
          Returns the depth of the imported piece.
 float getElevation()
          Returns the elevation of the imported piece.
protected  ImportedFurnitureWizardController.ImportedFurnitureWizardStepState getFurnitureAttributesStepState()
          Returns the furniture attributes step state.
protected  ImportedFurnitureWizardController.ImportedFurnitureWizardStepState getFurnitureIconStepState()
          Returns the furniture icon step state.
protected  ImportedFurnitureWizardController.ImportedFurnitureWizardStepState getFurnitureModelStepStatee()
          Returns the furniture choice step state.
protected  ImportedFurnitureWizardController.ImportedFurnitureWizardStepState getFurnitureOrientationStepState()
          Returns the furniture orientation step state.
 float getHeight()
          Returns the height.
 float getIconYaw()
          Returns the yaw of the piece icon.
 Content getModel()
          Returns the model content of the imported piece.
 float[][] getModelRotation()
          Returns the pitch angle of the imported piece model.
 String getName()
          Returns the name of the imported piece.
 String getStaircaseCutOutShape()
          Returns the shape used to cut out upper levels at its intersection with a staircase.
 ImportedFurnitureWizardController.Step getStep()
          Returns the current step in wizard view.
protected  ImportedFurnitureWizardController.ImportedFurnitureWizardStepState getStepState()
          Returns the current step state.
protected  ImportedFurnitureWizardStepsView getStepsView()
          Returns the unique wizard view used for all steps.
 float getWidth()
          Returns the width.
 boolean isBackFaceShown()
          Returns true if imported piece back face should be shown.
 boolean isDoorOrWindow()
          Returns true if imported piece is a door or a window.
 boolean isMovable()
          Returns true if imported piece is movable.
 boolean isPieceOfFurnitureNameValid()
          Returns true if piece name is valid.
 boolean isProportional()
          Returns true if piece proportions should be kept.
 void removePropertyChangeListener(ImportedFurnitureWizardController.Property property, PropertyChangeListener listener)
          Removes the property change listener in parameter from this home.
 void setBackFaceShown(boolean backFaceShown)
          Sets whether imported piece back face should be shown.
 void setCategory(FurnitureCategory category)
          Sets the category of the imported piece.
 void setColor(Integer color)
          Sets the color of the imported piece.
 void setDepth(float depth)
          Sets the depth of the imported piece.
 void setDoorOrWindow(boolean doorOrWindow)
          Sets whether imported piece is a door or a window.
 void setElevation(float elevation)
          Sets the elevation of the imported piece.
 void setHeight(float height)
          Sets the size of the imported piece.
 void setIconYaw(float iconYaw)
          Sets the yaw angle of the piece icon.
 void setModel(Content model)
          Sets the model content of the imported piece.
 void setModelRotation(float[][] modelRotation)
          Sets the orientation pitch angle of the imported piece model.
 void setMovable(boolean movable)
          Sets whether imported piece is movable.
 void setName(String name)
          Sets the name of the imported piece.
 void setProportional(boolean proportional)
          Sets whether piece proportions should be kept or not.
 void setStaircaseCutOutShape(String staircaseCutOutShape)
          Sets the shape used to cut out upper levels at its intersection with a staircase.
protected  void setStep(ImportedFurnitureWizardController.Step step)
          Switch in the wizard view to the given step.
 void setWidth(float width)
          Sets the width of the imported piece.
 
Methods inherited from class com.eteks.sweethome3d.viewcontroller.WizardController
addPropertyChangeListener, displayView, getStepIcon, getStepView, getTitle, getView, goBackToPreviousStep, goToNextStep, isBackStepEnabled, isLastStep, isNextStepEnabled, isResizable, removePropertyChangeListener, setResizable, setStepState, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.eteks.sweethome3d.viewcontroller.Controller
getView
 

Constructor Detail

ImportedFurnitureWizardController

public ImportedFurnitureWizardController(UserPreferences preferences,
                                         ViewFactory viewFactory,
                                         ContentManager contentManager)
Creates a controller that edits a new catalog piece of furniture.


ImportedFurnitureWizardController

public ImportedFurnitureWizardController(String modelName,
                                         UserPreferences preferences,
                                         ViewFactory viewFactory,
                                         ContentManager contentManager)
Creates a controller that edits a new catalog piece of furniture with a given modelName.


ImportedFurnitureWizardController

public ImportedFurnitureWizardController(CatalogPieceOfFurniture piece,
                                         UserPreferences preferences,
                                         ViewFactory viewFactory,
                                         ContentManager contentManager)
Creates a controller that edits piece values.


ImportedFurnitureWizardController

public ImportedFurnitureWizardController(Home home,
                                         UserPreferences preferences,
                                         FurnitureController furnitureController,
                                         ViewFactory viewFactory,
                                         ContentManager contentManager,
                                         UndoableEditSupport undoSupport)
Creates a controller that edits a new imported home piece of furniture.


ImportedFurnitureWizardController

public ImportedFurnitureWizardController(Home home,
                                         String modelName,
                                         UserPreferences preferences,
                                         FurnitureController furnitureController,
                                         ViewFactory viewFactory,
                                         ContentManager contentManager,
                                         UndoableEditSupport undoSupport)
Creates a controller that edits a new imported home piece of furniture with a given modelName.

Method Detail

finish

public void finish()
Imports piece in catalog and/or home and posts an undoable operation.

Specified by:
finish in class WizardController

addPieceOfFurniture

public void addPieceOfFurniture(HomePieceOfFurniture piece)
Controls new piece added to home. Once added the furniture will be selected in view and undo support will receive a new undoable edit.

Parameters:
piece - the piece of furniture to add.

getContentManager

public ContentManager getContentManager()
Returns the content manager of this controller.


getStepState

protected ImportedFurnitureWizardController.ImportedFurnitureWizardStepState getStepState()
Returns the current step state.

Overrides:
getStepState in class WizardController

getFurnitureModelStepStatee

protected ImportedFurnitureWizardController.ImportedFurnitureWizardStepState getFurnitureModelStepStatee()
Returns the furniture choice step state.


getFurnitureOrientationStepState

protected ImportedFurnitureWizardController.ImportedFurnitureWizardStepState getFurnitureOrientationStepState()
Returns the furniture orientation step state.


getFurnitureAttributesStepState

protected ImportedFurnitureWizardController.ImportedFurnitureWizardStepState getFurnitureAttributesStepState()
Returns the furniture attributes step state.


getFurnitureIconStepState

protected ImportedFurnitureWizardController.ImportedFurnitureWizardStepState getFurnitureIconStepState()
Returns the furniture icon step state.


getStepsView

protected ImportedFurnitureWizardStepsView getStepsView()
Returns the unique wizard view used for all steps.


setStep

protected void setStep(ImportedFurnitureWizardController.Step step)
Switch in the wizard view to the given step.


getStep

public ImportedFurnitureWizardController.Step getStep()
Returns the current step in wizard view.


addPropertyChangeListener

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


removePropertyChangeListener

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


getModel

public Content getModel()
Returns the model content of the imported piece.


setModel

public void setModel(Content model)
Sets the model content of the imported piece.


isBackFaceShown

public boolean isBackFaceShown()
Returns true if imported piece back face should be shown.


setBackFaceShown

public void setBackFaceShown(boolean backFaceShown)
Sets whether imported piece back face should be shown.


getModelRotation

public float[][] getModelRotation()
Returns the pitch angle of the imported piece model.


setModelRotation

public void setModelRotation(float[][] modelRotation)
Sets the orientation pitch angle of the imported piece model.


getName

public String getName()
Returns the name of the imported piece.


setName

public void setName(String name)
Sets the name of the imported piece.


getWidth

public float getWidth()
Returns the width.


setWidth

public void setWidth(float width)
Sets the width of the imported piece.


getDepth

public float getDepth()
Returns the depth of the imported piece.


setDepth

public void setDepth(float depth)
Sets the depth of the imported piece.


getHeight

public float getHeight()
Returns the height.


setHeight

public void setHeight(float height)
Sets the size of the imported piece.


getElevation

public float getElevation()
Returns the elevation of the imported piece.


setElevation

public void setElevation(float elevation)
Sets the elevation of the imported piece.


isMovable

public boolean isMovable()
Returns true if imported piece is movable.


setMovable

public void setMovable(boolean movable)
Sets whether imported piece is movable.


isDoorOrWindow

public boolean isDoorOrWindow()
Returns true if imported piece is a door or a window.


setDoorOrWindow

public void setDoorOrWindow(boolean doorOrWindow)
Sets whether imported piece is a door or a window.


getStaircaseCutOutShape

public String getStaircaseCutOutShape()
Returns the shape used to cut out upper levels at its intersection with a staircase.


setStaircaseCutOutShape

public void setStaircaseCutOutShape(String staircaseCutOutShape)
Sets the shape used to cut out upper levels at its intersection with a staircase.


getColor

public Integer getColor()
Returns the color of the imported piece.


setColor

public void setColor(Integer color)
Sets the color of the imported piece.


getCategory

public FurnitureCategory getCategory()
Returns the category of the imported piece.


setCategory

public void setCategory(FurnitureCategory category)
Sets the category of the imported piece.


getIconYaw

public float getIconYaw()
Returns the yaw of the piece icon.


setIconYaw

public void setIconYaw(float iconYaw)
Sets the yaw angle of the piece icon.


isProportional

public boolean isProportional()
Returns true if piece proportions should be kept.


setProportional

public void setProportional(boolean proportional)
Sets whether piece proportions should be kept or not.


isPieceOfFurnitureNameValid

public boolean isPieceOfFurnitureNameValid()
Returns true if piece name is valid.


Sweet Home 3D 4.0

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