Issue #1172 - Corrected update problem
Change-Id: Id600728f8f9352b9c44c261c24bf1af8ae6c8e32 Former-commit-id:c228b73624
[formerlyc228b73624
[formerly d436841050e4d96dbe3b3cb1e54a9d62525c5d08]] Former-commit-id:f0eafc3839
Former-commit-id:5c79be21d8
This commit is contained in:
parent
6dbf6c9c81
commit
8bd924f6a5
1 changed files with 22 additions and 4 deletions
|
@ -44,7 +44,10 @@ import com.raytheon.uf.viz.core.rsc.ResourceList;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 7, 2009 jsanchez Initial creation
|
||||
*
|
||||
* ======================================
|
||||
* AWIPS2 DR Work
|
||||
* 20120913 1172 jkorman Added code to call postAddListeners when
|
||||
* creating sub-resources.
|
||||
* </pre>
|
||||
*
|
||||
* @author jsanchez
|
||||
|
@ -78,6 +81,18 @@ public class PlotBlendedResourceData extends AbstractResourceData implements
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a resource(s) from this resource data.
|
||||
*
|
||||
* @param loadProperties
|
||||
* The load properties
|
||||
* @param descriptor
|
||||
* The descriptor that the resource will be loaded onto
|
||||
* @throws VizException
|
||||
* if construction fails
|
||||
* @return The renderable capability. Will return null if any of the sub-resources
|
||||
* fail to construct.
|
||||
*/
|
||||
@Override
|
||||
public PlotBlendedResource construct(LoadProperties loadProperties,
|
||||
IDescriptor descriptor) throws VizException {
|
||||
|
@ -85,13 +100,16 @@ public class PlotBlendedResourceData extends AbstractResourceData implements
|
|||
|
||||
for (ResourcePair rp : resourceList) {
|
||||
if (!rp.instantiateResource(descriptor, false)) {
|
||||
// failure to create any sub resources is a failure to construct
|
||||
// failure to create any sub-resource is a failure to construct
|
||||
// the blended resource.
|
||||
return null;
|
||||
}
|
||||
this.addChangeListener((IResourceDataChanged) rp.getResource());
|
||||
}
|
||||
|
||||
// All sub-resources have been instantiated, add the listeners.
|
||||
for (ResourcePair rp : resourceList) {
|
||||
addChangeListener((IResourceDataChanged) rp.getResource());
|
||||
resourceList.firePostAddListeners(rp);
|
||||
}
|
||||
return rsc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue