Class Index | File Index

Classes


Class HomeController


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
HomeController(home, application, viewFactory, contentManager)
Creates the controller of home view.
Method Summary
Method Attributes Method Name and Description
 
Displays about dialog.
 
Adds the selected furniture in catalog to the selected group and selects it.
 
Adds the selected furniture in catalog to home and selects it.
 
attachView(view)
Attaches the given view to home view.
 
createTransferData(observer, dataTypes)
Returns the transfer data matching the requested types.
 
cut(items)
Deletes items and post a cut operation to undo support.
 
Deletes home background image and posts and posts an undoable operation.
 
Prompts stored cameras in home to be deleted and deletes the ones selected by the user.
 
Deletes the list of recent homes in user preferences.
 
detachView(view)
Detaches the given view from home view.
 
Disables magnetism in preferences.
 
drop(items, destinationView, dx, dy)
Adds items to home, moves them of (dx, dy) and posts a drop operation to undo support.
 
dropFiles(importableModels, dx, dy)
Adds imported models to home, moves them of (dx, dy) and post a drop operation to undo support.
 
Edits preferences and changes them if user agrees.
 
Enables or disables action bound to selection.
 
Enables magnetism in preferences.
 
Enables clipboard paste action if clipboard isn't empty.
 
Enables select all action if home isn't empty.
 
exit()
Controls application exit.
 
focusedViewChanged(focusedView)
Updates actions when focused view changed.
 
Returns the content manager of this controller.
 
Returns the furniture catalog controller managed by this controller.
 
Returns the furniture controller managed by this controller.
 
Returns the controller of home 3D view.
 
Returns the controller of home plan.
 
Returns a list of displayable recent homes.
 
Returns the undoable edit support managed by this controller.
 
Returns the version of the application for display purpose.
 
Returns the view associated with this controller.
 
Hides the home background image.
 
Displays the wizard that helps to import home background image.
 
Imports furniture to the catalog or home depending on the focused view.
 
importFurnitureLibrary(furnitureLibraryName)
Imports a given furniture library.
 
importLanguageLibrary(languageLibraryName)
Imports a given language library.
 
Imports a texture to the texture catalog.
 
importTexturesLibrary(texturesLibraryName)
Imports a given textures library.
 
Displays the wizard that helps to change home background image.
 
Modifies the selected furniture of the focused view.
 
Creates a new home and adds it to application home list.
 
paste(items)
Adds items to home and posts a paste operation to undo support.
 
Paste the style of the item in clipboard on selected items compatible with it.
 
Paste the furniture in clipboard to the selected group in home.
 
redo()
Redoes last undone operation.
 
Selects everything in the focused component.
 
setHomeProperty(propertyName, propertyValue)
Controls the change of value of a property in home.
 
setMode(mode)
Displays a tip message dialog depending on the given mode and sets the active mode of the plan controller.
 
Shows the home background image.
 
Prompts a name for the current camera and stores it in home.
 
undo()
Undoes last operation.
 
Zooms in in plan.
 
Zooms out in plan.
Class Detail
HomeController(home, application, viewFactory, contentManager)
Creates the controller of home view.
Author: Emmanuel Puybaret.
Parameters:
{Home} home
the home edited by this controller and its view.
{HomeApplication} application
the instance of current application.
{Object} viewFactory
a factory able to create views.
{Object} contentManager
the content manager of the application.
Method Detail
about()
Displays about dialog.

addFurnitureToGroup()
Adds the selected furniture in catalog to the selected group and selects it.

addHomeFurniture()
Adds the selected furniture in catalog to home and selects it.

attachView(view)
Attaches the given view to home view.
Parameters:
{Object} view

createTransferData(observer, dataTypes)
Returns the transfer data matching the requested types.
Parameters:
{Object} observer
{Array} dataTypes

cut(items)
Deletes items and post a cut operation to undo support.
Parameters:
{Bound[]} items

deleteBackgroundImage()
Deletes home background image and posts and posts an undoable operation.

deleteCameras()
Prompts stored cameras in home to be deleted and deletes the ones selected by the user.

deleteRecentHomes()
Deletes the list of recent homes in user preferences.

detachView(view)
Detaches the given view from home view.
Parameters:
{Object} view

disableMagnetism()
Disables magnetism in preferences.

drop(items, destinationView, dx, dy)
Adds items to home, moves them of (dx, dy) and posts a drop operation to undo support.
Parameters:
{Bound[]} items
{Object} destinationView
{number} dx
{number} dy

dropFiles(importableModels, dx, dy)
Adds imported models to home, moves them of (dx, dy) and post a drop operation to undo support.
Parameters:
{string[]} importableModels
{number} dx
{number} dy

editPreferences()
Edits preferences and changes them if user agrees.

enableActionsBoundToSelection()
Enables or disables action bound to selection. This method will be called when selection in plan or in catalog changes and when focused component or modification state in plan changes.

enableMagnetism()
Enables magnetism in preferences.

enablePasteAction()
Enables clipboard paste action if clipboard isn't empty.

enableSelectAllAction()
Enables select all action if home isn't empty.

exit()
Controls application exit. If any home in application homes list is modified, the user will be {@link HomeView#confirmExit() prompted} in view whether he wants to discard his modifications or not.

focusedViewChanged(focusedView)
Updates actions when focused view changed.
Parameters:
{Object} focusedView

{Object} getContentManager()
Returns the content manager of this controller.
Returns:
{Object}

{FurnitureCatalogController} getFurnitureCatalogController()
Returns the furniture catalog controller managed by this controller.
Returns:
{FurnitureCatalogController}

{FurnitureController} getFurnitureController()
Returns the furniture controller managed by this controller.
Returns:
{FurnitureController}

{HomeController3D} getHomeController3D()
Returns the controller of home 3D view.
Returns:
{HomeController3D}

{PlanController} getPlanController()
Returns the controller of home plan.
Returns:
{PlanController}

{string[]} getRecentHomes()
Returns a list of displayable recent homes.
Returns:
{string[]}

{javax.swing.undo.UndoableEditSupport} getUndoableEditSupport()
Returns the undoable edit support managed by this controller.
Returns:
{javax.swing.undo.UndoableEditSupport}

{string} getVersion()
Returns the version of the application for display purpose.
Returns:
{string}

{Object} getView()
Returns the view associated with this controller.
Returns:
{Object}

hideBackgroundImage()
Hides the home background image.

importBackgroundImage()
Displays the wizard that helps to import home background image.

importFurniture()
Imports furniture to the catalog or home depending on the focused view.

importFurnitureLibrary(furnitureLibraryName)
Imports a given furniture library.
Parameters:
{string} furnitureLibraryName

importLanguageLibrary(languageLibraryName)
Imports a given language library.
Parameters:
{string} languageLibraryName

importTexture()
Imports a texture to the texture catalog.

importTexturesLibrary(texturesLibraryName)
Imports a given textures library.
Parameters:
{string} texturesLibraryName

modifyBackgroundImage()
Displays the wizard that helps to change home background image.

modifySelectedFurniture()
Modifies the selected furniture of the focused view.

newHome()
Creates a new home and adds it to application home list.

paste(items)
Adds items to home and posts a paste operation to undo support.
Parameters:
{Bound[]} items

pasteStyle()
Paste the style of the item in clipboard on selected items compatible with it.

pasteToGroup()
Paste the furniture in clipboard to the selected group in home.

redo()
Redoes last undone operation.

selectAll()
Selects everything in the focused component.

setHomeProperty(propertyName, propertyValue)
Controls the change of value of a property in home.
Parameters:
{string} propertyName
{string} propertyValue

setMode(mode)
Displays a tip message dialog depending on the given mode and sets the active mode of the plan controller.
Parameters:
{PlanController.Mode} mode

showBackgroundImage()
Shows the home background image.

storeCamera()
Prompts a name for the current camera and stores it in home.

undo()
Undoes last operation.

zoomIn()
Zooms in in plan.

zoomOut()
Zooms out in plan.

© Copyright 2021 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Tue Mar 02 2021 19:55:52 GMT+0100 (CET)