String metricsID = "";
if (oldTabIndex == 0) {
if (listName != null) {
if (listName.equals(MetricsBuilderPanel.ALGORITHM_LIST)) {
NameIDListEntry listEntry = (NameIDListEntry) MetricsBuilderPanel.jAlgorithmListTab1
.getModel().getElementAt(index);
metricsID = listEntry.getMetricID();
MetricsBuilderPanel.clear();
MetricsBuilderPanel.fillTable(metricsID);
} else if (listName
.equals(MetricsBuilderPanel.VARIABLE_LIST)) {
NameIDListEntry listEntry = (NameIDListEntry) MetricsBuilderPanel.jVariableListTab1
.getModel().getElementAt(index);
metricsID = listEntry.getMetricID();
MetricsBuilderPanel.clear();
MetricsBuilderPanel.fillTable(metricsID);
} else if (listName
.equals(MetricsBuilderPanel.ALGORITHM_LIST_TAB2)) {
NameIDListEntry listEntry = (NameIDListEntry) MetricsBuilderPanel.jAlgorithmListTab2
.getModel().getElementAt(index);
metricsID = listEntry.getMetricID();
MetricsBuilderPanel.clear();
MetricsBuilderPanel.fillTable(metricsID);
} else if (listName
.equals(MetricsBuilderPanel.VARIABLE_LIST_TAB2)) {
NameIDListEntry listEntry = (NameIDListEntry) MetricsBuilderPanel.jVariableListTab2
.getModel().getElementAt(index);
MetricsBuilderPanel.clear();
metricsID = listEntry.getMetricID();
MetricsBuilderPanel.fillTable(metricsID);
}
}
whileMetricFilling = true;
updateMetricWithGUIData();
MetricsBuilderPanel.displayMetric(metricsID);
IMetricsConfiguration metricsConfig = ConfigurationManager
.getMetricsConfiguration();
MetricsBuilderPanel.setElementsEditable(metricsConfig
.isCustomMetric(metricsID));
whileMetricFilling = false;
currentMetricID = metricsID;
} else if (oldTabIndex == 1) {
if (listName != null) {
if (listName.equals(MetricsBuilderPanel.ALGORITHM_LIST)) {
NameIDListEntry listEntry = (NameIDListEntry) MetricsBuilderPanel.jAlgorithmListTab1
.getModel().getElementAt(index);
metricsID = listEntry.getMetricID();
MetricsBuilderPanel.clear();
MetricsBuilderPanel.fillTable(metricsID);
} else if (listName
.equals(MetricsBuilderPanel.VARIABLE_LIST)) {
NameIDListEntry listEntry = (NameIDListEntry) MetricsBuilderPanel.jVariableListTab1
.getModel().getElementAt(index);
metricsID = listEntry.getMetricID();
MetricsBuilderPanel.clear();
MetricsBuilderPanel.fillTable(metricsID);
} else if (listName
.equals(MetricsBuilderPanel.ALGORITHM_LIST_TAB2)) {
NameIDListEntry listEntry = (NameIDListEntry) MetricsBuilderPanel.jAlgorithmListTab2
.getModel().getElementAt(index);
metricsID = listEntry.getMetricID();
MetricsBuilderPanel.clear();
MetricsBuilderPanel.fillTable(metricsID);
} else if (listName
.equals(MetricsBuilderPanel.VARIABLE_LIST_TAB2)) {
NameIDListEntry listEntry = (NameIDListEntry) MetricsBuilderPanel.jVariableListTab2
.getModel().getElementAt(index);
MetricsBuilderPanel.clear();
metricsID = listEntry.getMetricID();
MetricsBuilderPanel.fillTable(metricsID);
}
}