boolean metricAvailable = metricCombo.getItemCount() != 0;
metricRadioButton.setEnabled(metricAvailable);
metricCombo.setEnabled(metricAvailable);
MetricBinding metricBinding = null;
InputListItem item = getSelectedInputListItem ();
if (item != null) {
InputBinding binding = item.getInputBinding();
if (binding instanceof MetricBinding) {
metricBinding = (MetricBinding)binding;
}
}
if (metricBinding != null) {
metricCombo.setSelectedItem(new MetricComboItem (metricBinding.getMetricDescription()));
metricRadioButton.setSelected(true);
} else {
metricCombo.setSelectedIndex(-1);