public AddAssociationDialog( Component parentComponent, boolean modal, AlgorithmView view, boolean createSelected, String project, String traits, String markers) { super(); parentComponentReference = parentComponent; currentComponentReference = this; this.view = view; labelFactory(); textFieldFactory(); comboBoxFactory(); radioButtonFactory(); buttonFactory(); panelFactory(); dialogSettings(); componentSettings(); for (int i = 0; i < Algorithms.AssociationAlgorithms.algonames().size(); i++) { this.algorithmComboBox.addItem(Algorithms.AssociationAlgorithms.getalgorithms().get(i)); } ArrayList<Project> temp = Model.getInstance().getProjects(); for (int i = 0; i < temp.size(); i++) { this.projectComboBox.addItem(temp.get(i).getName()); } if (project != null) { this.projectComboBox.setSelectedItem(project); } if (traits != null) { this.traitSetComboBox.setSelectedItem(traits); } if (markers != null) { this.markerSetComboBox.setSelectedItem(markers); } if (project != null && traits == null) { if (this.traitSetComboBox.getItemCount() > 1) { this.traitSetComboBox.setSelectedIndex(1); if (this.markerSetComboBox.getItemCount() > 1) { this.markerSetComboBox.setSelectedIndex(1); } } } }