@@ -66,6 +66,7 @@ public WorldWindowGLJPanel()
66
66
{
67
67
this .wwd = ((WorldWindowGLDrawable ) WorldWind .createConfigurationComponent (AVKey .WORLD_WINDOW_CLASS_NAME ));
68
68
this .wwd .initDrawable (this );
69
+ this .wwd .addPropertyChangeListener (this );
69
70
this .wwd .initGpuResourceCache (WorldWindowImpl .createGpuResourceCache ());
70
71
this .createView ();
71
72
this .createDefaultInputHandler ();
@@ -100,6 +101,7 @@ public WorldWindowGLJPanel(WorldWindow shareWith)
100
101
{
101
102
this .wwd = ((WorldWindowGLDrawable ) WorldWind .createConfigurationComponent (AVKey .WORLD_WINDOW_CLASS_NAME ));
102
103
this .wwd .initDrawable (this );
104
+ this .wwd .addPropertyChangeListener (this );
103
105
if (shareWith != null )
104
106
this .wwd .initGpuResourceCache (shareWith .getGpuResourceCache ());
105
107
else
@@ -143,6 +145,7 @@ public WorldWindowGLJPanel(WorldWindow shareWith, GLCapabilities capabilities,
143
145
{
144
146
this .wwd = ((WorldWindowGLDrawable ) WorldWind .createConfigurationComponent (AVKey .WORLD_WINDOW_CLASS_NAME ));
145
147
this .wwd .initDrawable (this );
148
+ this .wwd .addPropertyChangeListener (this );
146
149
if (shareWith != null )
147
150
this .wwd .initGpuResourceCache (shareWith .getGpuResourceCache ());
148
151
else
@@ -162,6 +165,9 @@ public WorldWindowGLJPanel(WorldWindow shareWith, GLCapabilities capabilities,
162
165
163
166
public void propertyChange (PropertyChangeEvent evt )
164
167
{
168
+ if (this .wwd == evt .getSource ())
169
+ this .firePropertyChange (evt );
170
+
165
171
//noinspection StringEquality
166
172
if (evt .getPropertyName () == WorldWind .SHUTDOWN_EVENT )
167
173
this .shutdown ();
@@ -367,29 +373,24 @@ public Object removeKey(String key)
367
373
public synchronized void addPropertyChangeListener (PropertyChangeListener listener )
368
374
{
369
375
super .addPropertyChangeListener (listener );
370
- if (wwd != null ) // defensive condition for NPE that happens when (for example) setting a swing look/feel
371
- this .wwd .addPropertyChangeListener (listener );
372
376
}
373
377
374
378
@ Override
375
379
public synchronized void addPropertyChangeListener (String propertyName , PropertyChangeListener listener )
376
380
{
377
381
super .addPropertyChangeListener (propertyName , listener );
378
- this .wwd .addPropertyChangeListener (propertyName , listener );
379
382
}
380
383
381
384
@ Override
382
385
public synchronized void removePropertyChangeListener (PropertyChangeListener listener )
383
386
{
384
387
super .removePropertyChangeListener (listener );
385
- this .wwd .removePropertyChangeListener (listener );
386
388
}
387
389
388
390
@ Override
389
391
public synchronized void removePropertyChangeListener (String propertyName , PropertyChangeListener listener )
390
392
{
391
393
super .removePropertyChangeListener (listener );
392
- this .wwd .removePropertyChangeListener (listener );
393
394
}
394
395
395
396
@ Override
0 commit comments