Sweet Home 3D 4.0

com.eteks.sweethome3d.viewcontroller
Class PlanController

java.lang.Object
  extended by com.eteks.sweethome3d.viewcontroller.FurnitureController
      extended by com.eteks.sweethome3d.viewcontroller.PlanController
All Implemented Interfaces:
Controller

public class PlanController
extends FurnitureController
implements Controller

A MVC controller for the plan view.

Author:
Emmanuel Puybaret

Nested Class Summary
protected static class PlanController.ControllerState
          Controller state classes super class.
static class PlanController.EditableProperty
          Fields that can be edited in plan view.
static class PlanController.Mode
          Selectable modes in controller.
static class PlanController.Property
           
 
Constructor Summary
PlanController(Home home, UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager, UndoableEditSupport undoSupport)
          Creates the controller of plan view.
 
Method Summary
 void addDimensionLines(List<DimensionLine> dimensionLines)
          Add dimensionLines to home and post an undoable new dimension line operation.
 void addFurniture(List<HomePieceOfFurniture> furniture)
          Adds furniture to home and updates door and window flags if they intersect with walls and magnestism is enabled.
 void addItems(List<? extends Selectable> items)
          Adds items to home and post an undoable operation.
 void addLabels(List<Label> labels)
          Add labels to home and post an undoable new label operation.
 void addLevel()
          Controls the creation of a new level.
 void addPropertyChangeListener(PlanController.Property property, PropertyChangeListener listener)
          Adds the property change listener in parameter to this controller.
 void addRooms(List<Room> rooms)
          Add newRooms to home and post an undoable new room line operation.
 void addWalls(List<Wall> walls)
          Adds walls to home and post an undoable new wall operation.
protected  void adjustMagnetizedPieceOfFurniture(HomePieceOfFurniture piece, float x, float y)
          Attempts to modify piece location depending of its context.
protected  DimensionLine createDimensionLine(float xStart, float yStart, float xEnd, float yEnd, float offset)
          Returns a new dimension instance joining (xStart, yStart) and (xEnd, yEnd) points.
protected  Level createLevel(String name, float elevation, float floorThickness, float height)
          Returns a new level added to home.
protected  Room createRoom(float[][] roomPoints)
          Returns a new room instance with the given points.
protected  Wall createWall(float xStart, float yStart, float xEnd, float yEnd, Wall wallStartAtStart, Wall wallEndAtStart)
          Returns a new wall instance between (xStart, yStart) and (xEnd, yEnd) end points.
 void decreaseTextSize()
          Decrease the size of texts in selected items.
 void deleteItems(List<? extends Selectable> items)
          Deletes items in plan and record it as an undoable operation.
 void deleteSelectedLevel()
          Deletes the selected level and the items that belongs to it.
 void deleteSelection()
          Deletes the selection in home.
 void escape()
          Escapes of current action.
protected  PlanController.ControllerState getCameraElevationState()
          Returns the camera elevation state.
protected  PlanController.ControllerState getCameraPitchRotationState()
          Returns the camera pitch rotation state.
protected  PlanController.ControllerState getCameraYawRotationState()
          Returns the camera yaw rotation state.
protected  PlanController.ControllerState getCompassResizeState()
          Returns the compass resize state.
protected  PlanController.ControllerState getCompassRotationState()
          Returns the compass rotation state.
protected  PlanController.ControllerState getDimensionLineCreationState()
          Returns the dimension line creation state.
protected  PlanController.ControllerState getDimensionLineDrawingState()
          Returns the dimension line drawing state.
protected  PlanController.ControllerState getDimensionLineOffsetState()
          Returns the dimension line offset state.
protected  PlanController.ControllerState getDimensionLineResizeState()
          Returns the dimension line resize state.
protected  PlanController.ControllerState getDragAndDropState()
          Returns the drag and drop state.
 View getHorizontalRulerView()
          Returns the horizontal ruler of the plan view.
protected  PlanController.ControllerState getLabelCreationState()
          Returns the label creation state.
protected  PlanController.ControllerState getLabelRotationState()
          Returns the label rotation state.
protected  PlanController.ControllerState getLightPowerModificationState()
          Returns the light power modification state.
 float getMaximumScale()
          Returns the maximum scale of the plan view.
 float getMinimumScale()
          Returns the minimum scale of the plan view.
 PlanController.Mode getMode()
          Returns the active mode of this controller.
protected  PlanController.ControllerState getPanningState()
          Returns the panning state.
protected  PlanController.ControllerState getPieceOfFurnitureElevationState()
          Returns the piece elevation state.
protected  PlanController.ControllerState getPieceOfFurnitureHeightState()
          Returns the piece height state.
protected  PlanController.ControllerState getPieceOfFurnitureNameOffsetState()
          Returns the piece name offset state.
protected  PlanController.ControllerState getPieceOfFurnitureNameRotationState()
          Returns the piece name rotation state.
protected  PlanController.ControllerState getPieceOfFurnitureResizeState()
          Returns the piece resize state.
protected  PlanController.ControllerState getPieceOfFurnitureRotationState()
          Returns the piece rotation state.
protected  PlanController.ControllerState getRectangleSelectionState()
          Returns the rectangle selection state.
protected  PlanController.ControllerState getRoomAreaOffsetState()
          Returns the room area offset state.
protected  PlanController.ControllerState getRoomAreaRotationState()
          Returns the room area rotation state.
protected  PlanController.ControllerState getRoomCreationState()
          Returns the room creation state.
protected  PlanController.ControllerState getRoomDrawingState()
          Returns the room drawing state.
protected  PlanController.ControllerState getRoomNameOffsetState()
          Returns the room name offset state.
protected  PlanController.ControllerState getRoomNameRotationState()
          Returns the room name rotation state.
protected  PlanController.ControllerState getRoomResizeState()
          Returns the room resize state.
 float getScale()
          Returns the scale in plan view.
 Selectable getSelectableItemAt(float x, float y)
          Returns the selectable item at (x, y) point.
 List<Selectable> getSelectableItemsAt(float x, float y)
          Returns the selectable items at (x, y) point.
protected  List<Selectable> getSelectableItemsIntersectingRectangle(float x0, float y0, float x1, float y1)
          Returns the items that intersects with the rectangle of (x0, y0), (x1, y1) opposite corners.
protected  PlanController.ControllerState getSelectionMoveState()
          Returns the selection move state.
protected  PlanController.ControllerState getSelectionState()
          Returns the selection state.
 View getVerticalRulerView()
          Returns the vertical ruler of the plan view.
 PlanView getView()
          Returns the view associated with this controller.
protected  PlanController.ControllerState getWallCreationState()
          Returns the wall creation state.
protected  PlanController.ControllerState getWallDrawingState()
          Returns the wall drawing state.
protected  PlanController.ControllerState getWallResizeState()
          Returns the wall resize state.
protected  float getXLastMouseMove()
          Returns the abscissa of mouse position at last mouse move.
protected  float getXLastMousePress()
          Returns the abscissa of mouse position at last mouse press.
protected  float getYLastMouseMove()
          Returns the ordinate of mouse position at last mouse move.
protected  float getYLastMousePress()
          Returns the ordinate of mouse position at last mouse press.
 void increaseTextSize()
          Increase the size of texts in selected items.
protected  boolean isItemDeletable(Selectable item)
          Returns true if the given item may be deleted.
protected  boolean isItemMovable(Selectable item)
          Returns true if the given item may be moved in the plan.
protected  boolean isItemPartOfBasePlan(Selectable item)
          Returns true it the given item belongs to the base plan.
protected  boolean isItemResizable(Selectable item)
          Returns true if the given item may be resized.
 boolean isModificationState()
          Returns true if the interactions in the current mode may modify the state of a home.
 void lockBasePlan()
          Locks home base plan.
 void modifyCompass()
          Controls the modification of the compass.
 void modifyObserverCamera()
          Controls the modification of the observer camera.
 void modifySelectedLabels()
          Controls the modification of the selected labels.
 void modifySelectedLevel()
           
 void modifySelectedRooms()
          Controls the modification of the selected rooms.
 void modifySelectedWalls()
          Controls the modification of selected walls.
 void moveItems(List<? extends Selectable> items, float dx, float dy)
          Moves items of (dx, dy) units.
 void moveMouse(float x, float y)
          Processes a mouse button moved event.
 void moveSelection(float dx, float dy)
          Moves the selection of (dx,dy) in home.
 void pressMouse(float x, float y, int clickCount, boolean shiftDown, boolean duplicationActivated)
          Processes a mouse button pressed event.
 void pressMouse(float x, float y, int clickCount, boolean shiftDown, boolean alignmentActivated, boolean duplicationActivated, boolean magnetismToggled)
          Processes a mouse button pressed event.
 void releaseMouse(float x, float y)
          Processes a mouse button released event.
 void removePropertyChangeListener(PlanController.Property property, PropertyChangeListener listener)
          Removes the property change listener in parameter from this controller.
 void reverseSelectedWallsDirection()
          Controls the direction reverse of selected walls.
 void selectAll()
          Selects all visible items in the selected level of home.
protected  void selectAndShowItems(List<? extends Selectable> items)
          Selects items and make them visible at screen.
 void selectItem(Selectable item)
          Selects the given item.
protected  void selectItems(List<? extends Selectable> items)
          Selects items.
 void setAlignmentActivated(boolean alignmentActivated)
          Activates or deactivates alignment feature.
 void setDuplicationActivated(boolean duplicationActivated)
          Activates or deactivates duplication feature.
 void setEditionActivated(boolean editionActivated)
          Activates or deactivates edition.
 void setMode(PlanController.Mode mode)
          Sets the active mode of this controller and fires a PropertyChangeEvent.
 void setScale(float scale)
          Controls the scale in plan view and and fires a PropertyChangeEvent.
 void setSelectedLevel(Level level)
          Sets the selected level in home.
protected  void setState(PlanController.ControllerState state)
          Changes current state of controller.
 void splitSelectedWall()
          Controls the split of the selected wall in two joined walls of equal length.
 void startDraggedItems(List<Selectable> draggedItems, float x, float y)
          Displays in plan view the feedback of draggedItems, during a drag and drop operation initiated from outside of plan view.
 void stopDraggedItems()
          Deletes in plan view the feedback of the dragged items.
 void toggleBoldStyle()
          Toggles bold style of texts in selected items.
 void toggleItalicStyle()
          Toggles italic style of texts in selected items.
 void toggleMagnetism(boolean magnetismToggled)
          Toggles temporary magnetism feature of user preferences.
 void unlockBasePlan()
          Unlocks home base plan.
 void updateEditableProperty(PlanController.EditableProperty editableProperty, Object value)
          Updates an editable property with the entered value.
protected  boolean wasAlignmentActivatedLastMousePress()
          Returns true if alignment was activated at last mouse press.
protected  boolean wasDuplicationActivatedLastMousePress()
          Returns true if duplication was activated at last mouse press.
protected  boolean wasMagnetismToggledLastMousePress()
          Returns true if magnetism was toggled at last mouse press.
protected  boolean wasShiftDownLastMousePress()
          Returns true if shift key was down at last mouse press.
 void zoom(float factor)
          Processes a zoom event.
 
Methods inherited from class com.eteks.sweethome3d.viewcontroller.FurnitureController
alignSelectedFurnitureOnBackSide, alignSelectedFurnitureOnBottom, alignSelectedFurnitureOnFrontSide, alignSelectedFurnitureOnLeft, alignSelectedFurnitureOnLeftSide, alignSelectedFurnitureOnRight, alignSelectedFurnitureOnRightSide, alignSelectedFurnitureOnTop, alignSelectedFurnitureSideBySide, createHomeFurnitureGroup, createHomePieceOfFurniture, deleteFurniture, distributeSelectedFurniture, distributeSelectedFurnitureHorizontally, distributeSelectedFurnitureVertically, groupSelectedFurniture, importFurniture, importFurniture, isPieceOfFurnitureDeletable, isPieceOfFurnitureMovable, isPieceOfFurniturePartOfBasePlan, modifySelectedFurniture, setFurnitureVisibleProperties, setSelectedFurniture, sortFurniture, sortFurniture, toggleFurnitureSort, toggleFurnitureSortOrder, toggleFurnitureVisibleProperty, toggleSelectedFurnitureVisibility, ungroupSelectedFurniture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanController

public PlanController(Home home,
                      UserPreferences preferences,
                      ViewFactory viewFactory,
                      ContentManager contentManager,
                      UndoableEditSupport undoSupport)
Creates the controller of plan view.

Parameters:
home - the home plan edited by this controller and its view
preferences - the preferences of the application
viewFactory - a factory able to create the plan view managed by this controller
contentManager - a content manager used to import furniture
undoSupport - undo support to post changes on plan by this controller
Method Detail

getView

public PlanView getView()
Returns the view associated with this controller.

Specified by:
getView in interface Controller
Overrides:
getView in class FurnitureController

setState

protected void setState(PlanController.ControllerState state)
Changes current state of controller.


addPropertyChangeListener

public void addPropertyChangeListener(PlanController.Property property,
                                      PropertyChangeListener listener)
Adds the property change listener in parameter to this controller.


removePropertyChangeListener

public void removePropertyChangeListener(PlanController.Property property,
                                         PropertyChangeListener listener)
Removes the property change listener in parameter from this controller.


getMode

public PlanController.Mode getMode()
Returns the active mode of this controller.


setMode

public void setMode(PlanController.Mode mode)
Sets the active mode of this controller and fires a PropertyChangeEvent.


isModificationState

public boolean isModificationState()
Returns true if the interactions in the current mode may modify the state of a home.


deleteSelection

public void deleteSelection()
Deletes the selection in home.

Overrides:
deleteSelection in class FurnitureController

escape

public void escape()
Escapes of current action.


moveSelection

public void moveSelection(float dx,
                          float dy)
Moves the selection of (dx,dy) in home.


toggleMagnetism

public void toggleMagnetism(boolean magnetismToggled)
Toggles temporary magnetism feature of user preferences.

Parameters:
magnetismToggled - if true then magnetism feature is toggled.

setAlignmentActivated

public void setAlignmentActivated(boolean alignmentActivated)
Activates or deactivates alignment feature.

Parameters:
alignmentActivated - if true then alignment is active.
Since:
4.0

setDuplicationActivated

public void setDuplicationActivated(boolean duplicationActivated)
Activates or deactivates duplication feature.

Parameters:
duplicationActivated - if true then duplication is active.

setEditionActivated

public void setEditionActivated(boolean editionActivated)
Activates or deactivates edition.

Parameters:
editionActivated - if true then edition is active

updateEditableProperty

public void updateEditableProperty(PlanController.EditableProperty editableProperty,
                                   Object value)
Updates an editable property with the entered value.


pressMouse

public void pressMouse(float x,
                       float y,
                       int clickCount,
                       boolean shiftDown,
                       boolean duplicationActivated)
Processes a mouse button pressed event.


pressMouse

public void pressMouse(float x,
                       float y,
                       int clickCount,
                       boolean shiftDown,
                       boolean alignmentActivated,
                       boolean duplicationActivated,
                       boolean magnetismToggled)
Processes a mouse button pressed event.

Since:
4.0

releaseMouse

public void releaseMouse(float x,
                         float y)
Processes a mouse button released event.


moveMouse

public void moveMouse(float x,
                      float y)
Processes a mouse button moved event.


zoom

public void zoom(float factor)
Processes a zoom event.


getSelectionState

protected PlanController.ControllerState getSelectionState()
Returns the selection state.


getSelectionMoveState

protected PlanController.ControllerState getSelectionMoveState()
Returns the selection move state.


getRectangleSelectionState

protected PlanController.ControllerState getRectangleSelectionState()
Returns the rectangle selection state.


getPanningState

protected PlanController.ControllerState getPanningState()
Returns the panning state.


getDragAndDropState

protected PlanController.ControllerState getDragAndDropState()
Returns the drag and drop state.


getWallCreationState

protected PlanController.ControllerState getWallCreationState()
Returns the wall creation state.


getWallDrawingState

protected PlanController.ControllerState getWallDrawingState()
Returns the wall drawing state.


getWallResizeState

protected PlanController.ControllerState getWallResizeState()
Returns the wall resize state.


getPieceOfFurnitureRotationState

protected PlanController.ControllerState getPieceOfFurnitureRotationState()
Returns the piece rotation state.


getPieceOfFurnitureElevationState

protected PlanController.ControllerState getPieceOfFurnitureElevationState()
Returns the piece elevation state.


getPieceOfFurnitureHeightState

protected PlanController.ControllerState getPieceOfFurnitureHeightState()
Returns the piece height state.


getPieceOfFurnitureResizeState

protected PlanController.ControllerState getPieceOfFurnitureResizeState()
Returns the piece resize state.


getLightPowerModificationState

protected PlanController.ControllerState getLightPowerModificationState()
Returns the light power modification state.


getPieceOfFurnitureNameOffsetState

protected PlanController.ControllerState getPieceOfFurnitureNameOffsetState()
Returns the piece name offset state.


getPieceOfFurnitureNameRotationState

protected PlanController.ControllerState getPieceOfFurnitureNameRotationState()
Returns the piece name rotation state.

Since:
3.6

getCameraYawRotationState

protected PlanController.ControllerState getCameraYawRotationState()
Returns the camera yaw rotation state.


getCameraPitchRotationState

protected PlanController.ControllerState getCameraPitchRotationState()
Returns the camera pitch rotation state.


getCameraElevationState

protected PlanController.ControllerState getCameraElevationState()
Returns the camera elevation state.


getDimensionLineCreationState

protected PlanController.ControllerState getDimensionLineCreationState()
Returns the dimension line creation state.


getDimensionLineDrawingState

protected PlanController.ControllerState getDimensionLineDrawingState()
Returns the dimension line drawing state.


getDimensionLineResizeState

protected PlanController.ControllerState getDimensionLineResizeState()
Returns the dimension line resize state.


getDimensionLineOffsetState

protected PlanController.ControllerState getDimensionLineOffsetState()
Returns the dimension line offset state.


getRoomCreationState

protected PlanController.ControllerState getRoomCreationState()
Returns the room creation state.


getRoomDrawingState

protected PlanController.ControllerState getRoomDrawingState()
Returns the room drawing state.


getRoomResizeState

protected PlanController.ControllerState getRoomResizeState()
Returns the room resize state.


getRoomAreaOffsetState

protected PlanController.ControllerState getRoomAreaOffsetState()
Returns the room area offset state.


getRoomAreaRotationState

protected PlanController.ControllerState getRoomAreaRotationState()
Returns the room area rotation state.

Since:
3.6

getRoomNameOffsetState

protected PlanController.ControllerState getRoomNameOffsetState()
Returns the room name offset state.


getRoomNameRotationState

protected PlanController.ControllerState getRoomNameRotationState()
Returns the room name rotation state.

Since:
3.6

getLabelCreationState

protected PlanController.ControllerState getLabelCreationState()
Returns the label creation state.


getLabelRotationState

protected PlanController.ControllerState getLabelRotationState()
Returns the label rotation state.

Since:
3.6

getCompassRotationState

protected PlanController.ControllerState getCompassRotationState()
Returns the compass rotation state.


getCompassResizeState

protected PlanController.ControllerState getCompassResizeState()
Returns the compass resize state.


getXLastMousePress

protected float getXLastMousePress()
Returns the abscissa of mouse position at last mouse press.


getYLastMousePress

protected float getYLastMousePress()
Returns the ordinate of mouse position at last mouse press.


wasShiftDownLastMousePress

protected boolean wasShiftDownLastMousePress()
Returns true if shift key was down at last mouse press.


wasMagnetismToggledLastMousePress

protected boolean wasMagnetismToggledLastMousePress()
Returns true if magnetism was toggled at last mouse press.

Since:
4.0

wasAlignmentActivatedLastMousePress

protected boolean wasAlignmentActivatedLastMousePress()
Returns true if alignment was activated at last mouse press.

Since:
4.0

wasDuplicationActivatedLastMousePress

protected boolean wasDuplicationActivatedLastMousePress()
Returns true if duplication was activated at last mouse press.


getXLastMouseMove

protected float getXLastMouseMove()
Returns the abscissa of mouse position at last mouse move.


getYLastMouseMove

protected float getYLastMouseMove()
Returns the ordinate of mouse position at last mouse move.


modifySelectedWalls

public void modifySelectedWalls()
Controls the modification of selected walls.


lockBasePlan

public void lockBasePlan()
Locks home base plan.


isItemPartOfBasePlan

protected boolean isItemPartOfBasePlan(Selectable item)
Returns true it the given item belongs to the base plan.


unlockBasePlan

public void unlockBasePlan()
Unlocks home base plan.


isItemMovable

protected boolean isItemMovable(Selectable item)
Returns true if the given item may be moved in the plan. Default implementation returns true.


isItemResizable

protected boolean isItemResizable(Selectable item)
Returns true if the given item may be resized. Default implementation returns false if the given item is a non resizable piece of furniture.


isItemDeletable

protected boolean isItemDeletable(Selectable item)
Returns true if the given item may be deleted. Default implementation returns true except if the given item is a camera or a compass or if the given item isn't a deletable piece of furniture.


reverseSelectedWallsDirection

public void reverseSelectedWallsDirection()
Controls the direction reverse of selected walls.


splitSelectedWall

public void splitSelectedWall()
Controls the split of the selected wall in two joined walls of equal length.


modifySelectedRooms

public void modifySelectedRooms()
Controls the modification of the selected rooms.


modifySelectedLabels

public void modifySelectedLabels()
Controls the modification of the selected labels.


modifyCompass

public void modifyCompass()
Controls the modification of the compass.


modifyObserverCamera

public void modifyObserverCamera()
Controls the modification of the observer camera.


toggleBoldStyle

public void toggleBoldStyle()
Toggles bold style of texts in selected items.


toggleItalicStyle

public void toggleItalicStyle()
Toggles italic style of texts in selected items.


increaseTextSize

public void increaseTextSize()
Increase the size of texts in selected items.


decreaseTextSize

public void decreaseTextSize()
Decrease the size of texts in selected items.


getMinimumScale

public float getMinimumScale()
Returns the minimum scale of the plan view.


getMaximumScale

public float getMaximumScale()
Returns the maximum scale of the plan view.


getScale

public float getScale()
Returns the scale in plan view.


setScale

public void setScale(float scale)
Controls the scale in plan view and and fires a PropertyChangeEvent.


setSelectedLevel

public void setSelectedLevel(Level level)
Sets the selected level in home.


selectAll

public void selectAll()
Selects all visible items in the selected level of home.

Overrides:
selectAll in class FurnitureController

getHorizontalRulerView

public View getHorizontalRulerView()
Returns the horizontal ruler of the plan view.


getVerticalRulerView

public View getVerticalRulerView()
Returns the vertical ruler of the plan view.


startDraggedItems

public void startDraggedItems(List<Selectable> draggedItems,
                              float x,
                              float y)
Displays in plan view the feedback of draggedItems, during a drag and drop operation initiated from outside of plan view.


stopDraggedItems

public void stopDraggedItems()
Deletes in plan view the feedback of the dragged items.


adjustMagnetizedPieceOfFurniture

protected void adjustMagnetizedPieceOfFurniture(HomePieceOfFurniture piece,
                                                float x,
                                                float y)
Attempts to modify piece location depending of its context. If the piece is a door or a window and the point (x, y) belongs to a wall, the piece will be resized, rotated and moved so its opening depth is equal to wall thickness and its angle matches wall direction. If the piece isn't a door or a window and the point (x, y) belongs to a wall, the piece will be rotated and moved so its back face lies along the closest wall side and its angle matches wall direction. If the piece isn't a door or a window, its bounding box is included in the one of an other object and its elevation is equal to zero, it will be elevated to appear on the top of the latter.


addLevel

public void addLevel()
Controls the creation of a new level.


createLevel

protected Level createLevel(String name,
                            float elevation,
                            float floorThickness,
                            float height)
Returns a new level added to home.


modifySelectedLevel

public void modifySelectedLevel()

deleteSelectedLevel

public void deleteSelectedLevel()
Deletes the selected level and the items that belongs to it.


createWall

protected Wall createWall(float xStart,
                          float yStart,
                          float xEnd,
                          float yEnd,
                          Wall wallStartAtStart,
                          Wall wallEndAtStart)
Returns a new wall instance between (xStart, yStart) and (xEnd, yEnd) end points. The new wall is added to home and its start point is joined to the start of wallStartAtStart or the end of wallEndAtStart.


createRoom

protected Room createRoom(float[][] roomPoints)
Returns a new room instance with the given points. The new room is added to home.


createDimensionLine

protected DimensionLine createDimensionLine(float xStart,
                                            float yStart,
                                            float xEnd,
                                            float yEnd,
                                            float offset)
Returns a new dimension instance joining (xStart, yStart) and (xEnd, yEnd) points. The new dimension line is added to home.


getSelectableItemAt

public Selectable getSelectableItemAt(float x,
                                      float y)
Returns the selectable item at (x, y) point.


getSelectableItemsAt

public List<Selectable> getSelectableItemsAt(float x,
                                             float y)
Returns the selectable items at (x, y) point.


getSelectableItemsIntersectingRectangle

protected List<Selectable> getSelectableItemsIntersectingRectangle(float x0,
                                                                   float y0,
                                                                   float x1,
                                                                   float y1)
Returns the items that intersects with the rectangle of (x0, y0), (x1, y1) opposite corners.


deleteItems

public void deleteItems(List<? extends Selectable> items)
Deletes items in plan and record it as an undoable operation.


moveItems

public void moveItems(List<? extends Selectable> items,
                      float dx,
                      float dy)
Moves items of (dx, dy) units.


selectAndShowItems

protected void selectAndShowItems(List<? extends Selectable> items)
Selects items and make them visible at screen.


selectItems

protected void selectItems(List<? extends Selectable> items)
Selects items.


selectItem

public void selectItem(Selectable item)
Selects the given item.


addItems

public void addItems(List<? extends Selectable> items)
Adds items to home and post an undoable operation.


addFurniture

public void addFurniture(List<HomePieceOfFurniture> furniture)
Adds furniture to home and updates door and window flags if they intersect with walls and magnestism is enabled.

Overrides:
addFurniture in class FurnitureController
Parameters:
furniture - the furniture to add.

addWalls

public void addWalls(List<Wall> walls)
Adds walls to home and post an undoable new wall operation.


addRooms

public void addRooms(List<Room> rooms)
Add newRooms to home and post an undoable new room line operation.


addDimensionLines

public void addDimensionLines(List<DimensionLine> dimensionLines)
Add dimensionLines to home and post an undoable new dimension line operation.


addLabels

public void addLabels(List<Label> labels)
Add labels to home and post an undoable new label operation.


Sweet Home 3D 4.0

© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License