US
Joined: Feb 27, 2014
Post Count: 87
Status:
Offline
Plugin for input-output methods
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?
France
Joined: Nov 7, 2005
Post Count: 9423
Status:
Offline
Re: Plugin for input-output methods
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 getHomeController().getView() which returns an instance of JComponent subclass to access to actions with getActionMap() method. Similarly, some actions are also defined on the plan and 3D view Swing components which are returned by getHomeController().getPlanController().getView() and getHomeController().getHomeController3D().getView() calls.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
US
Joined: Feb 27, 2014
Post Count: 87
Status:
Offline
Re: Plugin for input-output methods
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?