Class PlanController
Extends
FurnitureController.
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
PlanController(home, preferences, viewFactory, contentManager, undoSupport)
Creates the controller of plan view.
|
Method Attributes | Method Name and Description |
---|---|
addDimensionLines(dimensionLines)
Add
dimensionLines to home and post an undoable new dimension line operation. |
|
addItems(items)
Adds
items to home and post an undoable operation. |
|
addLabels(labels)
Add
labels to home and post an undoable new label operation. |
|
Controls the creation of a new level at same elevation.
|
|
addPointToSelectedRoom(x, y)
Adds a point to the selected room at the given coordinates and posts an undoable operation.
|
|
addPolylines(polylines)
Adds
polylines to home and posts an undoable new polyline line operation. |
|
addPropertyChangeListener(property, listener)
Adds the property change
listener in parameter to this controller. |
|
addRooms(rooms)
Add
newRooms to home and post an undoable new room line operation. |
|
addWalls(walls)
Adds
walls to home and post an undoable new wall operation. |
|
adjustMagnetizedPieceOfFurniture(piece, x, y)
Attempts to modify
piece location depending of its context. |
|
createDimensionLine(xStart, yStart, xEnd, yEnd, offset)
Returns a new dimension instance joining (
xStart ,
yStart ) and (xEnd , yEnd ) points. |
|
createLabel(x, y)
Creates a new label using its controller.
|
|
createLevel(name, elevation, floorThickness, height)
Returns a new level added to home.
|
|
createPolyline(polylinePoints)
Returns a new polyline instance with the given points.
|
|
createRoom(roomPoints)
Returns a new room instance with the given points.
|
|
createWall(xStart, yStart, xEnd, yEnd, wallStartAtStart, wallEndAtStart)
Returns a new wall instance between (
xStart ,
yStart ) and (xEnd , yEnd )
end points. |
|
Decrease the size of texts in selected items.
|
|
deleteItems(items)
Deletes
items in plan and record it as an undoable operation. |
|
Deletes the point of the selected room at the given coordinates and posts an undoable operation.
|
|
Deletes the selected level and the items that belongs to it.
|
|
Deletes the selection in home.
|
|
escape()
Escapes of current action.
|
|
Flips horizontally selected objects.
|
|
flipItem(item, itemTextBaseOffsets, offsetIndex, axisCoordinate, horizontalFlip, flippedItems)
Flips the given
item with the given axis coordinate. |
|
Flips vertically selected objects.
|
|
Returns the camera elevation state.
|
|
Returns the camera pitch rotation state.
|
|
Returns the camera yaw rotation state.
|
|
Returns the compass resize state.
|
|
Returns the compass rotation state.
|
|
Returns the dimension line creation state.
|
|
Returns the dimension line drawing state.
|
|
Returns the dimension line elevation state.
|
|
Returns the dimension line offset state.
|
|
Returns the dimension line rotation state.
|
|
Returns the dimension line resize state.
|
|
Returns the drag and drop state.
|
|
Returns the horizontal ruler of the plan view.
|
|
Returns the label creation state.
|
|
Returns the label elevation state.
|
|
Returns the label rotation state.
|
|
Returns the light power modification state.
|
|
Returns the maximum scale of the plan view.
|
|
Returns the minimum scale of the plan view.
|
|
getMode()
Returns the active mode of this controller.
|
|
Returns the panning state.
|
|
Returns the piece elevation state.
|
|
Returns the piece height state.
|
|
Returns the piece name offset state.
|
|
Returns the piece name rotation state.
|
|
Returns the piece pitch rotation state.
|
|
Returns the piece resize state.
|
|
Returns the piece roll rotation state.
|
|
Returns the piece rotation state.
|
|
Returns the pointer type used at the last mouse press.
|
|
Returns the polyline creation state.
|
|
Returns the polyline drawing state.
|
|
Returns the polyline resize state.
|
|
Returns the rectangle selection state.
|
|
Returns the room area offset state.
|
|
Returns the room area rotation state.
|
|
Returns the room creation state.
|
|
Returns the room drawing state.
|
|
Returns the room name offset state.
|
|
Returns the room name rotation state.
|
|
Returns the room resize state.
|
|
getScale()
Returns the scale in plan view.
|
|
getSelectableItemsIntersectingRectangle(x0, y0, x1, y1)
Returns the items that intersects with the rectangle of (
x0 ,
y0 ), (x1 , y1 ) opposite corners. |
|
Returns the selection move state.
|
|
Returns the selection state.
|
|
Returns the vertical ruler of the plan view.
|
|
getView()
Returns the view associated with this controller.
|
|
Returns the wall arc extent state.
|
|
Returns the wall creation state.
|
|
Returns the wall drawing state.
|
|
Returns the wall resize state.
|
|
Returns the abscissa of mouse position at last mouse move.
|
|
Returns the abscissa of mouse position at last mouse press.
|
|
Returns the ordinate of mouse position at last mouse move.
|
|
Returns the ordinate of mouse position at last mouse press.
|
|
Increase the size of texts in selected items.
|
|
Returns
true if the interactions in the current mode may modify
the base plan of a home. |
|
Returns
true if this view accepts to display requested feedback. |
|
isItemDeletable(item)
Returns
true if the given item may be deleted. |
|
isItemMovable(item)
Returns
true if the given item may be moved
in the plan. |
|
isItemPartOfBasePlan(item)
Returns
true it the given item belongs
to the base plan. |
|
isItemResizable(item)
Returns
true if the given item may be resized. |
|
Returns
true if the interactions in the current mode may modify
the state of a home. |
|
isRoomPointDeletableAt(room, x, y)
Returns
true if the given point can be removed from the room . |
|
isRoomPointsComputableAt(room, x, y)
Returns
true if the room can be recomputed at the given coordinates. |
|
Controls how selected walls are joined.
|
|
Locks home base plan.
|
|
Controls the modification of the compass.
|
|
Controls the modification of the observer camera.
|
|
Controls the modification of the selected labels.
|
|
Controls the modification of the item selected in plan.
|
|
Controls the modification of the selected labels.
|
|
Controls the modification of the selected polylines.
|
|
Controls the modification of the selected rooms.
|
|
Controls the modification of selected walls.
|
|
moveItems(items, dx, dy)
Moves
items of (dx , dy ) units. |
|
moveMouse(x, y)
Processes a mouse button moved event.
|
|
moveSelection(dx, dy)
Moves the selection of (
dx ,dy ) in home. |
|
pressMouse(x, y, clickCount, shiftDown, alignmentActivated, duplicationActivated, magnetismToggled, pointerType)
Processes a mouse button pressed event.
|
|
Controls the recomputation of the points of the selected room at the given coordinates.
|
|
releaseMouse(x, y)
Processes a mouse button released event.
|
|
removePropertyChangeListener(property, listener)
Removes the property change
listener in parameter from this controller. |
|
Controls the direction reverse of selected walls.
|
|
Selects all visible items in the selected level of home.
|
|
Selects all visible items in all levels of home.
|
|
selectItem(item)
Selects the given
item . |
|
setAlignmentActivated(alignmentActivated)
Activates or deactivates alignment feature.
|
|
Makes all levels viewable.
|
|
setDuplicationActivated(duplicationActivated)
Activates or deactivates duplication feature.
|
|
setEditionActivated(editionActivated)
Activates or deactivates edition.
|
|
setFeedbackDisplayed(displayed)
Sets whether requested feedback should be displayed in the view or not.
|
|
setMode(mode)
Sets the active mode of this controller and fires a
PropertyChangeEvent . |
|
setScale(scale)
Controls the scale in plan view and and fires a
PropertyChangeEvent . |
|
setSelectedLevel(level)
Sets the selected level in home.
|
|
Makes the selected level the only viewable one.
|
|
setState(state)
Changes current state of controller.
|
|
Controls the split of the selected wall in two joined walls of equal length.
|
|
startDraggedItems(draggedItems, x, y)
Displays in plan view the feedback of
draggedItems ,
during a drag and drop operation initiated from outside of plan view. |
|
Deletes in plan view the feedback of the dragged items.
|
|
Toggles bold style of texts in selected items.
|
|
Toggles italic style of texts in selected items.
|
|
toggleItemSelection(item)
Toggles the selection of the given
item . |
|
toggleMagnetism(magnetismToggled)
Toggles temporary magnetism feature of user preferences.
|
|
Toggles the viewability of the selected level.
|
|
Unlocks home base plan.
|
|
updateEditableProperty(editableProperty, value)
Updates an editable property with the entered
value . |
|
Returns
true if alignment was activated at last mouse press. |
|
Returns
true if duplication was activated at last mouse press. |
|
Returns
true if magnetism was toggled at last mouse press. |
|
Returns
true if shift key was down at last mouse press. |
|
zoom(factor)
Processes a zoom event.
|
- Methods borrowed from class FurnitureController:
- addFurnitureToGroup, alignSelectedFurnitureOnBackSide, alignSelectedFurnitureOnBottom, alignSelectedFurnitureOnFrontSide, alignSelectedFurnitureOnLeft, alignSelectedFurnitureOnLeftSide, alignSelectedFurnitureOnRight, alignSelectedFurnitureOnRightSide, alignSelectedFurnitureOnTop, alignSelectedFurnitureSideBySide, createHomeFurnitureGroup, createHomePieceOfFurniture, deleteFurniture, distributeSelectedFurniture, distributeSelectedFurnitureHorizontally, distributeSelectedFurnitureVertically, getFurnitureInSameGroup, groupSelectedFurniture, importFurniture, isPieceOfFurnitureDeletable, isPieceOfFurnitureMovable, isPieceOfFurniturePartOfBasePlan, isPieceOfFurnitureVisibleAtSelectedLevel, modifySelectedFurniture, moveSelectedFurnitureBefore, resetFurnitureElevation, setFurnitureVisibleProperties, setFurnitureVisiblePropertyNames, setHomeProperty, setSelectedFurniture, setVisualProperty, sortFurniture, toggleFurnitureSort, toggleFurnitureSortOrder, toggleFurnitureVisibleProperty, toggleSelectedFurnitureVisibility, ungroupSelectedFurniture
Class Detail
PlanController(home, preferences, viewFactory, contentManager, undoSupport)
Creates the controller of plan view.
Author: Emmanuel Puybaret.
Author: Emmanuel Puybaret.
- Parameters:
- {Home} home
- the home plan edited by this controller and its view
- {UserPreferences} preferences
- the preferences of the application
- {Object} viewFactory
- a factory able to create the plan view managed by this controller
- {Object} contentManager
- a content manager used to import furniture
- {javax.swing.undo.UndoableEditSupport} undoSupport
- undo support to post changes on plan by this controller
Method Detail
addDimensionLines(dimensionLines)
Add
dimensionLines
to home and post an undoable new dimension line operation.
- Parameters:
- {DimensionLine[]} dimensionLines
addItems(items)
Adds
items
to home and post an undoable operation.
- Parameters:
- {? extends com.eteks.sweethome3d.model.Selectable[]} items
addLabels(labels)
Add
labels
to home and post an undoable new label operation.
- Parameters:
- {Label[]} labels
addLevelAtSameElevation()
Controls the creation of a new level at same elevation.
addPointToSelectedRoom(x, y)
Adds a point to the selected room at the given coordinates and posts an undoable operation.
- Parameters:
- {number} x
- {number} y
addPolylines(polylines)
Adds
polylines
to home and posts an undoable new polyline line operation.
- Parameters:
- {Polyline[]} polylines
addPropertyChangeListener(property, listener)
Adds the property change
listener
in parameter to this controller.
- Parameters:
- {string} property
- {PropertyChangeListener} listener
addRooms(rooms)
Add
newRooms
to home and post an undoable new room line operation.
- Parameters:
- {Room[]} rooms
addWalls(walls)
Adds
walls
to home and post an undoable new wall operation.
- Parameters:
- {Wall[]} walls
adjustMagnetizedPieceOfFurniture(piece, x, 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.
- Parameters:
- {HomePieceOfFurniture} piece
- {number} x
- {number} y
{DimensionLine}
createDimensionLine(xStart, yStart, xEnd, yEnd, offset)
Returns a new dimension instance joining (
xStart
,
yStart
) and (xEnd
, yEnd
) points.
The new dimension line is added to home.
- Parameters:
- {number} xStart
- {number} yStart
- {number} xEnd
- {number} yEnd
- {number} offset
- Returns:
- {DimensionLine}
createLabel(x, y)
Creates a new label using its controller.
- Parameters:
- {number} x
- {number} y
{Level}
createLevel(name, elevation, floorThickness, height)
Returns a new level added to home.
- Parameters:
- {string} name
- {number} elevation
- {number} floorThickness
- {number} height
- Returns:
- {Level}
{Polyline}
createPolyline(polylinePoints)
Returns a new polyline instance with the given points.
The new polyline is added to home.
- Parameters:
- {float[][]} polylinePoints
- Returns:
- {Polyline}
{Room}
createRoom(roomPoints)
Returns a new room instance with the given points.
The new room is added to home.
- Parameters:
- {float[][]} roomPoints
- Returns:
- {Room}
{Wall}
createWall(xStart, yStart, xEnd, yEnd, wallStartAtStart, 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
.
- Parameters:
- {number} xStart
- {number} yStart
- {number} xEnd
- {number} yEnd
- {Wall} wallStartAtStart
- {Wall} wallEndAtStart
- Returns:
- {Wall}
decreaseTextSize()
Decrease the size of texts in selected items.
deleteItems(items)
Deletes
items
in plan and record it as an undoable operation.
- Parameters:
- {? extends com.eteks.sweethome3d.model.Selectable[]} items
deletePointFromSelectedRoom(x, y)
Deletes the point of the selected room at the given coordinates and posts an undoable operation.
- Parameters:
- {number} x
- {number} y
deleteSelectedLevel()
Deletes the selected level and the items that belongs to it.
deleteSelection()
Deletes the selection in home.
escape()
Escapes of current action.
flipHorizontally()
Flips horizontally selected objects.
flipItem(item, itemTextBaseOffsets, offsetIndex, axisCoordinate, horizontalFlip, flippedItems)
Flips the given
item
with the given axis coordinate.
- Parameters:
- {Object} item
- the item to flip
- {float[]} itemTextBaseOffsets
- base offset for the texts of the item
- {number} offsetIndex
- index to get the first text base offset of item
- {number} axisCoordinate
- the coordinate of the symmetry axis
- {boolean} horizontalFlip
- if
true
the item should be flipped horizontally otherwise vertically - {*[]} flippedItems
- list of all the items that must be flipped
flipVertically()
Flips vertically selected objects.
{PlanController.ControllerState}
getCameraElevationState()
Returns the camera elevation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getCameraPitchRotationState()
Returns the camera pitch rotation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getCameraYawRotationState()
Returns the camera yaw rotation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getCompassResizeState()
Returns the compass resize state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getCompassRotationState()
Returns the compass rotation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getDimensionLineCreationState()
Returns the dimension line creation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getDimensionLineDrawingState()
Returns the dimension line drawing state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getDimensionLineElevationState()
Returns the dimension line elevation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getDimensionLineOffsetState()
Returns the dimension line offset state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getDimensionLinePitchRotationState()
Returns the dimension line rotation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getDimensionLineResizeState()
Returns the dimension line resize state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getDragAndDropState()
Returns the drag and drop state.
- Returns:
- {PlanController.ControllerState}
{Object}
getHorizontalRulerView()
Returns the horizontal ruler of the plan view.
- Returns:
- {Object}
{PlanController.ControllerState}
getLabelCreationState()
Returns the label creation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getLabelElevationState()
Returns the label elevation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getLabelRotationState()
Returns the label rotation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getLightPowerModificationState()
Returns the light power modification state.
- Returns:
- {PlanController.ControllerState}
{number}
getMaximumScale()
Returns the maximum scale of the plan view.
- Returns:
- {number}
{number}
getMinimumScale()
Returns the minimum scale of the plan view.
- Returns:
- {number}
{PlanController.Mode}
getMode()
Returns the active mode of this controller.
- Returns:
- {PlanController.Mode}
{PlanController.ControllerState}
getPanningState()
Returns the panning state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getPieceOfFurnitureElevationState()
Returns the piece elevation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getPieceOfFurnitureHeightState()
Returns the piece height state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getPieceOfFurnitureNameOffsetState()
Returns the piece name offset state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getPieceOfFurnitureNameRotationState()
Returns the piece name rotation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getPieceOfFurniturePitchRotationState()
Returns the piece pitch rotation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getPieceOfFurnitureResizeState()
Returns the piece resize state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getPieceOfFurnitureRollRotationState()
Returns the piece roll rotation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getPieceOfFurnitureRotationState()
Returns the piece rotation state.
- Returns:
- {PlanController.ControllerState}
{View.PointerType}
getPointerTypeLastMousePress()
Returns the pointer type used at the last mouse press.
- Returns:
- {View.PointerType}
{PlanController.ControllerState}
getPolylineCreationState()
Returns the polyline creation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getPolylineDrawingState()
Returns the polyline drawing state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getPolylineResizeState()
Returns the polyline resize state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getRectangleSelectionState()
Returns the rectangle selection state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getRoomAreaOffsetState()
Returns the room area offset state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getRoomAreaRotationState()
Returns the room area rotation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getRoomCreationState()
Returns the room creation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getRoomDrawingState()
Returns the room drawing state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getRoomNameOffsetState()
Returns the room name offset state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getRoomNameRotationState()
Returns the room name rotation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getRoomResizeState()
Returns the room resize state.
- Returns:
- {PlanController.ControllerState}
{number}
getScale()
Returns the scale in plan view.
- Returns:
- {number}
{*[]}
getSelectableItemsIntersectingRectangle(x0, y0, x1, y1)
Returns the items that intersects with the rectangle of (
x0
,
y0
), (x1
, y1
) opposite corners.
- Parameters:
- {number} x0
- {number} y0
- {number} x1
- {number} y1
- Returns:
- {*[]}
{PlanController.ControllerState}
getSelectionMoveState()
Returns the selection move state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getSelectionState()
Returns the selection state.
- Returns:
- {PlanController.ControllerState}
{Object}
getVerticalRulerView()
Returns the vertical ruler of the plan view.
- Returns:
- {Object}
{Object}
getView()
Returns the view associated with this controller.
- Returns:
- {Object}
{PlanController.ControllerState}
getWallArcExtentState()
Returns the wall arc extent state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getWallCreationState()
Returns the wall creation state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getWallDrawingState()
Returns the wall drawing state.
- Returns:
- {PlanController.ControllerState}
{PlanController.ControllerState}
getWallResizeState()
Returns the wall resize state.
- Returns:
- {PlanController.ControllerState}
{number}
getXLastMouseMove()
Returns the abscissa of mouse position at last mouse move.
- Returns:
- {number}
{number}
getXLastMousePress()
Returns the abscissa of mouse position at last mouse press.
- Returns:
- {number}
{number}
getYLastMouseMove()
Returns the ordinate of mouse position at last mouse move.
- Returns:
- {number}
{number}
getYLastMousePress()
Returns the ordinate of mouse position at last mouse press.
- Returns:
- {number}
increaseTextSize()
Increase the size of texts in selected items.
{boolean}
isBasePlanModificationState()
Returns
true
if the interactions in the current mode may modify
the base plan of a home.
- Returns:
- {boolean}
{boolean}
isFeedbackDisplayed()
Returns
true
if this view accepts to display requested feedback.
- Returns:
- {boolean}
{boolean}
isItemDeletable(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
{@linkplain #isPieceOfFurnitureDeletable(HomePieceOfFurniture) deletable piece of furniture}.
- Parameters:
- {Object} item
- Returns:
- {boolean}
{boolean}
isItemMovable(item)
Returns
true
if the given item
may be moved
in the plan. Default implementation returns true
.
- Parameters:
- {Object} item
- Returns:
- {boolean}
{boolean}
isItemPartOfBasePlan(item)
Returns
true
it the given item
belongs
to the base plan.
- Parameters:
- {Object} item
- Returns:
- {boolean}
{boolean}
isItemResizable(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.
- Parameters:
- {Object} item
- Returns:
- {boolean}
{boolean}
isModificationState()
Returns
true
if the interactions in the current mode may modify
the state of a home.
- Returns:
- {boolean}
{boolean}
isRoomPointDeletableAt(room, x, y)
Returns
true
if the given point can be removed from the room
.
- Parameters:
- {Room} room
- {number} x
- {number} y
- Returns:
- {boolean}
{boolean}
isRoomPointsComputableAt(room, x, y)
Returns
true
if the room
can be recomputed at the given coordinates.
- Parameters:
- {Room} room
- {number} x
- {number} y
- Returns:
- {boolean}
joinSelectedWalls()
Controls how selected walls are joined.
lockBasePlan()
Locks home base plan.
modifyCompass()
Controls the modification of the compass.
modifyObserverCamera()
Controls the modification of the observer camera.
modifySelectedDimensionLines()
Controls the modification of the selected labels.
modifySelectedItem()
Controls the modification of the item selected in plan.
modifySelectedLabels()
Controls the modification of the selected labels.
modifySelectedPolylines()
Controls the modification of the selected polylines.
modifySelectedRooms()
Controls the modification of the selected rooms.
modifySelectedWalls()
Controls the modification of selected walls.
moveItems(items, dx, dy)
Moves
items
of (dx
, dy
) units.
- Parameters:
- {? extends com.eteks.sweethome3d.model.Selectable[]} items
- {number} dx
- {number} dy
moveMouse(x, y)
Processes a mouse button moved event.
- Parameters:
- {number} x
- {number} y
moveSelection(dx, dy)
Moves the selection of (
dx
,dy
) in home.
- Parameters:
- {number} dx
- {number} dy
pressMouse(x, y, clickCount, shiftDown, alignmentActivated, duplicationActivated, magnetismToggled, pointerType)
Processes a mouse button pressed event.
- Parameters:
- {number} x
- {number} y
- {number} clickCount
- {boolean} shiftDown
- {boolean} alignmentActivated
- {boolean} duplicationActivated
- {boolean} magnetismToggled
- {View.PointerType} pointerType
recomputeSelectedRoomPoints(x, y)
Controls the recomputation of the points of the selected room at the given coordinates.
- Parameters:
- {number} x
- {number} y
releaseMouse(x, y)
Processes a mouse button released event.
- Parameters:
- {number} x
- {number} y
removePropertyChangeListener(property, listener)
Removes the property change
listener
in parameter from this controller.
- Parameters:
- {string} property
- {PropertyChangeListener} listener
reverseSelectedWallsDirection()
Controls the direction reverse of selected walls.
selectAll()
Selects all visible items in the selected level of home.
selectAllAtAllLevels()
Selects all visible items in all levels of home.
selectItem(item)
Selects the given
item
.
- Parameters:
- {Object} item
setAlignmentActivated(alignmentActivated)
Activates or deactivates alignment feature.
- Parameters:
- {boolean} alignmentActivated
- if
true
then alignment is active.
setAllLevelsViewable()
Makes all levels viewable.
setDuplicationActivated(duplicationActivated)
Activates or deactivates duplication feature.
- Parameters:
- {boolean} duplicationActivated
- if
true
then duplication is active.
setEditionActivated(editionActivated)
Activates or deactivates edition.
- Parameters:
- {boolean} editionActivated
- if
true
then edition is active
setFeedbackDisplayed(displayed)
Sets whether requested feedback should be displayed in the view or not.
- Parameters:
- {boolean} displayed
setMode(mode)
Sets the active mode of this controller and fires a
PropertyChangeEvent
.
- Parameters:
- {PlanController.Mode} mode
setScale(scale)
Controls the scale in plan view and and fires a
PropertyChangeEvent
.
- Parameters:
- {number} scale
setSelectedLevel(level)
Sets the selected level in home.
- Parameters:
- {Level} level
setSelectedLevelOnlyViewable()
Makes the selected level the only viewable one.
setState(state)
Changes current state of controller.
- Parameters:
- {PlanController.ControllerState} state
splitSelectedWall()
Controls the split of the selected wall in two joined walls of equal length.
startDraggedItems(draggedItems, x, y)
Displays in plan view the feedback of
draggedItems
,
during a drag and drop operation initiated from outside of plan view.
- Parameters:
- {*[]} draggedItems
- {number} x
- {number} y
stopDraggedItems()
Deletes in plan view the feedback of the dragged items.
toggleBoldStyle()
Toggles bold style of texts in selected items.
toggleItalicStyle()
Toggles italic style of texts in selected items.
toggleItemSelection(item)
Toggles the selection of the given
item
.
- Parameters:
- {Object} item
toggleMagnetism(magnetismToggled)
Toggles temporary magnetism feature of user preferences.
- Parameters:
- {boolean} magnetismToggled
- if
true
then magnetism feature is toggled.
toggleSelectedLevelViewability()
Toggles the viewability of the selected level.
unlockBasePlan()
Unlocks home base plan.
updateEditableProperty(editableProperty, value)
Updates an editable property with the entered
value
.
- Parameters:
- {string} editableProperty
- {Object} value
{boolean}
wasAlignmentActivatedLastMousePress()
Returns
true
if alignment was activated at last mouse press.
- Returns:
- {boolean}
{boolean}
wasDuplicationActivatedLastMousePress()
Returns
true
if duplication was activated at last mouse press.
- Returns:
- {boolean}
{boolean}
wasMagnetismToggledLastMousePress()
Returns
true
if magnetism was toggled at last mouse press.
- Returns:
- {boolean}
{boolean}
wasShiftDownLastMousePress()
Returns
true
if shift key was down at last mouse press.
- Returns:
- {boolean}
zoom(factor)
Processes a zoom event.
- Parameters:
- {number} factor