Plugin for input-output methods

This topic has been viewed 100625 times and has 2 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
User avatar
harbinger
Posts: 87
Joined: Thu Feb 27, 2014 4:48 pm
Country: Clearwater, FL, US

Plugin for input-output methods

Post by harbinger »

I think i may be able to develop a plugin to answer some of my own wishes. After looking thru the classes, i'm looking for one in particular -- the keyboard shortcuts and mouse inputs for various actions in SH3D.

What is the package i would be working with? (Is there even one that can be manipulated?)

Would a method have to be introduced to bypass the DEFAULT I/O methods and use the plugin? If not, what's the process for introducing new input processes?

For example, what if i wanted to develop a plugin for changing the mouse actions required to maneuver in the 3D window? Is it possible to do that? What would have to happen to get closer to customizable KBSCs and mouse input?
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Plugin for input-output methods

Post by Puybaret »

I don’t think you could change mouse actions from a plug-in but managing some shortcuts should be possible by changing the value associated to the ACCELERATOR_KEY key for all the Swing actions available in the program.
Menu items actions are accessible from [font=courier new]getHomeController().getView()[/font] which returns an instance of JComponent subclass to access to actions with [font=courier new]getActionMap()[/font] method.
Similarly, some actions are also defined on the plan and 3D view Swing components which are returned by [font=courier new]getHomeController().getPlanController().getView()[/font] and [font=courier new]getHomeController().getHomeController3D().getView()[/font] calls.
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
harbinger
Posts: 87
Joined: Thu Feb 27, 2014 4:48 pm
Country: Clearwater, FL, US

Re: Plugin for input-output methods

Post by harbinger »

Would you be able move the mouse input methods to a class/subclass that can be accessed from a plugin in an upcoming version? Or does Java not allow the mouse actions to be a variable, for lack of a better word?
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest