Issue #1172 - Corrected update problem
Change-Id: Id600728f8f9352b9c44c261c24bf1af8ae6c8e32 Former-commit-id:f0eafc3839
[formerlyc228b73624
[formerly d436841050e4d96dbe3b3cb1e54a9d62525c5d08]] Former-commit-id:c228b73624
Former-commit-id:26ed32cb19
This commit is contained in:
parent
5b13a48b8d
commit
60d3a92995
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
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 7, 2009 jsanchez Initial creation
|
* May 7, 2009 jsanchez Initial creation
|
||||||
*
|
* ======================================
|
||||||
|
* AWIPS2 DR Work
|
||||||
|
* 20120913 1172 jkorman Added code to call postAddListeners when
|
||||||
|
* creating sub-resources.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author jsanchez
|
* @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
|
@Override
|
||||||
public PlotBlendedResource construct(LoadProperties loadProperties,
|
public PlotBlendedResource construct(LoadProperties loadProperties,
|
||||||
IDescriptor descriptor) throws VizException {
|
IDescriptor descriptor) throws VizException {
|
||||||
|
@ -85,13 +100,16 @@ public class PlotBlendedResourceData extends AbstractResourceData implements
|
||||||
|
|
||||||
for (ResourcePair rp : resourceList) {
|
for (ResourcePair rp : resourceList) {
|
||||||
if (!rp.instantiateResource(descriptor, false)) {
|
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.
|
// the blended resource.
|
||||||
return null;
|
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;
|
return rsc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue