private void refreshSensorChoices(Entity en) {
chSensors.removeItemListener(this);
chSensors.removeAllItems();
for (int i = 0; i < en.getSensors().size(); i++) {
Sensor sensor = en.getSensors().elementAt(i);
String condition = "";
if (sensor.isBAP() && !en.hasBAP(false)) {
condition = " (Disabled)";
}
chSensors.addItem(Sensor.getSensorName(sensor.getType())
+ condition);
if (sensor.getType() == en.getNextSensor().getType()) {
chSensors.setSelectedIndex(i);
}
}
chSensors.addItemListener(this);
}