public class HomeFurnitureController extends java.lang.Object implements Controller
Modifier and Type | Class and Description |
---|---|
static class |
HomeFurnitureController.FurnitureHorizontalAxis
The possible values for horizontal axis.
|
static class |
HomeFurnitureController.FurniturePaint
The possible values for paint type.
|
static class |
HomeFurnitureController.FurnitureShininess
The possible values for shininess type.
|
static class |
HomeFurnitureController.Property
The properties that may be edited by the view associated to this controller.
|
Constructor and Description |
---|
HomeFurnitureController(Home home,
UserPreferences preferences,
ViewFactory viewFactory,
ContentManager contentManager,
javax.swing.undo.UndoableEditSupport undoSupport)
Creates the controller of home furniture view with undo support.
|
HomeFurnitureController(Home home,
UserPreferences preferences,
ViewFactory viewFactory,
javax.swing.undo.UndoableEditSupport undoSupport)
Creates the controller of home furniture view with undo support.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(HomeFurnitureController.Property property,
java.beans.PropertyChangeListener listener)
Adds the property change
listener in parameter to this controller. |
void |
displayView(View parentView)
Displays the view controlled by this controller.
|
java.util.Map<ObjectProperty,java.lang.Object> |
getAdditionalProperties()
Returns additional edited properties.
|
java.lang.Float |
getAngle()
Returns the edited angle in radians.
|
java.lang.Integer |
getAngleInDegrees()
Returns the edited angle in degrees.
|
java.lang.Boolean |
getBasePlanItem()
Returns whether furniture is a base plan item or not.
|
java.lang.Integer |
getColor()
Returns the edited color.
|
ContentManager |
getContentManager()
Returns the content manager associated to this controller.
|
java.lang.Float |
getDepth()
Returns the edited depth.
|
java.lang.String |
getDescription()
Returns the edited description.
|
java.lang.Float |
getElevation()
Returns the edited elevation.
|
java.lang.Float |
getHeight()
Returns the edited height.
|
HomeFurnitureController.FurnitureHorizontalAxis |
getHorizontalAxis()
Returns the edited horizontal axis.
|
Content |
getIcon()
Returns the edited icon.
|
java.lang.Float |
getLightPower()
Returns the edited light power.
|
ModelMaterialsController |
getModelMaterialsController()
Returns the model materials controller of the piece.
|
java.lang.Boolean |
getModelMirrored()
Returns whether furniture model is mirrored or not.
|
Transformation[] |
getModelPresetTransformations(int index)
Returns the preset model transformations at the given
index . |
java.util.List<java.lang.String> |
getModelPresetTransformationsNames()
Returns the names of the available preset model transformations.
|
Transformation[] |
getModelTransformations()
Returns model transformations.
|
java.lang.String |
getName()
Returns the edited name.
|
java.lang.Boolean |
getNameVisible()
Returns whether furniture name should be drawn or not.
|
HomeFurnitureController.FurniturePaint |
getPaint()
Returns whether the piece is colored, textured, uses customized materials or unknown painted.
|
java.lang.Float |
getPitch()
Returns the edited pitch in radians.
|
java.math.BigDecimal |
getPrice()
Returns the edited price.
|
java.lang.Float |
getRoll()
Returns the edited roll angle in radians.
|
HomeFurnitureController.FurnitureShininess |
getShininess()
Returns whether the piece is shininess is the default one, matt, shiny or unknown.
|
TextureChoiceController |
getTextureController()
Returns the texture controller of the piece.
|
java.math.BigDecimal |
getValueAddedTaxPercentage()
Returns edited Value Added Tax percentage.
|
DialogView |
getView()
Returns the view associated with this controller.
|
java.lang.Boolean |
getVisible()
Returns whether furniture is visible or not.
|
java.lang.Float |
getWidth()
Returns the edited width.
|
java.lang.Float |
getX()
Returns the edited abscissa.
|
java.lang.Float |
getY()
Returns the edited ordinate.
|
boolean |
isBasePlanItemEditable()
Deprecated.
the method is wrongly named and should be replaced by
isBasePlanItemEnabled . |
boolean |
isBasePlanItemEnabled()
Returns
true if base plan item is an enabled property. |
boolean |
isDeformable()
Returns whether furniture model can be deformed or not.
|
boolean |
isLightPowerEditable()
Returns
true if light power is an editable property. |
boolean |
isPriceEditable()
Returns whether the price can be edited or not.
|
boolean |
isPropertyEditable(HomeFurnitureController.Property property)
Returns
true if the given property is editable. |
boolean |
isProportional()
Returns whether furniture proportions should be kept or not.
|
boolean |
isResizable()
Returns whether furniture model can be resized or not.
|
boolean |
isRollAndPitchEditable()
Returns whether roll and pitch angles can be edited.
|
boolean |
isTexturable()
Returns whether the color or the texture of the furniture model can be changed or not.
|
boolean |
isValueAddedTaxPercentageEditable()
Returns whether the Value Added Tax percentage can be edited or not.
|
void |
modifyFurniture()
Controls the modification of selected furniture in the edited home.
|
void |
removePropertyChangeListener(HomeFurnitureController.Property property,
java.beans.PropertyChangeListener listener)
Removes the property change
listener in parameter from this controller. |
void |
setAdditionalProperties(java.util.Map<ObjectProperty,java.lang.Object> additionalProperties)
Sets additional edited properties.
|
void |
setAngle(java.lang.Float angle)
Sets the edited angle in radians.
|
void |
setAngle(java.lang.Float angle,
boolean updateAngleInDegrees) |
void |
setAngleInDegrees(java.lang.Integer angleInDegrees)
Sets the edited angle in degrees.
|
void |
setBasePlanItem(java.lang.Boolean basePlanItem)
Sets whether furniture is a base plan item or not.
|
void |
setColor(java.lang.Integer color)
Sets the edited color.
|
void |
setDepth(java.lang.Float depth)
Sets the edited depth.
|
void |
setDescription(java.lang.String description)
Sets the edited description.
|
void |
setElevation(java.lang.Float elevation)
Sets the edited elevation.
|
void |
setHeight(java.lang.Float height)
Sets the edited height.
|
void |
setHorizontalAxis(HomeFurnitureController.FurnitureHorizontalAxis horizontalAxis)
Sets the edited horizontal axis.
|
void |
setLightPower(java.lang.Float lightPower)
Sets the edited light power.
|
void |
setModelMirrored(java.lang.Boolean modelMirrored)
Sets whether furniture model is mirrored or not.
|
void |
setModelTransformations(Transformation[] modelTransformations)
Sets model transformations.
|
void |
setModelTransformations(Transformation[] transformations,
float x,
float y,
float elevation,
float width,
float depth,
float height)
Sets model transformations and updated dimensions of the edited piece.
|
void |
setName(java.lang.String name)
Sets the edited name.
|
void |
setNameVisible(java.lang.Boolean nameVisible)
Sets whether furniture name is visible or not.
|
void |
setPaint(HomeFurnitureController.FurniturePaint paint)
Sets whether the piece is colored, textured, uses customized materials or unknown painted.
|
void |
setPitch(java.lang.Float pitch)
Sets the edited pitch in radians.
|
void |
setPrice(java.math.BigDecimal price)
Sets the edited price.
|
void |
setProportional(boolean proportional)
Sets whether furniture proportions should be kept.
|
void |
setRoll(java.lang.Float roll)
Sets the edited roll angle in radians.
|
void |
setShininess(HomeFurnitureController.FurnitureShininess shininess)
Sets whether the piece shininess is the default one, matt, shiny or unknown.
|
void |
setValueAddedTaxPercentage(java.math.BigDecimal valueAddedTaxPercentage)
Sets the edited Value Added Tax percentage.
|
void |
setVisible(java.lang.Boolean visible)
Sets whether furniture is visible or not.
|
void |
setWidth(java.lang.Float width)
Sets the edited width.
|
void |
setX(java.lang.Float x)
Sets the edited abscissa.
|
void |
setY(java.lang.Float y)
Sets the edited ordinate.
|
protected void |
updateProperties()
Updates edited properties from selected furniture in the home edited by this controller.
|
public HomeFurnitureController(Home home, UserPreferences preferences, ViewFactory viewFactory, javax.swing.undo.UndoableEditSupport undoSupport)
public HomeFurnitureController(Home home, UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager, javax.swing.undo.UndoableEditSupport undoSupport)
public TextureChoiceController getTextureController()
public ModelMaterialsController getModelMaterialsController()
public DialogView getView()
getView
in interface Controller
public ContentManager getContentManager()
public void displayView(View parentView)
public void addPropertyChangeListener(HomeFurnitureController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter to this controller.public void removePropertyChangeListener(HomeFurnitureController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter from this controller.protected void updateProperties()
public boolean isPropertyEditable(HomeFurnitureController.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.public Content getIcon()
public void setName(java.lang.String name)
public java.lang.String getName()
public void setNameVisible(java.lang.Boolean nameVisible)
public java.lang.Boolean getNameVisible()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setAdditionalProperties(java.util.Map<ObjectProperty,java.lang.Object> additionalProperties)
public java.util.Map<ObjectProperty,java.lang.Object> getAdditionalProperties()
public void setPrice(java.math.BigDecimal price)
public java.math.BigDecimal getPrice()
public boolean isPriceEditable()
public void setValueAddedTaxPercentage(java.math.BigDecimal valueAddedTaxPercentage)
public java.math.BigDecimal getValueAddedTaxPercentage()
public boolean isValueAddedTaxPercentageEditable()
public void setX(java.lang.Float x)
public java.lang.Float getX()
public void setY(java.lang.Float y)
public java.lang.Float getY()
public void setElevation(java.lang.Float elevation)
public java.lang.Float getElevation()
public void setAngleInDegrees(java.lang.Integer angleInDegrees)
public java.lang.Integer getAngleInDegrees()
public void setAngle(java.lang.Float angle)
public void setAngle(java.lang.Float angle, boolean updateAngleInDegrees)
public java.lang.Float getAngle()
public boolean isRollAndPitchEditable()
public void setRoll(java.lang.Float roll)
public java.lang.Float getRoll()
public void setPitch(java.lang.Float pitch)
public java.lang.Float getPitch()
public void setHorizontalAxis(HomeFurnitureController.FurnitureHorizontalAxis horizontalAxis)
public HomeFurnitureController.FurnitureHorizontalAxis getHorizontalAxis()
public boolean isBasePlanItemEnabled()
true
if base plan item is an enabled property.public boolean isBasePlanItemEditable()
isBasePlanItemEnabled
.true
if base plan item is an enabled property.public void setBasePlanItem(java.lang.Boolean basePlanItem)
public java.lang.Boolean getBasePlanItem()
public void setWidth(java.lang.Float width)
public java.lang.Float getWidth()
public void setDepth(java.lang.Float depth)
public java.lang.Float getDepth()
public void setHeight(java.lang.Float height)
public java.lang.Float getHeight()
public void setProportional(boolean proportional)
public boolean isProportional()
public void setColor(java.lang.Integer color)
public java.lang.Integer getColor()
public void setPaint(HomeFurnitureController.FurniturePaint paint)
public HomeFurnitureController.FurniturePaint getPaint()
public void setModelTransformations(Transformation[] modelTransformations)
public void setModelTransformations(Transformation[] transformations, float x, float y, float elevation, float width, float depth, float height)
public Transformation[] getModelTransformations()
public java.util.List<java.lang.String> getModelPresetTransformationsNames()
public Transformation[] getModelPresetTransformations(int index)
index
.public void setShininess(HomeFurnitureController.FurnitureShininess shininess)
public HomeFurnitureController.FurnitureShininess getShininess()
public void setVisible(java.lang.Boolean visible)
public java.lang.Boolean getVisible()
public void setModelMirrored(java.lang.Boolean modelMirrored)
public java.lang.Boolean getModelMirrored()
public boolean isLightPowerEditable()
true
if light power is an editable property.public java.lang.Float getLightPower()
public void setLightPower(java.lang.Float lightPower)
public boolean isResizable()
public boolean isDeformable()
public boolean isTexturable()
public void modifyFurniture()
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License