public class PlanController extends FurnitureController implements Controller
Modifier and Type | Class and Description |
---|---|
protected static class |
PlanController.ControllerState
Controller state classes super class.
|
protected static class |
PlanController.ControllerStateDecorator
A decorator on controller state, useful to change the behavior of an existing state.
|
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 and Description |
---|
PlanController(Home home,
UserPreferences preferences,
ViewFactory viewFactory,
ContentManager contentManager,
javax.swing.undo.UndoableEditSupport undoSupport)
Creates the controller of plan view.
|
Modifier and Type | Method and Description |
---|---|
void |
addDimensionLines(java.util.List<DimensionLine> dimensionLines)
Add
dimensionLines to home and post an undoable new dimension line operation. |
void |
addFurniture(java.util.List<HomePieceOfFurniture> furniture)
Adds furniture to home and updates door and window flags if they intersect with walls and magnetism is enabled.
|
void |
addItems(java.util.List<? extends Selectable> items)
Adds
items to home and post an undoable operation. |
void |
addLabels(java.util.List<Label> labels)
Add
labels to home and post an undoable new label operation. |
void |
addLevel()
Controls the creation of a new level.
|
void |
addLevelAtSameElevation()
Controls the creation of a new level at same elevation.
|
void |
addPointToSelectedRoom(float x,
float y)
Adds a point to the selected room at the given coordinates and posts an undoable operation.
|
void |
addPolylines(java.util.List<Polyline> polylines)
Adds
polylines to home and posts an undoable new polyline line operation. |
void |
addPropertyChangeListener(PlanController.Property property,
java.beans.PropertyChangeListener listener)
Adds the property change
listener in parameter to this controller. |
void |
addRooms(java.util.List<Room> rooms)
Add
newRooms to home and post an undoable new room line operation. |
void |
addWalls(java.util.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 void |
createDimensionLine(float x,
float y)
Creates a new dimension line using its controller.
|
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 void |
createLabel(float x,
float y)
Creates a new label using its controller.
|
protected Level |
createLevel(java.lang.String name,
float elevation,
float floorThickness,
float height)
Returns a new level added to home.
|
protected Polyline |
createPolyline(float[][] polylinePoints)
Returns a new polyline instance with the given points.
|
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(java.util.List<? extends Selectable> items)
Deletes
items in plan and record it as an undoable operation. |
void |
deletePointFromSelectedRoom(float x,
float y)
Deletes the point of the selected room at the given coordinates and posts 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.
|
void |
flipHorizontally()
Flips horizontally selected objects.
|
protected void |
flipItem(Selectable item,
float[] itemTextBaseOffsets,
int offsetIndex,
float axisCoordinate,
boolean horizontalFlip,
java.util.List<Selectable> flippedItems)
Flips the given
item with the given axis coordinate. |
void |
flipVertically()
Flips vertically selected objects.
|
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.
|
PlanController.ControllerState |
getDimensionLineElevationState()
Returns the dimension line elevation state.
|
protected PlanController.ControllerState |
getDimensionLineOffsetState()
Returns the dimension line offset state.
|
PlanController.ControllerState |
getDimensionLinePitchRotationState()
Returns the dimension line rotation 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 |
getLabelElevationState()
Returns the label elevation 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 |
getPieceOfFurniturePitchRotationState()
Returns the piece pitch rotation state.
|
protected PlanController.ControllerState |
getPieceOfFurnitureResizeState()
Returns the piece resize state.
|
protected PlanController.ControllerState |
getPieceOfFurnitureRollRotationState()
Returns the piece roll rotation state.
|
protected PlanController.ControllerState |
getPieceOfFurnitureRotationState()
Returns the piece rotation state.
|
protected View.PointerType |
getPointerTypeLastMousePress()
Returns the pointer type used at the last mouse press.
|
protected PlanController.ControllerState |
getPolylineCreationState()
Returns the polyline creation state.
|
protected PlanController.ControllerState |
getPolylineDrawingState()
Returns the polyline drawing state.
|
protected PlanController.ControllerState |
getPolylineResizeState()
Returns the polyline resize 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. |
java.util.List<Selectable> |
getSelectableItemsAt(float x,
float y)
Returns the selectable items at (
x , y ) point. |
protected java.util.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 |
getWallArcExtentState()
Returns the wall arc extent state.
|
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.
|
boolean |
isBasePlanModificationState()
Returns
true if the interactions in the current mode may modify
the base plan of a home. |
boolean |
isFeedbackDisplayed()
Returns
true if this view accepts to display requested feedback. |
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. |
boolean |
isRoomPointDeletableAt(Room room,
float x,
float y)
Returns
true if the given point can be removed from the room . |
boolean |
isRoomPointsComputableAt(Room room,
float x,
float y)
Returns
true if the room can be recomputed at the given coordinates. |
void |
joinSelectedWalls()
Controls how selected walls are joined.
|
void |
lockBasePlan()
Locks home base plan.
|
void |
modifyCompass()
Controls the modification of the compass.
|
void |
modifyObserverCamera()
Controls the modification of the observer camera.
|
void |
modifySelectedDimensionLines()
Controls the modification of the selected labels.
|
void |
modifySelectedItem()
Controls the modification of the item selected in plan.
|
void |
modifySelectedLabels()
Controls the modification of the selected labels.
|
void |
modifySelectedLevel() |
void |
modifySelectedPolylines()
Controls the modification of the selected polylines.
|
void |
modifySelectedRooms()
Controls the modification of the selected rooms.
|
void |
modifySelectedWalls()
Controls the modification of selected walls.
|
void |
moveItems(java.util.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 |
pressMouse(float x,
float y,
int clickCount,
boolean shiftDown,
boolean alignmentActivated,
boolean duplicationActivated,
boolean magnetismToggled,
View.PointerType pointerType)
Processes a mouse button pressed event.
|
void |
recomputeSelectedRoomPoints(float x,
float y)
Controls the recomputation of the points of the selected room at the given coordinates.
|
void |
releaseMouse(float x,
float y)
Processes a mouse button released event.
|
void |
removePropertyChangeListener(PlanController.Property property,
java.beans.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.
|
void |
selectAllAtAllLevels()
Selects all visible items in all levels of home.
|
protected void |
selectAndShowItems(java.util.List<? extends Selectable> items)
Selects
items and make them visible at screen. |
void |
selectItem(Selectable item)
Selects the given
item . |
protected void |
selectItems(java.util.List<? extends Selectable> items)
Selects
items . |
void |
setAlignmentActivated(boolean alignmentActivated)
Activates or deactivates alignment feature.
|
void |
setAllLevelsViewable()
Makes all levels viewable.
|
void |
setDuplicationActivated(boolean duplicationActivated)
Activates or deactivates duplication feature.
|
void |
setEditionActivated(boolean editionActivated)
Activates or deactivates edition.
|
void |
setFeedbackDisplayed(boolean displayed)
Sets whether requested feedback should be displayed in the view or not.
|
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.
|
void |
setSelectedLevelOnlyViewable()
Makes the selected level the only viewable one.
|
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(java.util.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 |
toggleItemSelection(Selectable item)
Toggles the selection of the given
item . |
void |
toggleMagnetism(boolean magnetismToggled)
Toggles temporary magnetism feature of user preferences.
|
void |
toggleSelectedLevelViewability()
Toggles the viewability of the selected level.
|
void |
unlockBasePlan()
Unlocks home base plan.
|
void |
updateEditableProperty(PlanController.EditableProperty editableProperty,
java.lang.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.
|
addFurniture, addFurnitureToGroup, alignSelectedFurnitureOnBackSide, alignSelectedFurnitureOnBottom, alignSelectedFurnitureOnFrontSide, alignSelectedFurnitureOnLeft, alignSelectedFurnitureOnLeftSide, alignSelectedFurnitureOnRight, alignSelectedFurnitureOnRightSide, alignSelectedFurnitureOnTop, alignSelectedFurnitureSideBySide, createHomeFurnitureGroup, createHomeFurnitureGroup, createHomePieceOfFurniture, deleteFurniture, distributeSelectedFurniture, distributeSelectedFurnitureHorizontally, distributeSelectedFurnitureVertically, getFurnitureInSameGroup, getHighestSurroundingPieceOfFurniture, getSurroundingFurniture, groupSelectedFurniture, importFurniture, importFurniture, isPieceOfFurnitureDeletable, isPieceOfFurnitureMovable, isPieceOfFurniturePartOfBasePlan, isPieceOfFurnitureVisibleAtSelectedLevel, modifySelectedFurniture, moveSelectedFurnitureBefore, resetFurnitureElevation, setFurnitureVisibleProperties, setFurnitureVisiblePropertyNames, setHomeProperty, setSelectedFurniture, setSelectedFurniture, setVisualProperty, sortFurniture, sortFurniture, toggleFurnitureSort, toggleFurnitureSort, toggleFurnitureSortOrder, toggleFurnitureVisibleProperty, toggleFurnitureVisibleProperty, toggleSelectedFurnitureVisibility, ungroupSelectedFurniture
public PlanController(Home home, UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager, javax.swing.undo.UndoableEditSupport undoSupport)
home
- the home plan edited by this controller and its viewpreferences
- the preferences of the applicationviewFactory
- a factory able to create the plan view managed by this controllercontentManager
- a content manager used to import furnitureundoSupport
- undo support to post changes on plan by this controllerpublic PlanView getView()
getView
in interface Controller
getView
in class FurnitureController
protected void setState(PlanController.ControllerState state)
public void addPropertyChangeListener(PlanController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter to this controller.public void removePropertyChangeListener(PlanController.Property property, java.beans.PropertyChangeListener listener)
listener
in parameter from this controller.public PlanController.Mode getMode()
public void setMode(PlanController.Mode mode)
PropertyChangeEvent
.public boolean isModificationState()
true
if the interactions in the current mode may modify
the state of a home.public boolean isBasePlanModificationState()
true
if the interactions in the current mode may modify
the base plan of a home.public void deleteSelection()
deleteSelection
in class FurnitureController
public void escape()
public void moveSelection(float dx, float dy)
dx
,dy
) in home.public void toggleMagnetism(boolean magnetismToggled)
magnetismToggled
- if true
then magnetism feature is toggled.public void setAlignmentActivated(boolean alignmentActivated)
alignmentActivated
- if true
then alignment is active.public void setDuplicationActivated(boolean duplicationActivated)
duplicationActivated
- if true
then duplication is active.public void setEditionActivated(boolean editionActivated)
editionActivated
- if true
then edition is activepublic void updateEditableProperty(PlanController.EditableProperty editableProperty, java.lang.Object value)
value
.public void pressMouse(float x, float y, int clickCount, boolean shiftDown, boolean duplicationActivated)
public void pressMouse(float x, float y, int clickCount, boolean shiftDown, boolean alignmentActivated, boolean duplicationActivated, boolean magnetismToggled)
public void pressMouse(float x, float y, int clickCount, boolean shiftDown, boolean alignmentActivated, boolean duplicationActivated, boolean magnetismToggled, View.PointerType pointerType)
public void releaseMouse(float x, float y)
public void moveMouse(float x, float y)
public void zoom(float factor)
public void setFeedbackDisplayed(boolean displayed)
public boolean isFeedbackDisplayed()
true
if this view accepts to display requested feedback.protected PlanController.ControllerState getSelectionState()
protected PlanController.ControllerState getSelectionMoveState()
protected PlanController.ControllerState getRectangleSelectionState()
protected PlanController.ControllerState getPanningState()
protected PlanController.ControllerState getDragAndDropState()
protected PlanController.ControllerState getWallCreationState()
protected PlanController.ControllerState getWallDrawingState()
protected PlanController.ControllerState getWallResizeState()
protected PlanController.ControllerState getWallArcExtentState()
protected PlanController.ControllerState getPieceOfFurnitureRotationState()
protected PlanController.ControllerState getPieceOfFurniturePitchRotationState()
protected PlanController.ControllerState getPieceOfFurnitureRollRotationState()
protected PlanController.ControllerState getPieceOfFurnitureElevationState()
protected PlanController.ControllerState getPieceOfFurnitureHeightState()
protected PlanController.ControllerState getPieceOfFurnitureResizeState()
protected PlanController.ControllerState getLightPowerModificationState()
protected PlanController.ControllerState getPieceOfFurnitureNameOffsetState()
protected PlanController.ControllerState getPieceOfFurnitureNameRotationState()
protected PlanController.ControllerState getCameraYawRotationState()
protected PlanController.ControllerState getCameraPitchRotationState()
protected PlanController.ControllerState getCameraElevationState()
protected PlanController.ControllerState getDimensionLineCreationState()
protected PlanController.ControllerState getDimensionLineDrawingState()
protected PlanController.ControllerState getDimensionLineResizeState()
protected PlanController.ControllerState getDimensionLineOffsetState()
public PlanController.ControllerState getDimensionLinePitchRotationState()
public PlanController.ControllerState getDimensionLineElevationState()
protected PlanController.ControllerState getRoomCreationState()
protected PlanController.ControllerState getRoomDrawingState()
protected PlanController.ControllerState getRoomResizeState()
protected PlanController.ControllerState getRoomAreaOffsetState()
protected PlanController.ControllerState getRoomAreaRotationState()
protected PlanController.ControllerState getRoomNameOffsetState()
protected PlanController.ControllerState getRoomNameRotationState()
protected PlanController.ControllerState getPolylineCreationState()
protected PlanController.ControllerState getPolylineDrawingState()
protected PlanController.ControllerState getPolylineResizeState()
protected PlanController.ControllerState getLabelCreationState()
protected PlanController.ControllerState getLabelRotationState()
protected PlanController.ControllerState getLabelElevationState()
protected PlanController.ControllerState getCompassRotationState()
protected PlanController.ControllerState getCompassResizeState()
protected float getXLastMousePress()
protected float getYLastMousePress()
protected boolean wasShiftDownLastMousePress()
true
if shift key was down at last mouse press.protected boolean wasMagnetismToggledLastMousePress()
true
if magnetism was toggled at last mouse press.protected boolean wasAlignmentActivatedLastMousePress()
true
if alignment was activated at last mouse press.protected boolean wasDuplicationActivatedLastMousePress()
true
if duplication was activated at last mouse press.protected View.PointerType getPointerTypeLastMousePress()
protected float getXLastMouseMove()
protected float getYLastMouseMove()
public void modifySelectedItem()
public void modifySelectedWalls()
public void lockBasePlan()
protected boolean isItemPartOfBasePlan(Selectable item)
true
it the given item
belongs
to the base plan.public void unlockBasePlan()
protected boolean isItemMovable(Selectable item)
true
if the given item
may be moved
in the plan. Default implementation returns true
.protected boolean isItemResizable(Selectable item)
true
if the given item
may be resized.
Default implementation returns false
if the given item
is a non resizable piece of furniture.protected boolean isItemDeletable(Selectable item)
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.public void flipHorizontally()
public void flipVertically()
protected void flipItem(Selectable item, float[] itemTextBaseOffsets, int offsetIndex, float axisCoordinate, boolean horizontalFlip, java.util.List<Selectable> flippedItems)
item
with the given axis coordinate.item
- the item to flipitemTextBaseOffsets
- base offset for the texts of the itemoffsetIndex
- index to get the first text base offset of itemaxisCoordinate
- the coordinate of the symmetry axishorizontalFlip
- if true
the item should be flipped horizontally otherwise verticallyflippedItems
- list of all the items that must be flippedpublic void joinSelectedWalls()
public void reverseSelectedWallsDirection()
public void splitSelectedWall()
public void modifySelectedRooms()
protected void createDimensionLine(float x, float y)
protected void createLabel(float x, float y)
public void modifySelectedLabels()
public void modifySelectedPolylines()
public void modifySelectedDimensionLines()
public void modifyCompass()
public void modifyObserverCamera()
public void toggleBoldStyle()
public void toggleItalicStyle()
public void increaseTextSize()
public void decreaseTextSize()
public float getMinimumScale()
public float getMaximumScale()
public float getScale()
public void setScale(float scale)
PropertyChangeEvent
.public final void setSelectedLevel(Level level)
public void selectAll()
selectAll
in class FurnitureController
public void selectAllAtAllLevels()
public View getHorizontalRulerView()
public View getVerticalRulerView()
public void startDraggedItems(java.util.List<Selectable> draggedItems, float x, float y)
draggedItems
,
during a drag and drop operation initiated from outside of plan view.public void stopDraggedItems()
protected void adjustMagnetizedPieceOfFurniture(HomePieceOfFurniture piece, float x, float y)
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.public void addLevel()
public void addLevelAtSameElevation()
protected Level createLevel(java.lang.String name, float elevation, float floorThickness, float height)
public void toggleSelectedLevelViewability()
public void setSelectedLevelOnlyViewable()
public void setAllLevelsViewable()
public void modifySelectedLevel()
public void deleteSelectedLevel()
protected Wall createWall(float xStart, float yStart, float xEnd, float yEnd, Wall wallStartAtStart, Wall wallEndAtStart)
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
.protected Room createRoom(float[][] roomPoints)
public boolean isRoomPointDeletableAt(Room room, float x, float y)
true
if the given point can be removed from the room
.public void deletePointFromSelectedRoom(float x, float y)
public boolean isRoomPointsComputableAt(Room room, float x, float y)
true
if the room
can be recomputed at the given coordinates.public void recomputeSelectedRoomPoints(float x, float y)
public void addPointToSelectedRoom(float x, float y)
protected DimensionLine createDimensionLine(float xStart, float yStart, float xEnd, float yEnd, float offset)
xStart
,
yStart
) and (xEnd
, yEnd
) points.
The new dimension line is added to home.protected Polyline createPolyline(float[][] polylinePoints)
public Selectable getSelectableItemAt(float x, float y)
x
, y
) point.public java.util.List<Selectable> getSelectableItemsAt(float x, float y)
x
, y
) point.protected java.util.List<Selectable> getSelectableItemsIntersectingRectangle(float x0, float y0, float x1, float y1)
x0
,
y0
), (x1
, y1
) opposite corners.public void deleteItems(java.util.List<? extends Selectable> items)
items
in plan and record it as an undoable operation.public void moveItems(java.util.List<? extends Selectable> items, float dx, float dy)
items
of (dx
, dy
) units.protected void selectAndShowItems(java.util.List<? extends Selectable> items)
items
and make them visible at screen.protected void selectItems(java.util.List<? extends Selectable> items)
items
.public void selectItem(Selectable item)
item
.public void toggleItemSelection(Selectable item)
item
.public void addItems(java.util.List<? extends Selectable> items)
items
to home and post an undoable operation.public void addFurniture(java.util.List<HomePieceOfFurniture> furniture)
addFurniture
in class FurnitureController
furniture
- the furniture to add.public void addWalls(java.util.List<Wall> walls)
walls
to home and post an undoable new wall operation.public void addRooms(java.util.List<Room> rooms)
newRooms
to home and post an undoable new room line operation.public void addDimensionLines(java.util.List<DimensionLine> dimensionLines)
dimensionLines
to home and post an undoable new dimension line operation.public void addPolylines(java.util.List<Polyline> polylines)
polylines
to home and posts an undoable new polyline line operation.public void addLabels(java.util.List<Label> labels)
labels
to home and post an undoable new label operation.
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License