|
Sweet Home 3D 3.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.eteks.sweethome3d.model.UserPreferences
public abstract class UserPreferences
User preferences.
Nested Class Summary | |
---|---|
static class |
UserPreferences.Property
The properties of user preferences that may change. |
Constructor Summary | |
---|---|
UserPreferences()
Creates user preferences. Caution: during creation, the default locale will be updated if it doesn't belong to the supported ones. |
Method Summary | |
---|---|
void |
addAutoCompletionString(java.lang.String property,
java.lang.String autoCompletionString)
Adds the given string to the list of the strings used in auto completion of a property
and notifies listeners of this change. |
abstract void |
addFurnitureLibrary(java.lang.String furnitureLibraryName)
Adds furnitureLibraryName to furniture catalog
to make the furniture library it contains available. |
abstract void |
addLanguageLibrary(java.lang.String languageLibraryName)
Adds languageLibraryName to the first language libraries folder
to make the language library it contains available to supported languages. |
void |
addPropertyChangeListener(UserPreferences.Property property,
java.beans.PropertyChangeListener listener)
Adds the listener in parameter to these preferences. |
abstract void |
addTexturesLibrary(java.lang.String texturesLibraryName)
Adds texturesLibraryName to textures catalog
to make the textures library it contains available. |
abstract boolean |
furnitureLibraryExists(java.lang.String furnitureLibraryName)
Returns true if the given furniture library exists. |
java.util.List<java.lang.String> |
getAutoCompletedProperties()
Returns the list of properties with auto completion strings. |
java.util.List<java.lang.String> |
getAutoCompletionStrings(java.lang.String property)
Returns the strings that may be used for the auto completion of the given property . |
int |
getAutoSaveDelayForRecovery()
Returns the delay between two automatic save operations of homes for recovery purpose. |
java.lang.String |
getCurrency()
Returns the default currency in use, noted with ISO 4217 code, or null
if prices aren't used in application. |
java.lang.String[] |
getDefaultSupportedLanguages()
Returns the array of default available languages in Sweet Home 3D. |
TextStyle |
getDefaultTextStyle(java.lang.Class<? extends Selectable> selectableClass)
Returns the default text style of a class of selectable item. |
FurnitureCatalog |
getFurnitureCatalog()
Returns the furniture catalog. |
java.lang.String |
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. |
java.lang.String |
getLocalizedString(java.lang.Class<?> resourceClass,
java.lang.String resourceKey,
java.lang.Object... resourceParameters)
Returns the string matching resourceKey in current language in the
context of resourceClass . |
java.lang.String |
getLocalizedString(java.lang.String resourceFamily,
java.lang.String resourceKey,
java.lang.Object... resourceParameters)
Returns the string matching resourceKey in current language
for the given resource family. |
float |
getNewFloorThickness()
Returns default thickness of the floor of new levels in home. |
float |
getNewWallHeight()
Returns default wall height of new home walls. |
float |
getNewWallThickness()
Returns default thickness of new walls in home. |
PatternsCatalog |
getPatternsCatalog()
Returns the patterns catalog available to fill plan areas. |
java.util.List<java.lang.String> |
getRecentHomes()
Returns an unmodifiable list of the recent homes. |
int |
getRecentHomesMaxCount()
Returns the maximum count of homes that should be proposed to the user. |
java.util.List<java.lang.ClassLoader> |
getResourceClassLoaders()
Returns the class loaders through which localized strings returned by getLocalizedString might be loaded. |
java.lang.String[] |
getSupportedLanguages()
Returns the array of available languages in Sweet Home 3D including languages in libraries. |
TexturesCatalog |
getTexturesCatalog()
Returns the textures catalog. |
TextureImage |
getWallPattern()
Returns the wall pattern in plan used by default. |
boolean |
isActionTipIgnored(java.lang.String actionKey)
Returns whether an action tip should be ignored or not. |
boolean |
isFurnitureCatalogViewedInTree()
Returns true if the furniture catalog should be viewed in a tree. |
boolean |
isFurnitureViewedFromTop()
Returns true if furniture should be viewed from its top in plan. |
boolean |
isGridVisible()
Returns true if plan grid visible. |
boolean |
isLanguageEditable()
Returns true if the language in preferences can be set. |
boolean |
isMagnetismEnabled()
Returns true if magnetism is enabled. |
boolean |
isNavigationPanelVisible()
Returns true if the navigation panel should be displayed. |
boolean |
isRoomFloorColoredOrTextured()
Returns true if room floors should be rendered with color or texture
in plan. |
boolean |
isRulersVisible()
Returns true if rulers are visible. |
abstract boolean |
languageLibraryExists(java.lang.String languageLibraryName)
Returns true if the given language library exists. |
void |
removePropertyChangeListener(UserPreferences.Property property,
java.beans.PropertyChangeListener listener)
Removes the listener in parameter from these preferences. |
void |
resetIgnoredActionTips()
Resets the ignore flag of action tips. |
void |
setActionTipIgnored(java.lang.String actionKey)
Sets which action tip should be ignored. |
void |
setAutoCompletionStrings(java.lang.String property,
java.util.List<java.lang.String> autoCompletionStrings)
Sets the auto completion strings list of the given property and notifies listeners of this change. |
void |
setAutoSaveDelayForRecovery(int autoSaveDelayForRecovery)
Sets the delay between two automatic save operations of homes for recovery purpose. |
protected void |
setCurrency(java.lang.String currency)
Sets the default currency in use. |
void |
setFloorColoredOrTextured(boolean roomFloorColoredOrTextured)
Sets whether room floors should be rendered with color or texture, and notifies listeners of this change. |
protected void |
setFurnitureCatalog(FurnitureCatalog catalog)
Sets furniture catalog. |
void |
setFurnitureCatalogViewedInTree(boolean furnitureCatalogViewedInTree)
Sets whether the furniture catalog should be viewed in a tree or a different way. |
void |
setFurnitureViewedFromTop(boolean furnitureViewedFromTop)
Sets how furniture icon should be displayed in plan, and notifies listeners of this change. |
void |
setGridVisible(boolean gridVisible)
Sets whether plan grid is visible or not, and notifies listeners of this change. |
void |
setLanguage(java.lang.String language)
If language can be changed, sets the preferred language to display information, changes current default locale accordingly and notifies listeners of this change. |
void |
setMagnetismEnabled(boolean magnetismEnabled)
Sets whether magnetism is enabled or not, and notifies listeners of this change. |
void |
setNavigationPanelVisible(boolean navigationPanelVisible)
Sets whether the navigation panel should be displayed or not. |
void |
setNewFloorThickness(float newFloorThickness)
Sets default thickness of the floor of new levels in home, and notifies listeners of this change. |
void |
setNewWallHeight(float newWallHeight)
Sets default wall height of new walls, and notifies listeners of this change. |
void |
setNewWallThickness(float newWallThickness)
Sets default thickness of new walls in home, and notifies listeners of this change. |
protected void |
setPatternsCatalog(PatternsCatalog catalog)
Sets the patterns available to fill plan areas. |
void |
setRecentHomes(java.util.List<java.lang.String> recentHomes)
Sets the recent homes list and notifies listeners of this change. |
void |
setRulersVisible(boolean rulersVisible)
Sets whether rulers are visible or not, and notifies listeners of this change. |
protected void |
setSupportedLanguages(java.lang.String[] supportedLanguages)
Returns the array of available languages in Sweet Home 3D. |
protected void |
setTexturesCatalog(TexturesCatalog catalog)
Sets textures catalog. |
void |
setUnit(LengthUnit unit)
Changes the unit currently in use, and notifies listeners of this change. |
void |
setWallPattern(TextureImage wallPattern)
Sets how walls should be displayed in plan by default, and notifies listeners of this change. |
abstract boolean |
texturesLibraryExists(java.lang.String texturesLibraryName)
Returns true if the given textures library exists. |
abstract void |
write()
Writes user preferences. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserPreferences()
Method Detail |
---|
public abstract void write() throws RecorderException
RecorderException
- if user preferences couldn'y be saved.public void addPropertyChangeListener(UserPreferences.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter to these preferences.
public void removePropertyChangeListener(UserPreferences.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter from these preferences.
public FurnitureCatalog getFurnitureCatalog()
protected void setFurnitureCatalog(FurnitureCatalog catalog)
public TexturesCatalog getTexturesCatalog()
protected void setTexturesCatalog(TexturesCatalog catalog)
public PatternsCatalog getPatternsCatalog()
protected void setPatternsCatalog(PatternsCatalog catalog)
public LengthUnit getLengthUnit()
public void setUnit(LengthUnit unit)
unit
- one of the values of Unit.public java.lang.String getLanguage()
public void setLanguage(java.lang.String language)
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).public boolean isLanguageEditable()
true
if the language in preferences can be set.
true
except if user.language
System property isn't writable.public java.lang.String[] getDefaultSupportedLanguages()
public java.lang.String[] getSupportedLanguages()
protected void setSupportedLanguages(java.lang.String[] supportedLanguages)
public java.lang.String getLocalizedString(java.lang.Class<?> resourceClass, java.lang.String resourceKey, java.lang.Object... resourceParameters)
resourceKey
in current language in the
context of resourceClass
.
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 directory matching the package of resourceClass
.
java.lang.IllegalArgumentException
- if no string for the given key can be foundpublic java.lang.String getLocalizedString(java.lang.String resourceFamily, java.lang.String resourceKey, java.lang.Object... resourceParameters)
resourceKey
in current language
for the given resource family.
resourceFamily
should match the absolute path of a .properties resource family,
shouldn't start by a slash and may contain dots '.' or slash '/' as directory separators.
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 the key in a properties file named as
resourceFamily
.
java.lang.IllegalArgumentException
- if no string for the given key can be foundpublic java.util.List<java.lang.ClassLoader> getResourceClassLoaders()
getLocalizedString
might be loaded.
public java.lang.String getCurrency()
null
if prices aren't used in application.
protected void setCurrency(java.lang.String currency)
public boolean isFurnitureCatalogViewedInTree()
true
if the furniture catalog should be viewed in a tree.
public void setFurnitureCatalogViewedInTree(boolean furnitureCatalogViewedInTree)
public boolean isNavigationPanelVisible()
true
if the navigation panel should be displayed.
public void setNavigationPanelVisible(boolean navigationPanelVisible)
public boolean isMagnetismEnabled()
true
if magnetism is enabled.
true
by default.public void setMagnetismEnabled(boolean magnetismEnabled)
magnetismEnabled
- true
if magnetism is enabled,
false
otherwise.public boolean isRulersVisible()
true
if rulers are visible.
true
by default.public void setRulersVisible(boolean rulersVisible)
rulersVisible
- true
if rulers are visible,
false
otherwise.public boolean isGridVisible()
true
if plan grid visible.
true
by default.public void setGridVisible(boolean gridVisible)
gridVisible
- true
if grid is visible,
false
otherwise.public boolean isFurnitureViewedFromTop()
true
if furniture should be viewed from its top in plan.
public void setFurnitureViewedFromTop(boolean furnitureViewedFromTop)
furnitureViewedFromTop
- if true
the furniture
should be viewed from its top.public boolean isRoomFloorColoredOrTextured()
true
if room floors should be rendered with color or texture
in plan.
false
by default.public void setFloorColoredOrTextured(boolean roomFloorColoredOrTextured)
roomFloorColoredOrTextured
- true
if floor color
or texture is used, false
otherwise.public TextureImage getWallPattern()
public void setWallPattern(TextureImage wallPattern)
public float getNewWallThickness()
public void setNewWallThickness(float newWallThickness)
public float getNewWallHeight()
public void setNewWallHeight(float newWallHeight)
public float getNewFloorThickness()
public void setNewFloorThickness(float newFloorThickness)
public int getAutoSaveDelayForRecovery()
public void setAutoSaveDelayForRecovery(int autoSaveDelayForRecovery)
public java.util.List<java.lang.String> getRecentHomes()
public void setRecentHomes(java.util.List<java.lang.String> recentHomes)
public int getRecentHomesMaxCount()
public void setActionTipIgnored(java.lang.String actionKey)
public boolean isActionTipIgnored(java.lang.String actionKey)
setActionTipDisplayed
.
By default it returns true
.
public void resetIgnoredActionTips()
public TextStyle getDefaultTextStyle(java.lang.Class<? extends Selectable> selectableClass)
public java.util.List<java.lang.String> getAutoCompletionStrings(java.lang.String property)
property
.
public void addAutoCompletionString(java.lang.String property, java.lang.String autoCompletionString)
property
and notifies listeners of this change.
public void setAutoCompletionStrings(java.lang.String property, java.util.List<java.lang.String> autoCompletionStrings)
property
and notifies listeners of this change.
public java.util.List<java.lang.String> getAutoCompletedProperties()
public abstract void addLanguageLibrary(java.lang.String languageLibraryName) throws RecorderException
languageLibraryName
to the first language libraries folder
to make the language library it contains available to supported languages.
languageLibraryName
- the name of the resource in which the library will be written.
RecorderException
public abstract boolean languageLibraryExists(java.lang.String languageLibraryName) throws RecorderException
true
if the given language library exists.
languageLibraryName
- the name of the resource to check
RecorderException
public abstract void addFurnitureLibrary(java.lang.String furnitureLibraryName) throws RecorderException
furnitureLibraryName
to furniture catalog
to make the furniture library it contains available.
furnitureLibraryName
- the name of the resource in which the library will be written.
RecorderException
public abstract boolean furnitureLibraryExists(java.lang.String furnitureLibraryName) throws RecorderException
true
if the given furniture library exists.
furnitureLibraryName
- the name of the resource to check
RecorderException
public abstract void addTexturesLibrary(java.lang.String texturesLibraryName) throws RecorderException
texturesLibraryName
to textures catalog
to make the textures library it contains available.
texturesLibraryName
- the name of the resource in which the library will be written.
RecorderException
public abstract boolean texturesLibraryExists(java.lang.String texturesLibraryName) throws RecorderException
true
if the given textures library exists.
texturesLibraryName
- the name of the resource to check
RecorderException
|
Sweet Home 3D 3.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License |