World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 04-12-2012, 10:09 AM   #1
BuM
Member
 
Join Date: Jan 2012
Posts: 94
BuM is on a distinguished road
Default Fire Event for zoom change -> cannot override BasicOrbitView.setModelCoordinates()

Hi there,

I would like to be informed whenever the zoom (which seems to equal the elevation of the eyePosition for the most part) changes. However, there seems to be no Event which could be listened for.

So I want to write a subclass of BasicOrbitView, which overrides the three methods that can change the zoom setEyePosition(), setModelCoordinates(), and setZoom(), so that they fire a PropertyChangeEvent which I can listen for. Example:

Code:
@Override
public void setZoom(double zoom) {
 double oldZoom = this.zoom;
 super.setZoom(zoom);
 firePropertyChange(someZoomString, oldZoom, this.zoom);
}
Unfortunately, I cannot do the same for the method
setModelCoordinates(OrbitViewInputSuppor t.OrbitViewState modelCoords)
because OrbitViewState is a protected nested class inside OrbitViewInputSupport which I cannot access from outside the WorldWind package.

Is there any way to set OrbitViewState to public in WorldWind 1.3 or to handle this situation in another way?

Thanks!
BuM is offline   Reply With Quote
Old 04-13-2012, 03:25 AM   #2
tag
WWJ Technical Manager
 
Join Date: May 2007
Location: Seattle
Posts: 1,031
tag is on a distinguished road
Default

Done. Should be in the public repository shortly.
tag is offline   Reply With Quote
Reply

Tags
basicorbitview, listener, orbitviewinputsupport, orbitviewstate, zoom


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fire event on addRenderable? heidtmare Development Help 1 08-18-2011 09:15 AM
Change to DRAG select event handling tag Feature Discussion 1 06-22-2011 11:41 PM
elevation model change - notification event caller Development Help 0 05-25-2011 10:10 AM
WW1.3.2-Plugin: Layer Edit canosso Add-ons & Scripts 21 02-27-2010 04:37 AM
zoom and latitude change haddazi Development Help 1 11-14-2007 04:04 AM


All times are GMT +1. The time now is 05:33 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.