return roboterLightSensorAngles;
}
private JSlider getRoboterLightSensorViewField() {
if (roboterLightSensorViewField == null) {
final LightSensor leftLightSensor = roboterComponent.getModelObject().getLeftLightSensor();
final LightSensor rightLightSensor = roboterComponent.getModelObject().getRightLightSensor();
roboterLightSensorViewField = new JSlider(JSlider.HORIZONTAL, 1, 180, (int) rightLightSensor.getViewFieldSize());
initJSlider(roboterLightSensorViewField);
roboterLightSensorViewField.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
JSlider source = (JSlider) e.getSource();
int value = source.getValue();
leftLightSensor.setViewFieldSize(value);
rightLightSensor.setViewFieldSize(value);
}
});
}
return roboterLightSensorViewField;
}