Class Index | File Index

Classes


Class UserPreferences


Defined in: UserPreferences.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
User preferences.
Method Summary
Method Attributes Method Name and Description
 
Adds the property change listener in parameter to these preferences.
 
Returns the name of the font that should be used by default or null if the default font should be the default one in the application.
 
Returns the array of default available languages in Sweet Home 3D.
 
Returns the size used to generate icons of furniture viewed from top.
 
Returns the preferred language to display information, noted with an ISO 639 code that may be followed by an underscore and an ISO 3166 code.
 
Returns the length unit currently in use.
 
getLocalizedString(resourceClass, resourceKey, resourceParameters)
Returns the string matching resourceKey in current language in the context of resourceClass or for a resource family if resourceClass is a string.
 
getLocalizedStringKeys(resourceFamily)
Returns the keys of the localized property strings of the given resource family.
 
Returns default thickness of the floor of new levels in home.
 
Returns the default color of new rooms in home.
 
Returns default baseboard height of new home walls.
 
Returns default baseboard thickness of new walls in home.
 
Returns default wall height of new home walls.
 
Returns the pattern used for new walls in plan or null if it's not set.
 
Returns default thickness of new walls in home.
 
Returns the patterns catalog available to fill plan areas.
 
getResourceBundles(resourceClass)
Returns the resource bundle for the given resource family.
 
Returns the array of available languages in Sweet Home 3D including languages in libraries.
 
Returns whether aerial view should be centered on selection or not.
 
Returns true if furniture should be viewed from its top in plan.
 
Returns true if plan grid visible.
 
Returns true if magnetism is enabled.
 
Returns true if the navigation panel should be displayed.
 
Returns whether the observer camera should be selected at each change.
 
Returns true if room floors should be rendered with color or texture in plan.
 
Removes the property change listener in parameter from these preferences.
 
setAerialViewCenteredOnSelectionEnabled(aerialViewCenteredOnSelectionEnabled)
Sets whether aerial view should be centered on selection or not.
 
setDefaultFontName(defaultFontName)
Sets the name of the font that should be used by default.
 
setFloorColoredOrTextured(roomFloorColoredOrTextured)
Sets whether room floors should be rendered with color or texture, and notifies listeners of this change.
 
setFurnitureModelIconSize(furnitureModelIconSize)
Sets the name of the font that should be used by default.
 
setFurnitureViewedFromTop(furnitureViewedFromTop)
Sets how furniture icon should be displayed in plan, and notifies listeners of this change.
 
setGridVisible(gridVisible)
Sets whether plan grid is visible or not, and notifies listeners of this change.
 
setLanguage(language)
If language can be changed, sets the preferred language to display information, changes current default locale accordingly and notifies listeners of this change.
 
setMagnetismEnabled(magnetismEnabled)
Sets whether magnetism is enabled or not, and notifies listeners of this change.
 
setNavigationPanelVisible(navigationPanelVisible)
Sets whether the navigation panel should be displayed or not.
 
setNewFloorThickness(newFloorThickness)
Sets default thickness of the floor of new levels in home, and notifies listeners of this change.
 
setNewRoomFloorColor(newRoomFloorColor)
Sets the default color of new rooms in home, and notifies listeners of this change.
 
setNewWallBaseboardHeight(newWallBaseboardHeight)
Sets default baseboard height of new walls, and notifies listeners of this change.
 
setNewWallBaseboardThickness(newWallBaseboardThickness)
Sets default baseboard thickness of new walls in home, and notifies listeners of this change.
 
setNewWallHeight(newWallHeight)
Sets default wall height of new walls, and notifies listeners of this change.
 
setNewWallPattern(newWallPattern)
Sets how new walls should be displayed in plan, and notifies listeners of this change.
 
setNewWallThickness(newWallThickness)
Sets default thickness of new walls in home, and notifies listeners of this change.
 
setObserverCameraSelectedAtChange(observerCameraSelectedAtChange)
Sets whether the observer camera should be selected at each change.
 
setSupportedLanguages(supportedLanguages)
Returns the array of available languages in Sweet Home 3D.
 
setUnit(unit)
Changes the unit currently in use, and notifies listeners of this change.
 
Writes user preferences.
Class Detail
UserPreferences()
User preferences.
Author: Emmanuel Puybaret.
Method Detail
addPropertyChangeListener(listener)
Adds the property change listener in parameter to these preferences.
Parameters:
listener
Since:
6.4

getDefaultFontName()
Returns the name of the font that should be used by default or null if the default font should be the default one in the application.

getDefaultSupportedLanguages()
Returns the array of default available languages in Sweet Home 3D.
Returns:
an array of languages_countries ISO representations

getFurnitureModelIconSize()
Returns the size used to generate icons of furniture viewed from top.
Since:
5.5

getLanguage()
Returns the preferred language to display information, noted with an ISO 639 code that may be followed by an underscore and an ISO 3166 code.

getLengthUnit()
Returns the length unit currently in use.

getLocalizedString(resourceClass, resourceKey, resourceParameters)
Returns the string matching resourceKey in current language in the context of resourceClass or for a resource family if resourceClass is a string. If resourceParameters isn't empty the string is considered as a format string, and the returned string will be formatted with these parameters. This implementation searches first the key in a properties file named as resourceClass, then if this file doesn't exist, it searches the key prefixed by resourceClass name and a dot in a package.properties file in the folder matching the package of resourceClass.
Parameters:
resourceClass
resourceKey
resourceParameters
Throws:
IllegalArgumentException if no string for the given key can be found

getLocalizedStringKeys(resourceFamily)
Returns the keys of the localized property strings of the given resource family.
Parameters:
resourceFamily
Throws:
IllegalArgumentException if the given resourceFamily is not supported

getNewFloorThickness()
Returns default thickness of the floor of new levels in home.

getNewRoomFloorColor()
Returns the default color of new rooms in home.
Since:
6.4

getNewWallBaseboardHeight()
Returns default baseboard height of new home walls.

getNewWallBaseboardThickness()
Returns default baseboard thickness of new walls in home.

getNewWallHeight()
Returns default wall height of new home walls.

getNewWallPattern()
Returns the pattern used for new walls in plan or null if it's not set.

getNewWallThickness()
Returns default thickness of new walls in home.

getPatternsCatalog()
Returns the patterns catalog available to fill plan areas.

getResourceBundles(resourceClass)
Returns the resource bundle for the given resource family.
Parameters:
resourceClass

getSupportedLanguages()
Returns the array of available languages in Sweet Home 3D including languages in libraries.

isAerialViewCenteredOnSelectionEnabled()
Returns whether aerial view should be centered on selection or not.

isFurnitureViewedFromTop()
Returns true if furniture should be viewed from its top in plan.

isGridVisible()
Returns true if plan grid visible.
Returns:
true by default.

isMagnetismEnabled()
Returns true if magnetism is enabled.
Returns:
true by default.

isNavigationPanelVisible()
Returns true if the navigation panel should be displayed.

isObserverCameraSelectedAtChange()
Returns whether the observer camera should be selected at each change.
Since:
5.5

isRoomFloorColoredOrTextured()
Returns true if room floors should be rendered with color or texture in plan.
Returns:
false by default.

removePropertyChangeListener(listener)
Removes the property change listener in parameter from these preferences.
Parameters:
listener
Since:
6.4

setAerialViewCenteredOnSelectionEnabled(aerialViewCenteredOnSelectionEnabled)
Sets whether aerial view should be centered on selection or not.
Parameters:
aerialViewCenteredOnSelectionEnabled

setDefaultFontName(defaultFontName)
Sets the name of the font that should be used by default.
Parameters:
defaultFontName

setFloorColoredOrTextured(roomFloorColoredOrTextured)
Sets whether room floors should be rendered with color or texture, and notifies listeners of this change.
Parameters:
roomFloorColoredOrTextured
true if floor color or texture is used, false otherwise.

setFurnitureModelIconSize(furnitureModelIconSize)
Sets the name of the font that should be used by default.
Parameters:
furnitureModelIconSize
Since:
5.5

setFurnitureViewedFromTop(furnitureViewedFromTop)
Sets how furniture icon should be displayed in plan, and notifies listeners of this change.
Parameters:
furnitureViewedFromTop
if true the furniture should be viewed from its top.

setGridVisible(gridVisible)
Sets whether plan grid is visible or not, and notifies listeners of this change.
Parameters:
gridVisible
true if grid is visible, false otherwise.

setLanguage(language)
If language can be changed, sets the preferred language to display information, changes current default locale accordingly and notifies listeners of this change.
Parameters:
language
an ISO 639 code that may be followed by an underscore and an ISO 3166 code (for example fr, de, it, en_US, zh_CN).

setMagnetismEnabled(magnetismEnabled)
Sets whether magnetism is enabled or not, and notifies listeners of this change.
Parameters:
magnetismEnabled
true if magnetism is enabled, false otherwise.

setNavigationPanelVisible(navigationPanelVisible)
Sets whether the navigation panel should be displayed or not.
Parameters:
navigationPanelVisible

setNewFloorThickness(newFloorThickness)
Sets default thickness of the floor of new levels in home, and notifies listeners of this change.
Parameters:
newFloorThickness

setNewRoomFloorColor(newRoomFloorColor)
Sets the default color of new rooms in home, and notifies listeners of this change.
Parameters:
newRoomFloorColor
Since:
6.4

setNewWallBaseboardHeight(newWallBaseboardHeight)
Sets default baseboard height of new walls, and notifies listeners of this change.
Parameters:
newWallBaseboardHeight

setNewWallBaseboardThickness(newWallBaseboardThickness)
Sets default baseboard thickness of new walls in home, and notifies listeners of this change.
Parameters:
newWallBaseboardThickness

setNewWallHeight(newWallHeight)
Sets default wall height of new walls, and notifies listeners of this change.
Parameters:
newWallHeight

setNewWallPattern(newWallPattern)
Sets how new walls should be displayed in plan, and notifies listeners of this change.
Parameters:
newWallPattern

setNewWallThickness(newWallThickness)
Sets default thickness of new walls in home, and notifies listeners of this change.
Parameters:
newWallThickness

setObserverCameraSelectedAtChange(observerCameraSelectedAtChange)
Sets whether the observer camera should be selected at each change.
Parameters:
observerCameraSelectedAtChange
Since:
5.5

setSupportedLanguages(supportedLanguages)
Returns the array of available languages in Sweet Home 3D.
Parameters:
supportedLanguages

setUnit(unit)
Changes the unit currently in use, and notifies listeners of this change.
Parameters:
unit
one of the values of Unit.

write()
Writes user preferences.

© 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:53 GMT+0100 (CET)