public void actionPerformed(ActionEvent event) {
Object source = event.getSource();
if (source == simLimit) {
Integer opt = (Integer) simLimit.getSelectedItem();
if (opt != null) {
AttributeSet attrs = getOptions().getAttributeSet();
getProject().doAction(OptionsActions.setAttribute(attrs,
Options.sim_limit_attr, opt));
}
} else if (source == simRandomness) {
AttributeSet attrs = getOptions().getAttributeSet();
Object val = simRandomness.isSelected() ? Options.sim_rand_dflt
: Integer.valueOf(0);
getProject().doAction(OptionsActions.setAttribute(attrs,
Options.sim_rand_attr, val));
} else if (source == gateUndefined) {
ComboOption opt = (ComboOption) gateUndefined.getSelectedItem();
if (opt != null) {
AttributeSet attrs = getOptions().getAttributeSet();
getProject().doAction(OptionsActions.setAttribute(attrs,
Options.ATTR_GATE_UNDEFINED, opt.getValue()));
}
}
}