Mouse-wheel interaction in JViews graphs

Article ID: 2269
Last updated: 29 May, 2018
Article ID: 2269
Last updated: 29 May, 2018
Revision: 3
Views: 834
Posted: 02 Jun, 2010
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How to enable mouse-wheel interaction in JViews graphs?

Answer

In JViews, the classes IlvJScrollManagerView and IlvScrollManagerView are panels containing IlvManagerView objects and two scroll bars. The scroll bars help translate the view of the manager. However, IlvJScrollManagerView and IlvScrollManagerView do not implement the mouse-wheel scrolling feature by default.

Although JViews 6.0 and earlier does not handle the mouse wheel events, you can leverage the Java API for mouse wheel events, available since JDK 1.4 and handle mouse wheel events yourself.

In JViews 6.5 or newer, there are methods for translating the mouse wheel motion into scrolling: method setWheelScrollingEnabled in the classes IlvJScrollManagerView and IlvScrollManagerView. Similarly, there is a method for zooming as a response to mouse wheel events: method setWheelZoomingEnabled in class IlvManagerView.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2269
Last updated: 29 May, 2018
Revision: 3
Views: 834
Posted: 02 Jun, 2010 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category