/** Reaction to checkbox changes. */ public void stateChanged(ChangeEvent e) { if (myMonitor.getMyNetwork().getContainer().getMyStatus().isStopped()) { enabled = cbEnabled.isSelected(); myMonitor.setEnabled(enabled); } else cbEnabled.setSelected(enabled); return; }
/** Saves SWARM properties. */ public synchronized void save() { super.save(); ((ControllerSWARM) controller).P.SWARM1 = cbsw1.isSelected(); ((ControllerSWARM) controller).P.SWARM2A = cbsw2a.isSelected(); ((ControllerSWARM) controller).P.SWARM2B = cbsw2b.isSelected(); // ((ControllerSWARM)controller).set_swarm2b(cbdynbott.isSelected()); ((ControllerSWARM) controller).zones = zones; ControllerSWARM z = (ControllerSWARM) controller; z.P.SWARM_DENSITY_SAMPLE_SIZE = density_sample_size; z.P.epsilon = epsilon; z.P.SWARM_FORECAST_LEAD_TIME = forecast_lead_time; z.P.input_var_lane = input_var_lane; z.P.meas_var_lane = meas_var_lane; z.P.swarm_phi = phi; z.P.swarm_psi = psi; z.P.SWARM_SAT_DEN_NUMBER = sat_den_multiplier; z.P.sat_smoother = sat_smoother; z.P.SWARM_SLOPE_SAMPLE_SIZE = slope_sample_size; return; }