|
Sweet Home 3D 3.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.eteks.sweethome3d.viewcontroller.FurnitureController
public class FurnitureController
A MVC controller for the home furniture table.
Constructor Summary | |
---|---|
FurnitureController(Home home,
UserPreferences preferences,
ViewFactory viewFactory)
Creates the controller of home furniture view. |
|
FurnitureController(Home home,
UserPreferences preferences,
ViewFactory viewFactory,
ContentManager contentManager,
javax.swing.undo.UndoableEditSupport undoSupport)
Creates the controller of home furniture view with undo support. |
Method Summary | |
---|---|
void |
addFurniture(java.util.List<HomePieceOfFurniture> furniture)
Controls new furniture added to home. |
void |
alignSelectedFurnitureOnBottom()
Controls the alignment of selected furniture on bottom of the first selected piece. |
void |
alignSelectedFurnitureOnLeft()
Controls the alignment of selected furniture on left of the first selected piece. |
void |
alignSelectedFurnitureOnRight()
Controls the alignment of selected furniture on right of the first selected piece. |
void |
alignSelectedFurnitureOnTop()
Controls the alignment of selected furniture on top of the first selected piece. |
protected HomeFurnitureGroup |
createHomeFurnitureGroup(java.util.List<HomePieceOfFurniture> furniture)
Returns a new furniture group for the given furniture list. |
HomePieceOfFurniture |
createHomePieceOfFurniture(PieceOfFurniture piece)
Returns a new home piece of furniture created from an other given piece of furniture. |
void |
deleteFurniture(java.util.List<HomePieceOfFurniture> deletedFurniture)
Deletes the furniture of deletedFurniture from home. |
void |
deleteSelection()
Controls the deletion of the current selected furniture in home. |
View |
getView()
Returns the view associated with this controller. |
void |
groupSelectedFurniture()
Groups the selected furniture as one piece of furniture. |
void |
importFurniture()
Displays the wizard that helps to import furniture to home. |
void |
importFurniture(java.lang.String modelName)
Displays the wizard that helps to import furniture to home with a given model name. |
protected boolean |
isPieceOfFurnitureDeletable(HomePieceOfFurniture piece)
Returns true if the given piece may be deleted. |
protected boolean |
isPieceOfFurnitureMovable(HomePieceOfFurniture piece)
Returns true if the given piece may be moved. |
protected boolean |
isPieceOfFurniturePartOfBasePlan(HomePieceOfFurniture piece)
Returns true if the given piece is movable. |
void |
modifySelectedFurniture()
Controls the modification of selected furniture. |
void |
selectAll()
Selects all furniture in home. |
void |
setFurnitureVisibleProperties(java.util.List<HomePieceOfFurniture.SortableProperty> furnitureVisibleProperties)
Updates the furniture visible properties in home. |
void |
setSelectedFurniture(java.util.List<HomePieceOfFurniture> selectedFurniture)
Updates the selected furniture in home. |
void |
sortFurniture(HomePieceOfFurniture.SortableProperty furnitureProperty)
Controls the sort of the furniture in home. |
void |
toggleFurnitureSort(HomePieceOfFurniture.SortableProperty furnitureProperty)
Uses furnitureProperty to sort home furniture
or cancels home furniture sort if home is already sorted on furnitureProperty |
void |
toggleFurnitureSortOrder()
Toggles home furniture sort order. |
void |
toggleFurnitureVisibleProperty(HomePieceOfFurniture.SortableProperty furnitureProperty)
Toggles furniture property visibility in home. |
void |
toggleSelectedFurnitureVisibility()
Controls the modification of the visibility of the selected piece of furniture. |
void |
ungroupSelectedFurniture()
Ungroups the selected groups of furniture. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FurnitureController(Home home, UserPreferences preferences, ViewFactory viewFactory)
home
- the home edited by this controller and its viewpreferences
- the preferences of the applicationviewFactory
- a factory able to create the furniture view managed by this controllerpublic FurnitureController(Home home, UserPreferences preferences, ViewFactory viewFactory, ContentManager contentManager, javax.swing.undo.UndoableEditSupport undoSupport)
Method Detail |
---|
public View getView()
getView
in interface Controller
public void addFurniture(java.util.List<HomePieceOfFurniture> furniture)
furniture
- the furniture to add.public void deleteSelection()
public void deleteFurniture(java.util.List<HomePieceOfFurniture> deletedFurniture)
deletedFurniture
from home.
Once the selected furniture is deleted, undo support will receive a new undoable edit.
public void setSelectedFurniture(java.util.List<HomePieceOfFurniture> selectedFurniture)
public void selectAll()
protected boolean isPieceOfFurniturePartOfBasePlan(HomePieceOfFurniture piece)
true
if the given piece
is movable.
protected boolean isPieceOfFurnitureMovable(HomePieceOfFurniture piece)
true
if the given piece
may be moved.
Default implementation always returns true
.
protected boolean isPieceOfFurnitureDeletable(HomePieceOfFurniture piece)
true
if the given piece
may be deleted.
Default implementation always returns true
.
public HomePieceOfFurniture createHomePieceOfFurniture(PieceOfFurniture piece)
piece
of furniture.
public void toggleFurnitureSort(HomePieceOfFurniture.SortableProperty furnitureProperty)
furnitureProperty
to sort home furniture
or cancels home furniture sort if home is already sorted on furnitureProperty
furnitureProperty
- a property of HomePieceOfFurniture
class.public void toggleFurnitureSortOrder()
public void sortFurniture(HomePieceOfFurniture.SortableProperty furnitureProperty)
furnitureProperty
in ascending order. If home furniture is already
sorted on the given furnitureProperty, it will be sorted in descending
order, if the sort is in ascending order, otherwise it won't be sorted at all
and home furniture will be listed in insertion order.
- Parameters:
furnitureProperty
- the furniture property on which the view wants
to sort the furniture it displays.
public void setFurnitureVisibleProperties(java.util.List<HomePieceOfFurniture.SortableProperty> furnitureVisibleProperties)
public void toggleFurnitureVisibleProperty(HomePieceOfFurniture.SortableProperty furnitureProperty)
public void modifySelectedFurniture()
public void toggleSelectedFurnitureVisibility()
public void groupSelectedFurniture()
protected HomeFurnitureGroup createHomeFurnitureGroup(java.util.List<HomePieceOfFurniture> furniture)
public void ungroupSelectedFurniture()
public void importFurniture()
public void importFurniture(java.lang.String modelName)
public void alignSelectedFurnitureOnTop()
public void alignSelectedFurnitureOnBottom()
public void alignSelectedFurnitureOnLeft()
public void alignSelectedFurnitureOnRight()
|
Sweet Home 3D 3.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License |