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 06-25-2012, 10:25 AM   #1
mostafa_fahim
Junior Member
 
Join Date: Mar 2012
Posts: 22
mostafa_fahim is on a distinguished road
Default Synchronizing the views of 2 WolrdWindows

Hi all, I want to open 2 worldwindows say A and B. I need to deactivate the controls of B and get the controls (SelectionListener, MouseListener, MouseWheelListeners and KeyListeners) of A to control both views of A and B.. I tried editing in the AWTInputHandler and ViewControlsSelectListener and managed to do so but after a while a lag happens and both A & B become out of sync.. Any help?

Thank You
mostafa_fahim is offline   Reply With Quote
Old 06-26-2012, 04:19 AM   #2
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,624
nlneilson is on a distinguished road
Default

It's good you got the concept of what you are trying to accomplish worked out.
I don't recall an issue like this before.

At first glance it could be a memory leak since you don't seem to be adding a large amount of data. Try using the Task Manager to track that down.

edit: or try this, I don't use it except tinkering with the examples
The WW dashboard -- Ctl+Alt+Shift+left-click
http://forum.worldwindcentral.com/sh...ht=performance
Quote:
Originally Posted by tag View Post
The WW dashboard -- Ctl+Alt+Shift+left-click -- has two panels, one of which shows some performance metrics. The other panel has a "Run Continuously" toggle that forces WW to continually redraw. One aspect of performance can be seen by toggling that on, then watching the metrics panel to see the frame rate achieved.

Running many instances of a WWJ app or different WWJ apps isn't usually a problem.

Concept to get something to work is fairly easy.

Error handling involves a considerable amount of work.

Optimizing the code seems to be the most work.
__________________
Neil
http://www.nlneilson.com

Last edited by nlneilson; 06-26-2012 at 05:59 AM.
nlneilson is offline   Reply With Quote
Old 06-26-2012, 08:53 PM   #3
tag
WWJ Technical Manager
 
Join Date: May 2007
Location: Seattle
Posts: 1,041
tag is on a distinguished road
Default

Did you review the multi-window examples?

All you should need to do is not add your controls layer to B, then have A respond by controlling both A & B. I don't see that you'd have to do anything with AWTInputHandler. You would probably have to modify ViewControlsLayer to meet your needs.
tag is offline   Reply With Quote
Old 07-02-2012, 01:13 PM   #4
mostafa_fahim
Junior Member
 
Join Date: Mar 2012
Posts: 22
mostafa_fahim is on a distinguished road
Default

The viewControlsLayer modification will enable me to control both by the buttons at the left bottom corner only. This is one part but also I need to control both by the mouseWheel, mouse clicks and mouseMotion.
Actually I managed to do it by creating 2 windows like in multiFrame.java example and do so x.setView(y.getView());

Thank You for your help
mostafa_fahim is offline   Reply With Quote
Reply


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
Multiple Views in same canvas? ecuguru Development Help 0 02-11-2010 02:33 AM
Map refresh rate with several views DaNy Developers' Corner 9 02-05-2010 03:26 PM
[Solved] SAR APP Fly-it views Syris3000 Development Help 3 12-05-2009 01:15 PM
Override the View's Control tingspain Development Help 1 06-22-2009 11:20 PM
High definition blue marble views not working davaus Bug Reports 3 11-18-2004 11:02 AM


All times are GMT +1. The time now is 11:12 AM.


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