This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | All zoom actions should be activated with CTRL | ||
---|---|---|---|
Product: | platform | Reporter: | Sergey Petrov <sj-nb> |
Component: | Graph | Assignee: | issues@platform <issues> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | tspiva |
Priority: | P3 | Keywords: | API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 105060 | ||
Attachments: | Patch |
Description
Sergey Petrov
2007-05-28 18:37:31 UTC
most windows applications use ctrl+wheel but it should be different for Mac OsX where CONTROL+Wheel is a desktop zoom. This is true because these programs are having Mouse-Wheel action already occupied for scrolling - they are document oriented. It visualization frameworks is on the hand Mouse-Wheel action preferred for zooming. This issue requires wider discussion with HIE team for the actions concept in NetBeans. What you can say about ability to customize behavior? Yes, it is possible to add such ability. The thing is only how to integrate the option. If it would be done traditional way, a new method (which takes the option as an parameter) would have to be introduced to each zoom action. In this case I would rather recommend to do add a well-known ability/interface that would be added to the scene lookup. This would be reusable by multiple actions without changing API (just by introducing an new interface that could be used in the lookup). It is not true that the mouse wheel is only used to scroll thru document type applications. Look at file browsers, list boxes, tables, trees, etc. In most look and feels the mouse wheel is used as a short cut to the scroll bar. It is more convenient then having to use the scrollbars. In fact there are now even mouse that allow the mouse wheel to move left to right. This movement is used to control the horizontal scroll bars. Both Mac and Windows can suooort these mice. The Mac makes heavy use of this feature. In fact on the Mac 1.6 JVM implements this feature to scroll the horizontal scroll bars. I think to override the mouse wheel to mean zoom is not the correct approach. It would be nice if this could be preference driven. I should be put into the keybinding section. Probably you are right that the middle-button is primarily used for scrolling. The problem is that the API and behaviour ... has to be backward compatible. So the only way to improve the current situation is to introduce an option for key-modifier of zoom action with "none" as default value. It is good idea to introduce InputActionProperties class which contains key/mouse options. This key-modifier of the zoom action could be one of them. Also this class may be used even for key-modifier option for ExtendedConnectAction. The problem here is what is backward compatable for the graph library is not backward compatable for UML. In UML we used the scroll wheel to control the vertical scroll bar. Since neither choose is going to be backward compatable with everyone, I feel that we should use scroll wheel to control the scroll bar. I feel this way because it does not change the behavior of the scroll wheel for the swing look and feel, and most operating systems (I say most because I do not know how Solaris handles the mouse wheel). Regarding the change of the default key-modifier to "Ctrl": This change of default behavior would be backward-incompatible for the library. If there would be a new factory method for creating ZoomActionWithCtrlModifier actions, then you would have a possibility to use it and your application will be backward-compatible even for UML or others who used Ctrl key-modifier. A discussion about this issue has been announced on the mailing list: http://graph.netbeans.org/servlets/ReadMsg?list=users&msgNo=679 Hi, I agree with sergeyp: wheel without modificators is used for document scrolling in most places. This is a common user idiom. The Visual Library should adhere to that idiom. I propose changing everything so that the wheel means scrolling and ctrl+wheel (or any other proposal) means zoom. The change would be backwards-incompatible. If someone needs the previous behaviour then they should change the code. I personally wouldn't mind doing that: my users would be most happy with the change. Cheers, Antonio Oki. The issue will be solved by: Creating a InputBinding class that could be set to a Scene. The InputBinding will contain: setZoomActionModifier method. By default it will be set to "Ctrl" key. The InputBinding class is there for extensibility reason since I am expecting other input-modifiers and key-bindings to come in the future. I will attach the patch ASAP. Created attachment 43231 [details]
Patch
The patch contains an API change necessary for allowing customization of modifier of zoom actions (InputBindings class). The change also contains the modification of default modifier of zoom actions. Now it is Ctrl key (previously there was no modifier used). This is incompatible change of behaviour. Anyway asking for fast api review since the change has be already discussed. Committed in the main trunk. |