use of model.Descripteme in project uPMT by coco35700.
the class NewInterviewDialogController method validerClick.
public void validerClick() {
LocalDate d = dateEntretien.getValue();
String text = "";
try {
File fileDir = fichierChoisi;
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(fileDir), "UTF8"));
String line = br.readLine();
while (line != null || !line.equals(null)) {
text = text + line + "\n";
line = br.readLine();
}
br.close();
} catch (Exception e) {
// System.out.println(e.getMessage());
}
// System.out.println(text);
DescriptionInterview de = new DescriptionInterview(new Descripteme(text), nomEntretien.getText());
de.setDateInterview(d);
if (!participantEntretien.getText().replaceAll(" ", "").equals(""))
de.setParticipant(participantEntretien.getText());
if (!commentaireEntretien.getText().replaceAll(" ", "").equals(""))
de.setComment(commentaireEntretien.getText());
if (main.getProjectInCreation() != null) {
main.getProjects().add(main.getProjectInCreation());
main.setCurrentProject(main.getProjectInCreation());
main.getCurrentProject().save();
main.setProjectInCreation(null);
main.launchMainView();
}
main.getCurrentProject().addEntretiens(de);
main.setCurrentDescription(de);
main.refreshDataTreeView();
main.getMainViewController().addGridPaneInterview(de);
main.getMainViewController().updateGrid();
// in case the center was set to null because of automatic interview Creation
if (main.getRootLayout().getCenter() == null) {
main.launchMainView();
}
main.getCurrentProject().save();
main.launchMainView();
main.refreshDataTreeView();
main.needToSave();
window.close();
}
Aggregations