* are filled correctly.
* @param metricID of the metric that is to be displayed
* @return
*/
public static void displayMetric(String metricID){
IMetricsConfiguration metricsConfig = ConfigurationManager.getMetricsConfiguration();
if(metricsConfig.isAlgorithm(metricID)){
for(int i = 0; i < MetricsBuilderPanel.jAlgorithmListTab1.getModel().getSize(); i++)
if(((NameIDListEntry)MetricsBuilderPanel.jAlgorithmListTab1.getModel().getElementAt(i)).getMetricID().equals(metricID)){
MetricsBuilderPanel.jAlgorithmListTab1.setSelectedIndex(i);
MetricsBuilderPanel.jAlgorithmListTab2.setSelectedIndex(i);
MetricsBuilderPanel.jAlgorithmListTab3.setSelectedIndex(i);
break;
}
MetricsBuilderPanel.jMetricsIDTextField.setText(metricID);
MetricsBuilderPanel.jMetricsFormulaTextField.setText(metricsConfig.getAlgorithmFormula(metricID));
MetricsBuilderPanel.jMetricsNameTextField.setText(metricsConfig.getAlgorithmName(metricID));
MetricsBuilderPanel.jMetricsDescriptionTextField.setText(metricsConfig.getAlgorithmDescription(metricID));
MetricsBuilderPanel.jMetricsFilePathTextField.setText(metricsConfig.getMetricOrigin(metricID));
} else if(metricsConfig.isVariable(metricID)){
for(int i = 0; i < MetricsBuilderPanel.jVariableListTab1.getModel().getSize(); i++)
if(((NameIDListEntry)MetricsBuilderPanel.jVariableListTab1.getModel().getElementAt(i)).getMetricID().equals(metricID)){
MetricsBuilderPanel.jVariableListTab1.setSelectedIndex(i);
MetricsBuilderPanel.jVariableListTab2.setSelectedIndex(i);
MetricsBuilderPanel.jVariableListTab3.setSelectedIndex(i);
break;
}
MetricsBuilderPanel.jMetricsIDTextField.setText(metricID);
MetricsBuilderPanel.jMetricsFormulaTextField.setText(metricsConfig.getVariableFormula(metricID));
MetricsBuilderPanel.jMetricsNameTextField.setText(metricsConfig.getVariableName(metricID));
MetricsBuilderPanel.jMetricsDescriptionTextField.setText(metricsConfig.getVariableDescription(metricID));
MetricsBuilderPanel.jMetricsFilePathTextField.setText(metricsConfig.getMetricOrigin(metricID));
}
}