From 226e5aaa784f6b9b7716122495b5f80466efafa0 Mon Sep 17 00:00:00 2001 From: ishanashastri Date: Wed, 7 Jun 2017 20:35:27 -0400 Subject: [PATCH] Updated software --- src/JavaFXGUI/EnterInfoTab.java | 12 +++++++----- src/JavaFXGUI/OptionSelect.java | 11 ++++------- src/backend/Student.java | 28 ++++++++++++++-------------- src/css/application.css | 2 +- src/data/options.sip | 3 +-- 5 files changed, 27 insertions(+), 29 deletions(-) diff --git a/src/JavaFXGUI/EnterInfoTab.java b/src/JavaFXGUI/EnterInfoTab.java index 02e7504..04f83b1 100644 --- a/src/JavaFXGUI/EnterInfoTab.java +++ b/src/JavaFXGUI/EnterInfoTab.java @@ -91,10 +91,11 @@ public EnterInfoTab(MenuTabPane par, EnterStudentTab prev, String title, while(file.hasNext()){ stringData = file.nextLine(); -// infoOptionSelect.removeChoiceBox(); + System.out.println(stringData); + infoOptionSelect.removeChoiceBox(); if (stringData.equals("+++")){ v ++; -// infoOptionSelect.addChoiceBox(true, infoOptionSelect); + infoOptionSelect.removeChoiceBox(); } else if (stringData.equals("++")&& version == v){ page++; @@ -106,9 +107,10 @@ else if (stringData.equals("++")&& version == v){ else{ infoOptionSelect.addPage(stringData); } -// infoOptionSelect.addChoiceBox(true, infoOptionSelect); + infoOptionSelect.removeChoiceBox(); } else if (stringData.equals("++++")){ + v++; stringData=file.nextLine(); if (stringData.contains("Submit Button")){ String[] stringDatas = stringData.split(", "); @@ -131,11 +133,11 @@ else if (stringData.equals("++++")){ } infoOptionSelect.splitScreen(page+1, title1, title2, data1, data2, infoOptionSelect); } -// infoOptionSelect.addChoiceBox(false, infoOptionSelect); + infoOptionSelect.removeChoiceBox(); } else if (version == v){ infoOptionSelect.addButton(page, stringData, stringData); -// infoOptionSelect.addChoiceBox(true, infoOptionSelect); + infoOptionSelect.removeChoiceBox(); } } file.close(); diff --git a/src/JavaFXGUI/OptionSelect.java b/src/JavaFXGUI/OptionSelect.java index 9d0bd24..26519de 100644 --- a/src/JavaFXGUI/OptionSelect.java +++ b/src/JavaFXGUI/OptionSelect.java @@ -257,17 +257,14 @@ public void addChoiceBox(boolean rem, OptionSelect o){ if(rem){ removeChoiceBox(); } + System.out.println(buttonVBox.getChildren().contains(hb)); } public void removeChoiceBox(){ - if(buttonVBox.getChildren().contains(optionHBoxArray)){ +// if(buttonVBox.getChildren().contains(optionHBoxArray)){ buttonVBox.getChildren().remove(hb); - } - System.out.println("called"); -// if(buttonVBox.getChildren().contains(c)){ -//// System.out.println(buttonVBox.getChildren().contains(c)); -// c.setDisable(true); -// buttonVBox.getChildren().remove(c); // } + System.out.println("remove: " +buttonVBox.getChildren().contains(hb)); + System.out.println("called"); } /** * This is called by the ButtonHandler to add information to the Data. diff --git a/src/backend/Student.java b/src/backend/Student.java index 0752301..189b5f5 100644 --- a/src/backend/Student.java +++ b/src/backend/Student.java @@ -90,14 +90,14 @@ public String getReason() { public void setReason(String reason) { - if(this.reason != null){ - this.reason += ", " +reason; - }else{ - System.out.println("NULLEDEDED"); +// if(this.reason != null){ +// this.reason += ", " +reason; +// }else{ +// System.out.println("NULLEDEDED"); this.reason=reason; - } +// } } - + public String getNote() { @@ -115,12 +115,12 @@ public String getTime(){ } public void setTime(String t){ - if(t != null){ - time += ", " + t; - }else{ +// if(t != null){ +// time += ", " + t; +// }else{ // System.out.println("time: " + this.time); this.time=t; - } +// } } public String getDate(){ @@ -136,11 +136,11 @@ public void setExcused(String excused) { this.excused = excused; } public void setArrTime(String arrTime) { - if(this.arrTime.equals("None")){ +// if(this.arrTime.equals("None")){ this.arrTime = arrTime; - }else{ - this.arrTime += ", " + arrTime; - } +// }else{ +// this.arrTime += ", " + arrTime; +// } } public String getArrTime() { return arrTime; diff --git a/src/css/application.css b/src/css/application.css index 114556f..e5a72bc 100644 --- a/src/css/application.css +++ b/src/css/application.css @@ -279,7 +279,7 @@ } .RadioButton { - -fx-font-size: 15px; + -fx-font-size: 18px; } .tab{ -fx-background-color: #FFF; diff --git a/src/data/options.sip b/src/data/options.sip index b77e144..bdb235b 100644 --- a/src/data/options.sip +++ b/src/data/options.sip @@ -7,9 +7,8 @@ Unexcused Religious Reason Transportation College Visit -+++ ++++ -Submit Button, Enter reason for leaving and who you were excused by: +Submit Button, Enter reason for leaving: Sick Doctor/Dentist Appointment Religious Reason