office-landscape drawing applet. tough one?
Hello almighty guru's!
I'm creating a Java applet that is going to be an build-it-yourself office-landscape.
The applet will have a "draft view" where the user can define their workspace by length and height and draw a sketch of their location. The sketch consists of objects like walls,
windows and doors. Different objects can be placed on the sketch by selecting them from an object pane.
In addition, the applet will have a "design view" where user can select the items and place them on the workspace. Items such as chairs, tables, PC's, etc (stuff that belongs in an office). All items are to be dragged and dropped from an object pane on the left side.
Items can be scaled, rotated, inverted, duplicated, etc. when placed on the workspace.
A "toolbox pane" will exist to enable the user to perform the various functions on an object.
A "propterites pane" will exist where the user can set the properties of each individual object that has been added to the workspace.
Items are typically image files loaded from the disk.
Any suggestions on good ways of implementing this system would be highly appreciated.
This is how I was thinking of doing it
======================================
- the "draft view" (workspace, ground level, floor) is a class implementing JPanel(ImageIcon?), where lines etc. can be drawn (lines reprecenting walls from above of course).
- I will need some way of keeping track of the objects that has been dragged onto the workspace (doors, windows). An array of objects within the class?
- the object pane is a class implementing JScrollpane which lists all items available
- each of the items found in the object pane should be classes (implementing ImageIcon?) - with properties (for scaling, rotation, invertion)
The "design view" would be implemented pretty much the same way, only with the "draft view"-workspace in the background and a different set of items that the user can add to the workspace (chairs, tables, etc.)
How do you guys think this applet would perform? I need to think speed/performance, since possible hundreds of "items" may exist (objects with different properties).
I have to redraw the "draft view"-workspace and the "desing view" workspace with all its objects each time a paint() is done - this will be slow?
I have browsed though many of the messages posted here before, and found some relevant ones.
Especially, "keeping track of multiple images on screen": http://forum.java.sun.com/thread.jsp?forum=20&thread=249113
.. but I need more info. I want to think this one through thourougly before I start so I don't get stuck half-ways ..
Bj鴕n B鴕resen /* hoping for some constructive feedback */ :)
PS! If my lack of english skills has managed to make something diffuse, please let me know so I can clearify.

