config = null;
}
else {
// The current config
config = (IConfigEnergy) iconfig;
IDimensionEnergy dimensionEnergy = config.getDimensionX();
// The first range
if (config.getDimensionX().getRangesEnergyList() == null) {
List<IRangeEnergy> rangesList = new ArrayList<IRangeEnergy>();
ListModel<IRangeEnergy, DimensionModel> rangesModelList = new ListModel<IRangeEnergy, DimensionModel>(
rangesList, ((DimensionModel) config.getDimensionX()), "rangeEnergy");
dimensionEnergy.setRangesEnergyList(rangesModelList);
}
syncTrajectoriesWithActuators();
((DimensionEnergyModel) dimensionEnergy).addListener(actuatorsListListener);
for (IRangeEnergy rangeEnergy : dimensionEnergy.getRangesEnergyList()) {
castAndAddMultiListener(rangeEnergy);
for (ITrajectory trajectoryEnergy : rangeEnergy.getTrajectoriesList()) {
castAndAddMultiListener(trajectoryEnergy);
}
}