*/
public void actuatorAddedEvent(List<IActuator> newList) {
ActuatorModel actuatorModel = (ActuatorModel) newList.get(newList.size() - 1);
this.actuatorModelsList.add(actuatorModel);
actuatorModel.addListener(listenerActuator);
IDimension1D dimension = ((IConfig1D) config).getDimensionX();
List<IRange1D> range1DList = dimension.getRangesXList();
if (this.rangeModelsList.size() == 0) {
this.notifyNewRangeAction();
}
for (int i = 0; i < this.rangeModelsList.size(); i++) {
Range1DModel range = rangeModelsList.get(i);
IRange1D range1D = range1DList.get(i);
Trajectory1DModel trajectory1DModelToAdd = new Trajectory1DModel();
trajectory1DModelToAdd.setBeginPosition(0.0);
trajectory1DModelToAdd.setEndPosition(0.0);
trajectory1DModelToAdd.setDelta(0.0);
trajectory1DModelToAdd.setRelative(false);
trajectory1DModelToAdd.setSpeed(0.0);
trajectory1DModelToAdd.setRange(rangeModelsList.get(i));
range.getTrajectoriesList().add(trajectory1DModelToAdd);
range1D.getTrajectoriesList().add(trajectory1DModelToAdd);
dimension.getTrajectoriesList().add(trajectory1DModelToAdd);
trajectory1DModelToAdd.addListener(listenerTrajectory1D);
trajectory1DModelToAdd.setActuator(actuatorModel);
}
this.notifyAddActuator(actuatorModel.getName(), true);
}