Class UserPreferences
Defined in: UserPreferences.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
User preferences.
|
| Field Attributes | Field Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
|
addPropertyChangeListener(listener)
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 observer camera should be centered on selection or not.
|
|
|
Returns whether interactive editing in 3D view is enabled 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. |
|
|
removePropertyChangeListener(listener)
Removes the property change
listener in parameter from these preferences. |
|
|
setAerialViewCenteredOnSelectionEnabled(aerialViewCenteredOnSelectionEnabled)
Sets whether aerial view should be centered on selection or not.
|
|
|
setCheckUpdatesEnabled(updatesChecked)
Sets whether updates should be checked or not.
|
|
|
setDefaultFontName(defaultFontName)
Sets the name of the font that should be used by default.
|
|
|
setEditingIn3DViewEnabled(editingIn3DViewEnabled)
Sets whether interactive editing in 3D view is enabled or not.
|
|
|
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.
|
|
|
write()
Writes user preferences.
|
Field Detail
furnitureCatalog
newWallPattern
patternsCatalog
texturesCatalog
unit
wallPattern
Method Detail
addPropertyChangeListener(listener)
Adds the property change
listener in parameter to these preferences.
- Parameters:
- listener
- Since:
- 6.4
{string}
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.
- Returns:
- {string}
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.
{LengthUnit}
getLengthUnit()
Returns the length unit currently in use.
- Returns:
- {LengthUnit}
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.
{TextureImage}
getNewWallPattern()
Returns the pattern used for new walls in plan or
null if it's not set.
- Returns:
- {TextureImage}
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.
{boolean}
isAerialViewCenteredOnSelectionEnabled()
Returns whether observer camera should be centered on selection or not.
- Returns:
- {boolean}
{boolean}
isEditingIn3DViewEnabled()
Returns whether interactive editing in 3D view is enabled or not.
- Since:
- 7.2
- Returns:
- {boolean}
{boolean}
isFurnitureViewedFromTop()
Returns
true if furniture should be viewed from its top in plan.
- Returns:
- {boolean}
{boolean}
isGridVisible()
Returns
true if plan grid visible.
- Returns:
- {boolean}
trueby default.
{boolean}
isMagnetismEnabled()
Returns
true if magnetism is enabled.
- Returns:
- {boolean}
trueby default.
{boolean}
isNavigationPanelVisible()
Returns
true if the navigation panel should be displayed.
- Returns:
- {boolean}
{boolean}
isObserverCameraSelectedAtChange()
Returns whether the observer camera should be selected at each change.
- Since:
- 5.5
- Returns:
- {boolean}
isRoomFloorColoredOrTextured()
Returns
true if room floors should be rendered with color or texture in plan.
- Returns:
falseby 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:
- {boolean} aerialViewCenteredOnSelectionEnabled
setCheckUpdatesEnabled(updatesChecked)
Sets whether updates should be checked or not.
- Parameters:
- {boolean} updatesChecked
- Since:
- 4.0
setDefaultFontName(defaultFontName)
Sets the name of the font that should be used by default.
- Parameters:
- {string} defaultFontName
setEditingIn3DViewEnabled(editingIn3DViewEnabled)
Sets whether interactive editing in 3D view is enabled or not.
- Parameters:
- {boolean} editingIn3DViewEnabled
- Since:
- 7.2
setFloorColoredOrTextured(roomFloorColoredOrTextured)
Sets whether room floors should be rendered with color or texture,
and notifies listeners of this change.
- Parameters:
- roomFloorColoredOrTextured
trueif floor color or texture is used,falseotherwise.
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:
- {boolean} furnitureViewedFromTop
- if
truethe furniture should be viewed from its top.
setGridVisible(gridVisible)
Sets whether plan grid is visible or not, and notifies
listeners of this change.
- Parameters:
- {boolean} gridVisible
trueif grid is visible,falseotherwise.
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:
- {boolean} magnetismEnabled
trueif magnetism is enabled,falseotherwise.
setNavigationPanelVisible(navigationPanelVisible)
Sets whether the navigation panel should be displayed or not.
- Parameters:
- {boolean} 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:
- {boolean} 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.
