|
Sweet Home 3D 4.1 | |||||||||
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. |
Field Summary | |
---|---|
static String |
FURNITURE_LIBRARY_TYPE
|
static String |
LANGUAGE_LIBRARY_TYPE
|
static String |
TEXTURES_LIBRARY_TYPE
|
Constructor Summary | |
---|---|
UserPreferences()
Creates user preferences. |
Method Summary | |
---|---|
void |
addAutoCompletionString(String property,
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(String furnitureLibraryLocation)
Adds furnitureLibraryName to furniture catalog
to make the furniture it contains available. |
abstract void |
addLanguageLibrary(String languageLibraryLocation)
Adds the language library to make the languages it contains available to supported languages. |
void |
addPropertyChangeListener(UserPreferences.Property property,
PropertyChangeListener listener)
Adds the listener in parameter to these preferences. |
abstract void |
addTexturesLibrary(String texturesLibraryLocation)
Adds the textures library at the given location to textures catalog to make the textures it contains available. |
abstract boolean |
furnitureLibraryExists(String furnitureLibraryLocation)
Returns true if the furniture library at the given location exists. |
List<String> |
getAutoCompletedProperties()
Returns the list of properties with auto completion strings. |
List<String> |
getAutoCompletionStrings(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. |
String |
getCurrency()
Returns the default currency in use, noted with ISO 4217 code, or null
if prices aren't used in application. |
String[] |
getDefaultSupportedLanguages()
Returns the array of default available languages in Sweet Home 3D. |
TextStyle |
getDefaultTextStyle(Class<? extends Selectable> selectableClass)
Returns the default text style of a class of selectable item. |
FurnitureCatalog |
getFurnitureCatalog()
Returns the furniture catalog. |
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. |
abstract List<Library> |
getLibraries()
Returns the libraries available in user preferences. |
String |
getLocalizedString(Class<?> resourceClass,
String resourceKey,
Object... resourceParameters)
Returns the string matching resourceKey in current language in the
context of resourceClass . |
String |
getLocalizedString(String resourceFamily,
String resourceKey,
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. |
TextureImage |
getNewWallPattern()
Returns the pattern used for new walls in plan or null if it's not set. |
float |
getNewWallThickness()
Returns default thickness of new walls in home. |
PatternsCatalog |
getPatternsCatalog()
Returns the patterns catalog available to fill plan areas. |
List<Integer> |
getRecentColors()
Returns an unmodifiable list of the recent colors. |
List<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. |
List<ClassLoader> |
getResourceClassLoaders()
Returns the class loaders through which localized strings returned by getLocalizedString might be loaded. |
String[] |
getSupportedLanguages()
Returns the array of available languages in Sweet Home 3D including languages in libraries. |
TexturesCatalog |
getTexturesCatalog()
Returns the textures catalog. |
Long |
getUpdatesMinimumDate()
Returns the minimum date of updates that may interest user. |
TextureImage |
getWallPattern()
Returns the wall pattern in plan used by default. |
boolean |
isActionTipIgnored(String actionKey)
Returns whether an action tip should be ignored or not. |
boolean |
isAerialViewCenteredOnSelectionEnabled()
Returns whether aerial view should be centered on selection or not. |
boolean |
isCheckUpdatesEnabled()
Returns true if updates should be checked. |
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(String languageLibraryLocation)
Returns true if the language library at the given location exists. |
void |
removePropertyChangeListener(UserPreferences.Property property,
PropertyChangeListener listener)
Removes the listener in parameter from these preferences. |
void |
resetIgnoredActionTips()
Resets the ignore flag of action tips. |
void |
setActionTipIgnored(String actionKey)
Sets which action tip should be ignored. |
void |
setAerialViewCenteredOnSelectionEnabled(boolean aerialViewCenteredOnSelectionEnabled)
Sets whether aerial view should be centered on selection or not. |
void |
setAutoCompletionStrings(String property,
List<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. |
void |
setCheckUpdatesEnabled(boolean updatesChecked)
Sets whether updates should be checked or not. |
protected void |
setCurrency(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(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 |
setNewWallPattern(TextureImage newWallPattern)
Sets how new walls should be displayed in plan, 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 |
setRecentColors(List<Integer> recentColors)
Sets the recent colors list and notifies listeners of this change. |
void |
setRecentHomes(List<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(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 |
setUpdatesMinimumDate(Long updatesMinimumDate)
Sets the minimum date of updates that may interest user, 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(String texturesLibraryLocation)
Returns true if the textures library at the given location 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 |
Field Detail |
---|
public static final String FURNITURE_LIBRARY_TYPE
public static final String TEXTURES_LIBRARY_TYPE
public static final String LANGUAGE_LIBRARY_TYPE
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, PropertyChangeListener listener)
listener
in parameter to these preferences.
public void removePropertyChangeListener(UserPreferences.Property property, 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 String getLanguage()
public void setLanguage(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 String[] getDefaultSupportedLanguages()
public String[] getSupportedLanguages()
protected void setSupportedLanguages(String[] supportedLanguages)
public String getLocalizedString(Class<?> resourceClass, String resourceKey, 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 folder matching the package of resourceClass
.
IllegalArgumentException
- if no string for the given key can be foundpublic String getLocalizedString(String resourceFamily, String resourceKey, 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 folder 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
.
IllegalArgumentException
- if no string for the given key can be foundpublic List<ClassLoader> getResourceClassLoaders()
getLocalizedString
might be loaded.
public String getCurrency()
null
if prices aren't used in application.
protected void setCurrency(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 void setAerialViewCenteredOnSelectionEnabled(boolean aerialViewCenteredOnSelectionEnabled)
public boolean isAerialViewCenteredOnSelectionEnabled()
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 TextureImage getNewWallPattern()
null
if it's not set.
public void setNewWallPattern(TextureImage newWallPattern)
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 boolean isCheckUpdatesEnabled()
true
if updates should be checked.
public void setCheckUpdatesEnabled(boolean updatesChecked)
public Long getUpdatesMinimumDate()
null
if not defined.public void setUpdatesMinimumDate(Long updatesMinimumDate)
public int getAutoSaveDelayForRecovery()
public void setAutoSaveDelayForRecovery(int autoSaveDelayForRecovery)
public List<String> getRecentHomes()
public void setRecentHomes(List<String> recentHomes)
public int getRecentHomesMaxCount()
public void setActionTipIgnored(String actionKey)
public boolean isActionTipIgnored(String actionKey)
setActionTipDisplayed
.
By default it returns true
.
public void resetIgnoredActionTips()
public TextStyle getDefaultTextStyle(Class<? extends Selectable> selectableClass)
public List<String> getAutoCompletionStrings(String property)
property
.
public void addAutoCompletionString(String property, String autoCompletionString)
property
and notifies listeners of this change.
public void setAutoCompletionStrings(String property, List<String> autoCompletionStrings)
property
and notifies listeners of this change.
public List<String> getAutoCompletedProperties()
public List<Integer> getRecentColors()
public void setRecentColors(List<Integer> recentColors)
public abstract void addLanguageLibrary(String languageLibraryLocation) throws RecorderException
languageLibraryLocation
- the location where the library can be found.
RecorderException
public abstract boolean languageLibraryExists(String languageLibraryLocation) throws RecorderException
true
if the language library at the given location exists.
languageLibraryLocation
- the name of the resource to check
RecorderException
public abstract void addFurnitureLibrary(String furnitureLibraryLocation) throws RecorderException
furnitureLibraryName
to furniture catalog
to make the furniture it contains available.
furnitureLibraryLocation
- the location where the library can be found.
RecorderException
public abstract boolean furnitureLibraryExists(String furnitureLibraryLocation) throws RecorderException
true
if the furniture library at the given location exists.
furnitureLibraryLocation
- the name of the resource to check
RecorderException
public abstract void addTexturesLibrary(String texturesLibraryLocation) throws RecorderException
texturesLibraryLocation
- the location where the library can be found.
RecorderException
public abstract boolean texturesLibraryExists(String texturesLibraryLocation) throws RecorderException
true
if the textures library at the given location exists.
texturesLibraryLocation
- the name of the resource to check
RecorderException
public abstract List<Library> getLibraries()
|
Sweet Home 3D 4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License |