Re: how to get selected drawing to another swing interface
by Puybaret » Mon Jun 06, 2011 6:54 am
getHome method is coming from
com.eteks.sweethome3d.plugin.Plugin class from which
VolumePlugin class inherits. If you look at
VolumePlugin source code, you'll see that
VolumeAction is an inner class that's why it can access to this method available in its
VolumePlugin outer class. So, I guess you just defined
VolumeAction class in a separate file and not as an inner class. It's not a problem but then, you'll have to store in the
VolumeAction class a link to a
VolumePlugin instance to access its
getHome method.
The current selection in the plan is returned by the
getSelectedItems method in
Home class. This method returns a list of
Selectable objects, and you can test the class of each object to know whether it's a piece of furniture, a wall...
Good luck for your project. It sounds interesting! [:)]