|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: how to get selected drawing to another swing interface » » » » Post: Re: how to get selected drawing to another swing interface |
Print at Dec 20, 2025, 5:24:21 PM |
| Posted by Puybaret at Jun 6, 2011, 6:54:01 AM |
|
Re: how to get selected drawing to another swing interface 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! ![]() ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
|
|
Current timezone is GMT Dec 20, 2025, 5:24:21 PM |