Schedule-Creator

Java GUI to create schedules for UNCG students
git clone git://git.wrycode.com/wrycode/archive/Schedule-Creator.git
Log | Files | Refs | README

commit df02341c18c291a2d07c6243f88700c4b37e7098
parent bb9d9d3d84834b8532f8aa3f216879622fff5798
Author: jamisonv93 <47033011+jamisonv93@users.noreply.github.com>
Date:   Sun, 29 Mar 2020 16:13:11 -0400

Improve CRN pop up design (#47)

* refactor

* style guide

* refactor

* Add API package and interface

* Add API call method and Adapter

* Change which file TIME and DAY use

* change field in Semester class

* update UI design; remove generateSchedules bug; refactor

* merge sfar branch; add lib package with necessary jar file

* implement CRN pop up box

* implement show CRN pop up

* lib package and jar file

* improve CRN pop up design
Diffstat:
MScheduleCreator/controllers/CoursesController.java | 12+++++++-----
MScheduleCreator/resources/views/select_courses.fxml | 11+++--------
2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/ScheduleCreator/controllers/CoursesController.java b/ScheduleCreator/controllers/CoursesController.java @@ -33,10 +33,10 @@ import javafx.scene.control.ListView; import javafx.scene.control.ScrollPane; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; +import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.layout.BorderPane; import javafx.scene.layout.GridPane; -import javafx.scene.layout.Pane; import javafx.scene.layout.Priority; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; @@ -47,7 +47,7 @@ import javafx.scene.shape.Rectangle; * * @author Jamison Valentine, Ilyass Sfar, Nick Econopouly, Nathan Tolodzieki * - * Last Updated: 3/28/2020 + * Last Updated: 3/29/2020 */ public class CoursesController implements Initializable { @@ -441,12 +441,14 @@ public class CoursesController implements Initializable { public void showCRNs(ActionEvent _event) { this.CRNContainer.getChildren().clear(); + StringBuilder content = new StringBuilder(); for (Section section : this.currentSemester.getSchedules().get(this.currentScheduleIndex).getAddedSections()) { - this.CRNContainer.getChildren().add(new Label(section.getCRN())); + content.append(section.getCRN() + "\n"); } - + TextArea textArea = new TextArea(content.toString()); + textArea.setEditable(false); + this.CRNContainer.getChildren().add(textArea); this.CRNPane.setVisible(true); - this.scheduleGridPane.toBack(); this.CRNPane.toFront(); } diff --git a/ScheduleCreator/resources/views/select_courses.fxml b/ScheduleCreator/resources/views/select_courses.fxml @@ -98,12 +98,7 @@ <Button mnemonicParsing="false" onAction="#hideCRNs" text="Close" /> </items> </ToolBar> - <VBox fx:id="CRNContainer" alignment="CENTER" prefHeight="83.0" prefWidth="340.0"> - <children> - <Label alignment="CENTER" text="First" /> - <Label text="First" /> - </children> - </VBox> + <VBox fx:id="CRNContainer" alignment="CENTER" prefHeight="168.0" prefWidth="321.0" /> </children> </VBox> </children> @@ -124,8 +119,8 @@ <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="44.0" minHeight="10.0" prefHeight="44.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="34.0" minHeight="10.0" prefHeight="34.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />