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 233296 - Patch for: InputBindings should support selection of mouse button for PanAction
Summary: Patch for: InputBindings should support selection of mouse button for PanAction
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Graph (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords: API_REVIEW_FAST, NETFIX
Depends on:
Blocks:
 
Reported: 2013-07-24 09:30 UTC by František Mantlík
Modified: 2013-08-14 13:55 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed changes in the Visual API module (4.00 KB, patch)
2013-07-24 09:37 UTC, František Mantlík
Details | Diff
Proposed changes in the Visual API module (corrected) (3.95 KB, patch)
2013-07-24 09:42 UTC, František Mantlík
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description František Mantlík 2013-07-24 09:30:38 UTC
Proposed patch provides support for selection of mouse button used in PanAction in Visual Library API. The proposed implementation provides default MouseEvent.BUTTON2, i.e. mouse wheel, which is compatible with current feature.

Usage example:
=============

scene.getActions().addAction(ActionFactory.createPanAction());
scene.getInputBindings().setPanActionButton(MouseEvent.BUTTON1);

The above peace of code creates an action to pan scene inside a scroll pane with left mouse button pressed instead of the default, i.e. mouse wheel pressed.

Use case:
========
Many GIS and similar applications (at least for Windows) use left mouse button for pan action. Proposed change provides simple means for creation of applications with similar user experience without a need of rewriting the pan action.
Comment 1 František Mantlík 2013-07-24 09:37:37 UTC
Created attachment 137677 [details]
Proposed changes in the Visual API module
Comment 2 František Mantlík 2013-07-24 09:42:30 UTC
Created attachment 137678 [details]
Proposed changes in the Visual API module (corrected)
Comment 3 Jaroslav Havlin 2013-08-13 14:43:49 UTC
The patch looks fine to me. Thank you very much for providing it.

If there are no objections, I'll integrate it tomorrow.
Comment 4 Jaroslav Havlin 2013-08-14 13:55:40 UTC
Integrated as http://hg.netbeans.org/core-main/rev/74736186d55d
Thank you for reviewing.