![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Apr 2009
Posts: 13
![]() |
Hi,
is there anyway to override the View Control Actions in a easy way? I just want to pan/zoom/rotate only when the CTRL Key is pressed. I tried but i could get the dessired behaviour. is there a easy way to do it like. ....... ? class MyViewInputHandler extends ViewInputHandler { protected void handleMouseDragged(MouseEvent e) { if((e.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) != 0) return; if ((e.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) != 0) { this.handleMouseRotate(e); } else if ((e.getModifiersEx() & MouseEvent.BUTTON2_DOWN_MASK) != 0) { this.handleMouseZoom(e); } else if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) != 0) { this.handleMousePan(e); } } } ============================= myworld.setInputHandler(new MyViewInputHandler()); |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Mar 2009
Posts: 27
![]() |
You could try making a class similar to AWTInputHandler that uses your own version of the ViewInputHandler class and then change the worldwind.properties file to have a reference to your AWTInputHandler
Code:
gov.nasa.worldwind.avkey.InputHandlerClassName=src.myco.myapp.awt.MyAWTInputHandler |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Label control | coloradokid | WorldWind XML | 1 | 06-03-2009 03:16 AM |
| Inserting control points in a Polyline by mouse | WindRider | Development Help | 11 | 05-30-2009 08:38 AM |
| Trouble creating mouse events on WorldWindowGLCanvas control | nigel25840 | Development Help | 1 | 12-30-2008 09:53 PM |
| Can't connect to servers | hroo772 | Technical Support | 11 | 02-12-2005 01:19 AM |
| Layer Control Questions | Robert11 | WorldWind General | 1 | 01-12-2005 01:34 PM |