public class UserPreferencesController extends java.lang.Object implements Controller
Modifier and Type | Class and Description |
---|---|
static class |
UserPreferencesController.Property
The properties that may be edited by the view associated to this controller.
|
Constructor and Description |
---|
UserPreferencesController(UserPreferences preferences,
ViewFactory viewFactory,
ContentManager contentManager)
Creates the controller of user preferences view.
|
UserPreferencesController(UserPreferences preferences,
ViewFactory viewFactory,
ContentManager contentManager,
HomeController homeController)
Creates the controller of user preferences view.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(UserPreferencesController.Property property,
java.beans.PropertyChangeListener listener)
Adds the property change
listener in parameter to this controller. |
void |
checkUpdates()
Checks if some updates are available.
|
void |
displayView(View parentView)
Displays the view controlled by this controller.
|
int |
getAutoSaveDelayForRecovery()
Returns the edited auto recovery save delay.
|
java.lang.String |
getCurrency()
Returns the edited currency.
|
java.lang.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. |
int |
getFurnitureModelIconSize()
Returns the size used to generate icons of furniture viewed from top.
|
java.lang.String |
getLanguage()
Returns the edited language.
|
float |
getNewFloorThickness()
Returns the edited new floor thickness.
|
float |
getNewWallHeight()
Returns the edited new wall height.
|
TextureImage |
getNewWallPattern()
Returns the edited new wall top pattern in plan.
|
float |
getNewWallThickness()
Returns the edited new wall thickness.
|
LengthUnit |
getUnit()
Returns the edited unit.
|
DialogView |
getView()
Returns the view associated with this controller.
|
TextureImage |
getWallPattern()
Returns the default walls top pattern in plan.
|
void |
importLanguageLibrary()
Imports a language library chosen by the user.
|
boolean |
isAerialViewCenteredOnSelectionEnabled()
Returns whether aerial view should be centered on selection or not.
|
boolean |
isAutoSaveForRecoveryEnabled()
Returns
true if auto recovery save is enabled. |
boolean |
isCheckUpdatesEnabled()
Returns
true if updates should be checked. |
boolean |
isEditingIn3DViewEnabled()
Returns whether interactive editing in 3D view is enabled or not.
|
boolean |
isFurnitureCatalogViewedInTree()
Returns
true if furniture catalog should be viewed in a tree. |
boolean |
isFurnitureViewedFromTop()
Returns how furniture should be displayed in plan.
|
boolean |
isGridVisible()
Returns whether grid is visible or not.
|
boolean |
isMagnetismEnabled()
Returns whether magnetism is enabled or not.
|
boolean |
isNavigationPanelVisible()
Returns
true if the navigation panel should be displayed. |
boolean |
isObserverCameraSelectedAtChange()
Returns whether the observer camera should be selected at each change.
|
boolean |
isPropertyEditable(UserPreferencesController.Property property)
Returns
true if the given property is editable. |
boolean |
isRoomFloorColoredOrTextured()
Returns
true if floor texture is visible in plan. |
boolean |
isRulersVisible()
Returns whether rulers are visible or not.
|
boolean |
isValueAddedTaxEnabled()
Returns
true if Value Added Tax should be taken in account in prices. |
boolean |
mayImportLanguageLibrary()
Returns
true if language libraries can be imported. |
void |
modifyUserPreferences()
Controls the modification of user preferences.
|
void |
removePropertyChangeListener(UserPreferencesController.Property property,
java.beans.PropertyChangeListener listener)
Removes the property change
listener in parameter from this controller. |
void |
resetDisplayedActionTips()
Resets the displayed flags of action tips.
|
void |
setAerialViewCenteredOnSelectionEnabled(boolean aerialViewCenteredOnSelectionEnabled)
Sets whether aerial view should be centered on selection or not.
|
void |
setAutoSaveDelayForRecovery(int autoSaveDelayForRecovery)
Sets the edited auto recovery save delay.
|
void |
setAutoSaveForRecoveryEnabled(boolean autoSaveForRecoveryEnabled)
Sets whether auto recovery save is enabled or not.
|
void |
setCheckUpdatesEnabled(boolean updatesChecked)
Sets whether updates should be checked or not.
|
void |
setCurrency(java.lang.String currency)
Sets the edited currency.
|
void |
setDefaultFontName(java.lang.String defaultFontName)
Sets the name of the font that should be used by default.
|
void |
setEditingIn3DViewEnabled(boolean editingIn3DViewEnabled)
Sets whether interactive editing in 3D view is enabled or not.
|
void |
setFurnitureCatalogViewedInTree(boolean furnitureCatalogViewedInTree)
Sets whether the furniture catalog should be viewed in a tree or a different way.
|
void |
setFurnitureModelIconSize(int furnitureModelIconSize)
Sets the size used to generate icons of furniture viewed from top.
|
void |
setFurnitureViewedFromTop(boolean furnitureViewedFromTop)
Sets how furniture should be displayed in plan.
|
void |
setGridVisible(boolean gridVisible)
Sets whether grid is visible or not.
|
void |
setLanguage(java.lang.String language)
Sets the edited language.
|
void |
setMagnetismEnabled(boolean magnetismEnabled)
Sets whether magnetism is enabled or not.
|
void |
setNavigationPanelVisible(boolean navigationPanelVisible)
Sets whether the navigation panel should be displayed or not.
|
void |
setNewFloorThickness(float newFloorThickness)
Sets the edited new floor thickness.
|
void |
setNewWallHeight(float newWallHeight)
Sets the edited new wall height.
|
void |
setNewWallPattern(TextureImage newWallPattern)
Sets the edited new wall top pattern in plan, and notifies
listeners of this change.
|
void |
setNewWallThickness(float newWallThickness)
Sets the edited new wall thickness.
|
void |
setObserverCameraSelectedAtChange(boolean observerCameraSelectedAtChange)
Sets whether the observer camera should be selected at each change.
|
void |
setRoomFloorColoredOrTextured(boolean floorTextureVisible)
Sets whether floor texture is visible in plan or not.
|
void |
setRulersVisible(boolean rulersVisible)
Sets whether rulers are visible or not.
|
void |
setUnit(LengthUnit unit)
Sets the edited unit.
|
void |
setValueAddedTaxEnabled(boolean valueAddedTaxEnabled)
Sets whether Value Added Tax should be taken in account in prices.
|
void |
setWallPattern(TextureImage wallPattern)
Sets default walls top pattern in plan, and notifies
listeners of this change.
|
protected void |
updateProperties()
Updates preferences properties edited by this controller.
|
public UserPreferencesController(UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager)
public UserPreferencesController(UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager, HomeController homeController)
public DialogView getView()
getView
in interface Controller
public void displayView(View parentView)
public void addPropertyChangeListener(UserPreferencesController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter to this controller.public void removePropertyChangeListener(UserPreferencesController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter from this controller.protected void updateProperties()
public boolean isPropertyEditable(UserPreferencesController.Property property)
true
if the given property
is editable.
Depending on whether a property is editable or not, the view associated to this controller
may render it differently.
The implementation of this method always returns true
except for LANGUAGE
if it's not editable.public void setLanguage(java.lang.String language)
public java.lang.String getLanguage()
public void setUnit(LengthUnit unit)
public LengthUnit getUnit()
public void setCurrency(java.lang.String currency)
public java.lang.String getCurrency()
public void setValueAddedTaxEnabled(boolean valueAddedTaxEnabled)
public boolean isValueAddedTaxEnabled()
true
if Value Added Tax should be taken in account in prices.public void setFurnitureCatalogViewedInTree(boolean furnitureCatalogViewedInTree)
public boolean isFurnitureCatalogViewedInTree()
true
if furniture catalog should be viewed in a tree.public void setNavigationPanelVisible(boolean navigationPanelVisible)
public boolean isNavigationPanelVisible()
true
if the navigation panel should be displayed.public void setEditingIn3DViewEnabled(boolean editingIn3DViewEnabled)
public boolean isEditingIn3DViewEnabled()
public void setAerialViewCenteredOnSelectionEnabled(boolean aerialViewCenteredOnSelectionEnabled)
public boolean isAerialViewCenteredOnSelectionEnabled()
public void setObserverCameraSelectedAtChange(boolean observerCameraSelectedAtChange)
public boolean isObserverCameraSelectedAtChange()
public void setMagnetismEnabled(boolean magnetismEnabled)
public boolean isMagnetismEnabled()
public void setRulersVisible(boolean rulersVisible)
public boolean isRulersVisible()
public void setGridVisible(boolean gridVisible)
public boolean isGridVisible()
public void setDefaultFontName(java.lang.String defaultFontName)
public java.lang.String getDefaultFontName()
null
if the default font should be the default one in the application.public void setFurnitureViewedFromTop(boolean furnitureViewedFromTop)
public boolean isFurnitureViewedFromTop()
public void setFurnitureModelIconSize(int furnitureModelIconSize)
public int getFurnitureModelIconSize()
public void setRoomFloorColoredOrTextured(boolean floorTextureVisible)
public boolean isRoomFloorColoredOrTextured()
true
if floor texture is visible in plan.public void setWallPattern(TextureImage wallPattern)
public TextureImage getWallPattern()
public void setNewWallPattern(TextureImage newWallPattern)
public TextureImage getNewWallPattern()
public void setNewWallThickness(float newWallThickness)
public float getNewWallThickness()
public void setNewWallHeight(float newWallHeight)
public float getNewWallHeight()
public void setNewFloorThickness(float newFloorThickness)
public float getNewFloorThickness()
public void setCheckUpdatesEnabled(boolean updatesChecked)
public boolean isCheckUpdatesEnabled()
true
if updates should be checked.public void setAutoSaveDelayForRecovery(int autoSaveDelayForRecovery)
public int getAutoSaveDelayForRecovery()
public void setAutoSaveForRecoveryEnabled(boolean autoSaveForRecoveryEnabled)
public boolean isAutoSaveForRecoveryEnabled()
true
if auto recovery save is enabled.public void checkUpdates()
public boolean mayImportLanguageLibrary()
true
if language libraries can be imported.public void importLanguageLibrary()
public void resetDisplayedActionTips()
public void modifyUserPreferences()
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License