public class RoomController extends java.lang.Object implements Controller
Modifier and Type | Class and Description |
---|---|
static class |
RoomController.Property
The properties that may be edited by the view associated to this controller.
|
static class |
RoomController.RoomPaint
The possible values for room paint type.
|
Constructor and Description |
---|
RoomController(Home home,
UserPreferences preferences,
ViewFactory viewFactory,
ContentManager contentManager,
javax.swing.undo.UndoableEditSupport undoSupport)
Creates the controller of room view with undo support.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(RoomController.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.lang.Boolean |
getAreaVisible()
Returns whether room area is visible or not.
|
java.lang.Integer |
getCeilingColor()
Returns the edited color of the ceiling.
|
java.lang.Boolean |
getCeilingFlat()
Returns whether room ceiling should remain flat whatever its environment or not.
|
RoomController.RoomPaint |
getCeilingPaint()
Returns whether the ceiling is colored, textured or unknown painted.
|
java.lang.Float |
getCeilingShininess()
Returns the edited shininess of the ceiling.
|
TextureChoiceController |
getCeilingTextureController()
Returns the texture controller of the room ceiling.
|
java.lang.Boolean |
getCeilingVisible()
Returns whether room ceiling is visible or not.
|
java.lang.Integer |
getFloorColor()
Returns the edited color of the floor.
|
RoomController.RoomPaint |
getFloorPaint()
Returns whether the floor is colored, textured or unknown painted.
|
java.lang.Float |
getFloorShininess()
Returns the edited shininess of the floor.
|
TextureChoiceController |
getFloorTextureController()
Returns the texture controller of the room floor.
|
java.lang.Boolean |
getFloorVisible()
Returns whether room floor is visible or not.
|
java.lang.String |
getName()
Returns the edited name.
|
DialogView |
getView()
Returns the view associated with this controller.
|
BaseboardChoiceController |
getWallSidesBaseboardController()
Returns the controller of the wall sides baseboard.
|
java.lang.Integer |
getWallSidesColor()
Returns the edited color of the wall sides.
|
RoomController.RoomPaint |
getWallSidesPaint()
Returns whether the wall sides are colored, textured or unknown painted.
|
java.lang.Float |
getWallSidesShininess()
Returns the edited shininess of the wall sides.
|
TextureChoiceController |
getWallSidesTextureController()
Returns the texture controller of the room wall sides.
|
boolean |
isPropertyEditable(RoomController.Property property)
Returns
true if the given property is editable. |
boolean |
isSplitSurroundingWalls()
Returns
true if walls around the edited rooms should be split. |
boolean |
isSplitSurroundingWallsNeeded()
Returns
true if walls around the edited rooms need to be split
to avoid changing the color of wall sides that belong to neighborhood rooms. |
void |
modifyRooms()
Controls the modification of selected rooms in edited home.
|
void |
removePropertyChangeListener(RoomController.Property property,
java.beans.PropertyChangeListener listener)
Removes the property change
listener in parameter from this controller. |
void |
setAreaVisible(java.lang.Boolean areaVisible)
Sets whether room area is visible or not.
|
void |
setCeilingColor(java.lang.Integer ceilingColor)
Sets the edited color of the ceiling.
|
void |
setCeilingFlat(java.lang.Boolean ceilingCeilingFlat)
Sets whether room ceiling should remain flat whatever its environment or not.
|
void |
setCeilingPaint(RoomController.RoomPaint ceilingPaint)
Sets whether the ceiling is colored, textured or unknown painted.
|
void |
setCeilingShininess(java.lang.Float ceilingShininess)
Sets the edited shininess of the ceiling.
|
void |
setCeilingVisible(java.lang.Boolean ceilingCeilingVisible)
Sets whether room ceiling is visible or not.
|
void |
setFloorColor(java.lang.Integer floorColor)
Sets the edited color of the floor.
|
void |
setFloorPaint(RoomController.RoomPaint floorPaint)
Sets whether the floor is colored, textured or unknown painted.
|
void |
setFloorShininess(java.lang.Float floorShininess)
Sets the edited shininess of the floor.
|
void |
setFloorVisible(java.lang.Boolean floorVisible)
Sets whether room floor is visible or not.
|
void |
setName(java.lang.String name)
Sets the edited name.
|
void |
setSplitSurroundingWalls(boolean splitSurroundingWalls)
Sets whether walls around the edited rooms should be split or not.
|
void |
setWallSidesColor(java.lang.Integer wallSidesColor)
Sets the edited color of the wall sides.
|
void |
setWallSidesPaint(RoomController.RoomPaint wallSidesPaint)
Sets whether the wall sides are colored, textured or unknown painted.
|
void |
setWallSidesShininess(java.lang.Float wallSidesShininess)
Sets the edited shininess of the wall sides.
|
protected void |
updateProperties()
Updates edited properties from selected rooms in the home edited by this controller.
|
public RoomController(Home home, UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager, javax.swing.undo.UndoableEditSupport undoSupport)
public TextureChoiceController getFloorTextureController()
public TextureChoiceController getCeilingTextureController()
public TextureChoiceController getWallSidesTextureController()
public BaseboardChoiceController getWallSidesBaseboardController()
public DialogView getView()
getView
in interface Controller
public void displayView(View parentView)
public void addPropertyChangeListener(RoomController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter to this controller.public void removePropertyChangeListener(RoomController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter from this controller.public boolean isPropertyEditable(RoomController.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 WALL
properties.protected void updateProperties()
public void setName(java.lang.String name)
public java.lang.String getName()
public void setAreaVisible(java.lang.Boolean areaVisible)
public java.lang.Boolean getAreaVisible()
public void setFloorVisible(java.lang.Boolean floorVisible)
public java.lang.Boolean getFloorVisible()
public void setFloorColor(java.lang.Integer floorColor)
public java.lang.Integer getFloorColor()
public void setFloorPaint(RoomController.RoomPaint floorPaint)
public RoomController.RoomPaint getFloorPaint()
public void setFloorShininess(java.lang.Float floorShininess)
public java.lang.Float getFloorShininess()
public void setCeilingVisible(java.lang.Boolean ceilingCeilingVisible)
public java.lang.Boolean getCeilingVisible()
public void setCeilingColor(java.lang.Integer ceilingColor)
public java.lang.Integer getCeilingColor()
public void setCeilingPaint(RoomController.RoomPaint ceilingPaint)
public RoomController.RoomPaint getCeilingPaint()
public void setCeilingShininess(java.lang.Float ceilingShininess)
public java.lang.Float getCeilingShininess()
public void setCeilingFlat(java.lang.Boolean ceilingCeilingFlat)
public java.lang.Boolean getCeilingFlat()
public boolean isSplitSurroundingWalls()
true
if walls around the edited rooms should be split.public void setSplitSurroundingWalls(boolean splitSurroundingWalls)
public boolean isSplitSurroundingWallsNeeded()
true
if walls around the edited rooms need to be split
to avoid changing the color of wall sides that belong to neighborhood rooms.public void setWallSidesColor(java.lang.Integer wallSidesColor)
public java.lang.Integer getWallSidesColor()
public void setWallSidesPaint(RoomController.RoomPaint wallSidesPaint)
public RoomController.RoomPaint getWallSidesPaint()
public void setWallSidesShininess(java.lang.Float wallSidesShininess)
public java.lang.Float getWallSidesShininess()
public void modifyRooms()
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License