Sweet Home 3D 4.1

com.eteks.sweethome3d.viewcontroller
Class FurnitureCatalogController

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

public class FurnitureCatalogController
extends Object
implements Controller

A MVC controller for the furniture catalog.

Author:
Emmanuel Puybaret

Constructor Summary
FurnitureCatalogController(FurnitureCatalog catalog, UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager)
          Creates a controller of the furniture catalog view.
FurnitureCatalogController(FurnitureCatalog catalog, ViewFactory viewFactory)
          Creates a controller of the furniture catalog view.
 
Method Summary
 void addSelectionListener(SelectionListener listener)
          Adds the selection listener in parameter to this controller.
 void deleteSelection()
          Deletes selected catalog furniture.
 void dropFiles(List<String> importableModels)
          Adds dropped files to catalog.
 List<CatalogPieceOfFurniture> getSelectedFurniture()
          Returns an unmodifiable list of the selected furniture in catalog.
 View getView()
          Returns the view associated with this controller.
 void importFurniture()
          Displays the wizard that helps to import furniture to catalog.
 void modifySelectedFurniture()
          Displays the wizard that helps to change the selected piece of furniture.
 void removeSelectionListener(SelectionListener listener)
          Removes the selection listener in parameter from this controller.
 void setSelectedFurniture(List<CatalogPieceOfFurniture> selectedFurniture)
          Updates the selected furniture in catalog and notifies listeners selection change.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FurnitureCatalogController

public FurnitureCatalogController(FurnitureCatalog catalog,
                                  ViewFactory viewFactory)
Creates a controller of the furniture catalog view.

Parameters:
catalog - the furniture catalog of the application
viewFactory - a factory able to create the furniture view managed by this controller

FurnitureCatalogController

public FurnitureCatalogController(FurnitureCatalog catalog,
                                  UserPreferences preferences,
                                  ViewFactory viewFactory,
                                  ContentManager contentManager)
Creates a controller of the furniture catalog view.

Parameters:
catalog - the furniture catalog of the application
preferences - application user preferences
viewFactory - a factory able to create the furniture view managed by this controller
contentManager - content manager for furniture import
Method Detail

getView

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

Specified by:
getView in interface Controller

addSelectionListener

public void addSelectionListener(SelectionListener listener)
Adds the selection listener in parameter to this controller.


removeSelectionListener

public void removeSelectionListener(SelectionListener listener)
Removes the selection listener in parameter from this controller.


getSelectedFurniture

public List<CatalogPieceOfFurniture> getSelectedFurniture()
Returns an unmodifiable list of the selected furniture in catalog.


setSelectedFurniture

public void setSelectedFurniture(List<CatalogPieceOfFurniture> selectedFurniture)
Updates the selected furniture in catalog and notifies listeners selection change.


modifySelectedFurniture

public void modifySelectedFurniture()
Displays the wizard that helps to change the selected piece of furniture.


importFurniture

public void importFurniture()
Displays the wizard that helps to import furniture to catalog.


deleteSelection

public void deleteSelection()
Deletes selected catalog furniture.


dropFiles

public void dropFiles(List<String> importableModels)
Adds dropped files to catalog.


Sweet Home 3D 4.1

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