* Adds a range and associated trajectories for the model and the view.
*/
@Override
public void notifyNewRangeAction() {
if (this.config != null) {
RangeHCSModel rangeToAdd = new RangeHCSModel();
rangeToAdd.setDimension(((IConfigHCS) config).getDimensionX());
this.rangeModelsList.add(rangeToAdd);
((IConfigHCS) config).getDimensionX().getRangesXList().add(rangeToAdd);
IRangeHCS range = ((IConfigHCS) config).getDimensionX().getRangesXList().get(
((IConfigHCS) config).getDimensionX().getRangesXList().size() - 1);
((RangeHCSModel) range).addListener(listenerRangeHCS);
for (int i = 0; i < this.actuatorModelsList.size(); i++) {
TrajectoryHCSModel trajectoryHCSModelToAdd = new TrajectoryHCSModel();
trajectoryHCSModelToAdd.setBeginPosition(0.0);
trajectoryHCSModelToAdd.setEndPosition(0.0);
trajectoryHCSModelToAdd.setDelta(0.0);
trajectoryHCSModelToAdd.setRelative(false);
trajectoryHCSModelToAdd.setSpeed(0.0);
rangeToAdd.getTrajectoriesList().add(trajectoryHCSModelToAdd);
trajectoryHCSModelToAdd.setRange(rangeToAdd);
trajectoryHCSModelToAdd.setActuator(actuatorModelsList.get(i));
((TrajectoryHCSModel) range.getTrajectoriesList().get(i))
.addListener(listenerTrajectoryHCS);