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.

Bug 104976 - All zoom actions should be activated with CTRL
Summary: All zoom actions should be activated with CTRL
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Graph (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@platform
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 105060
  Show dependency tree
 
Reported: 2007-05-28 18:37 UTC by Sergey Petrov
Modified: 2007-06-08 09:20 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Patch (10.14 KB, patch)
2007-06-05 10:52 UTC, David Kaspar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Petrov 2007-05-28 18:37:31 UTC
All zoom actions should be activated with CTRL or it should be possible to
configure modificators.

All tools I know have zoom on ctrl+wheel: firefox (html), picasa2 (photo),
Acrobat Reader (pdf), OpenOffice Draw (Vector images editor) and some more,
wheel without modificators is used for document scrolling or moving to/from next
documents in these applications.
Comment 1 Sergey Petrov 2007-05-28 18:39:09 UTC
most windows applications use ctrl+wheel but it should be different for Mac OsX
where CONTROL+Wheel is a desktop zoom.
Comment 2 David Kaspar 2007-05-29 09:00:25 UTC
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.
Comment 3 Sergey Petrov 2007-05-29 15:28:41 UTC
What you can say about ability to customize behavior?
Comment 4 David Kaspar 2007-05-29 16:09:42 UTC
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).
Comment 5 Trey Spiva 2007-05-30 04:19:32 UTC
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.
Comment 6 David Kaspar 2007-05-30 10:00:43 UTC
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.
Comment 7 Trey Spiva 2007-05-30 17:05:38 UTC
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).
Comment 8 David Kaspar 2007-05-31 11:21:57 UTC
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.
Comment 9 David Kaspar 2007-05-31 14:19:19 UTC
A discussion about this issue has been announced on the mailing list:
http://graph.netbeans.org/servlets/ReadMsg?list=users&msgNo=679
Comment 10 vieiro 2007-06-01 20:41:54 UTC
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

Comment 11 David Kaspar 2007-06-03 13:48:44 UTC
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.
Comment 12 David Kaspar 2007-06-05 10:52:31 UTC
Created attachment 43231 [details]
Patch
Comment 13 David Kaspar 2007-06-05 10:55:28 UTC
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.
Comment 14 David Kaspar 2007-06-08 09:20:34 UTC
Committed in the main trunk.