use of org.vcell.optimization.gui.AnalysisTaskComboBoxModel in project vcell by virtualcell.
the class ParameterEstimationPanel method getAnalysisTaskComboBox.
private javax.swing.JComboBox getAnalysisTaskComboBox() {
if (taskComboBox == null) {
taskComboBox = new javax.swing.JComboBox();
taskComboBox.setRenderer(new DefaultListCellRenderer() {
public java.awt.Component getListCellRendererComponent(javax.swing.JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof AnalysisTask) {
AnalysisTask analysisTask = (AnalysisTask) value;
setText(analysisTask.getName());
} else {
setText((value == null) ? "" : value.toString());
}
return this;
}
});
taskComboBox.setEnabled(false);
analysisTaskComboBoxModel = new AnalysisTaskComboBoxModel();
taskComboBox.setModel(analysisTaskComboBoxModel);
}
return taskComboBox;
}
Aggregations