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 2e749cfed667d1d0db0f1925e0db9a0bdab90621
parent aed86e5269439f8b5f860ddd8aa67b086abf6bec
Author: jamisonv93 <47033011+jamisonv93@users.noreply.github.com>
Date:   Sun,  1 Mar 2020 11:14:00 -0500

Merge pull request #20 from cloud0x9/new-ui

Code still needs comments and refactoring
Diffstat:
MScheduleCreator/DBAdapter.java | 37++++++++++++++++++++++++++++---------
MScheduleCreator/controllers/CoursesController.java | 132++++++++++++++++++++++++++++---------------------------------------------------
AScheduleCreator/resources/raw/courses.txt | 1217+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MScheduleCreator/resources/views/primary.fxml | 20++++++++++----------
MScheduleCreator/resources/views/select_courses.fxml | 71++++++++++++++++++++++++++++++++++++++++++++++-------------------------
5 files changed, 1348 insertions(+), 129 deletions(-)

diff --git a/ScheduleCreator/DBAdapter.java b/ScheduleCreator/DBAdapter.java @@ -5,6 +5,7 @@ import ScheduleCreator.models.Course; import java.io.File; import java.io.FileWriter; import java.util.ArrayList; +import java.util.HashSet; import java.util.Scanner; /** This class is used to retrieve and modify persistent data for the application. @@ -26,6 +27,12 @@ public class DBAdapter { * @param _course * @throws Exception */ + + public static void main(String[] args) { + System.out.println("db adapter"); + } + + public static void saveCourse(String _course) throws Exception { file = new File("src/ScheduleCreator/resources/raw/user_selected_courses.txt"); @@ -50,13 +57,20 @@ public class DBAdapter { selectedCourses.add(line.trim()); } + input.close(); return selectedCourses; } public static void getCourses(String _abbreviation) throws Exception { - input = new Scanner(file); + File file = new File("src/ScheduleCreator/resources/raw/spring2020.txt"); + Scanner input = new Scanner(file); String line; + + TreeSet<String> availableCourses = new TreeSet(); + FileWriter writer = new FileWriter(new File("src/ScheduleCreator/resources/raw/courses.txt")); + int start = 0; + int end = 0; while (input.hasNext()) { //add whitespace to start and end of abbreviation @@ -64,18 +78,23 @@ public class DBAdapter { _abbreviation.toUpperCase(); while (input.hasNext()) { - currentLine = input.nextLine(); - if (currentLine.contains(_abbreviation)) System.out.println(currentLine); + line = input.nextLine(); + if (line.contains(_abbreviation)) { + + start = line.indexOf(_abbreviation); + end = start + 8; + String courseTitle = line.subSequence(start, end).toString(); + if (!availableCourses.contains(courseTitle)) availableCourses.add(courseTitle); + + } } } + writer.append(availableCourses.toString()); input.close(); + writer.close(); } - public void skipLine(int numberOfLines) { - for (int i = 0; i <= numberOfLines; i++) { - this.currentLine = this.input.nextLine(); - this.currentLineNumber++; - } - } + + } diff --git a/ScheduleCreator/controllers/CoursesController.java b/ScheduleCreator/controllers/CoursesController.java @@ -1,25 +1,22 @@ package ScheduleCreator.controllers; import ScheduleCreator.DBAdapter; -import ScheduleCreator.Tests; -import ScheduleCreator.models.User; +import java.io.File; import java.net.URL; import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import java.util.ResourceBundle; -import java.util.logging.Level; -import java.util.logging.Logger; +import java.util.Scanner; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.fxml.FXML; -import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; -import javafx.scene.Node; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.scene.control.Label; -import javafx.scene.control.TextField; -import javafx.scene.layout.GridPane; -import javafx.scene.layout.HBox; -import javafx.stage.Stage; +import javafx.scene.control.Button; +import javafx.scene.control.ComboBox; +import javafx.scene.control.ListView; + /** This class controls interactions in the Courses View. * @@ -30,82 +27,47 @@ import javafx.stage.Stage; public class CoursesController implements Initializable { - private int rowIndex = 0; - private int colIndex = 0; - private int numberOfCourses; - private User user = new User(); - - @FXML private GridPane courses; - @FXML private TextField courseText; + + @FXML private ComboBox<String> comboBox; + + @FXML private ListView selectedCourses; - /** - * Allows user to go back to primary view. - * @param _event - * @throws Exception - */ - public void backToPrimary(ActionEvent _event) throws Exception { - - Parent root = FXMLLoader.load(getClass().getResource("/ScheduleCreator/resources/views/primary.fxml")); - Scene primaryScene = new Scene(root); - - //Get information from primary stage - Stage window = (Stage)((Node)_event.getSource()).getScene().getWindow(); - window.setScene(primaryScene); - window.show(); - } - - /** - * Gets courses from database (.txt file) loads them into the view. - * @throws Exception - */ - public void loadCourses() throws Exception { - - //load selected classes for db - ArrayList<String> selectedCourses = DBAdapter.getSelectedCourses(); - numberOfCourses = selectedCourses.size(); - - for (int i = 0; i <= selectedCourses.size() - 1; i++) { - rowIndex = i / 3; - colIndex = i % 3; - Label label = new Label(selectedCourses.get(i)); - HBox newBox = new HBox(label); - newBox.setMinHeight(100); - newBox.setMinWidth(100); - newBox.setStyle("-fx-border-color: black"); - courses.add(newBox, colIndex, rowIndex); - } - } - - public void addCourse(ActionEvent _event) throws Exception { - - String course = courseText.getText(); - User.selectCourse(course); - courseText.setText(""); - Label label = new Label(course); - - //Go to next row after every 3rd course. - rowIndex = numberOfCourses / 3; - - //Go back to first column after every 3rd course. - colIndex = numberOfCourses % 3; - - //Constucts a new box and adds it to the grid. - HBox newBox = new HBox(label); - newBox.setMinHeight(100); - newBox.setMinWidth(100); - newBox.setStyle("-fx-border-color: black"); - courses.getChildren().add(newBox); - GridPane.setRowIndex(newBox, rowIndex); - GridPane.setColumnIndex(newBox, colIndex); - numberOfCourses++; - } + @FXML private Button courseButton; @Override - public void initialize(URL location, ResourceBundle resources) { - + public void initialize(URL url, ResourceBundle rb) { try { - loadCourses(); + loadAllCourses(); + loadSelectedCourses(); } - catch (Exception ex) {Logger.getLogger(Tests.class.getName()).log(Level.SEVERE, null, ex);}; + catch (Exception e) {}; + + } + + public void addSelectedCourse(ActionEvent _event) throws Exception { + String choice = comboBox.getValue(); + List<String> courseList = new ArrayList(); + courseList.add(choice); + selectedCourses.getItems().add(choice); + DBAdapter.saveCourse(choice); + } + + public void loadAllCourses() throws Exception { + File file = new File("src/ScheduleCreator/resources/raw/courses.txt"); + Scanner input = new Scanner(file); + List<String> courses = new ArrayList(); + String line = ""; + while (input.hasNext()) { + line = input.nextLine(); + courses.add(line); + } + comboBox.setItems(FXCollections.observableList(courses)); + } + + public void loadSelectedCourses() throws Exception { + + List<String> courses = DBAdapter.getSelectedCourses(); + selectedCourses.setItems(FXCollections.observableList(courses)); } } + diff --git a/ScheduleCreator/resources/raw/courses.txt b/ScheduleCreator/resources/raw/courses.txt @@ -0,0 +1,1217 @@ +AAD 202 +AAD 301 +AAD 381 +AAD 475 +AAD 478 +AAD 498 +ACC 201 +ACC 202 +ACC 318 +ACC 319 +ACC 325 +ACC 330 +ACC 420 +ACC 440 +ACC 461 +ACC 561 +ACC 613 +ACC 621 +ACC 630 +ACC 646 +ACC 647 +ACC 649 +ACC 651 +ACC 656 +ADS 200 +ADS 201 +ADS 210 +ADS 260 +ADS 305 +ADS 306 +ADS 315 +ADS 325 +ADS 330 +ADS 356 +ADS 376 +ADS 400 +ADS 410 +ADS 600 +APD 200 +APD 244 +APD 252 +ARB 102 +ARB 204 +ARE 361 +ARE 363 +ARE 465 +ARE 468 +ARH 111 +ARH 211 +ARH 322 +ARH 350 +ARH 354 +ARH 360 +ARH 381 +ARH 401 +ARH 405 +ARH 490 +ARH 500 +ARS 100 +ARS 120 +ARS 140 +ART 100 +ART 120 +ART 140 +ART 150 +ART 220 +ART 221 +ART 232 +ART 240 +ART 253 +ART 276 +ART 281 +ART 285 +ART 286 +ART 321 +ART 322 +ART 328 +ART 329 +ART 335 +ART 337 +ART 340 +ART 341 +ART 344 +ART 349 +ART 354 +ART 355 +ART 356 +ART 381 +ART 384 +ART 385 +ART 386 +ART 387 +ART 393 +ART 394 +ART 442 +ART 446 +ART 447 +ART 448 +ART 457 +ART 459 +ART 481 +ART 482 +ART 496 +ART 557 +ART 610 +ART 635 +ART 649 +ART 657 +ART 685 +ART 699 +ASL 102 +ASL 204 +ASL 245 +AST 233 +AST 235 +ATY 100 +ATY 212 +ATY 213 +ATY 253 +ATY 253L +ATY 258 +ATY 300X +ATY 304 +ATY 308 +ATY 311 +ATY 315 +ATY 330 +ATY 341 +ATY 360 +ATY 363 +ATY 385 +ATY 400X +ATY 423 +ATY 424 +ATY 426 +ATY 453 +ATY 453L +ATY 457 +ATY 495 +ATY 498 +BIO 105 +BIO 105L +BIO 111 +BIO 111L +BIO 112 +BIO 112L +BIO 271 +BIO 271L +BIO 277 +BIO 277L +BIO 280 +BIO 280L +BIO 301 +BIO 315 +BIO 330 +BIO 355 +BIO 361 +BIO 375 +BIO 392 +BIO 407 +BIO 420 +BIO 424 +BIO 429 +BIO 432 +BIO 435 +BIO 438 +BIO 443 +BIO 449 +BIO 451 +BIO 451L +BIO 455 +BIO 460 +BIO 464 +BIO 476 +BIO 482 +BIO 488 +BIO 493 +BIO 494 +BIO 496 +BIO 497 +BIO 499 +BIO 629 +BIO 638 +BIO 643 +BIO 646 +BIO 648 +BIO 651 +BIO 651L +BIO 660 +BIO 676 +BIO 682 +BIO 695 +BIO 699 +BIO 732 +BIO 734 +BIO 749 +BIO 790 +BIO 791 +BIO 799 +BIO 801 +BIO 802 +BIO 803 +BLS 300 +BLS 301 +BLS 320 +BLS 321 +BLS 322 +BLS 323 +BLS 325 +BLS 326 +BLS 340 +BLS 342 +BLS 348 +BLS 362 +BLS 363 +BLS 364 +BLS 365 +BLS 366 +BLS 380 +BLS 384 +BLS 385 +BLS 400 +BUS 115 +BUS 130 +BUS 201 +BUS 216 +BUS 240 +BUS 300 +BUS 315 +BUS 328 +BUS 336 +BUS 339 +BUS 342 +BUS 440 +BUS 450 +BUS 606 +BUS 617 +BUS 618 +BUS 623 +BUS 702 +BUS 721 +CCI 201 +CCI 202 +CCI 205 +CCI 212 +CCI 240 +CCI 305 +CCI 313 +CCI 350 +CED 310 +CED 392 +CED 611 +CED 612 +CED 642 +CED 645 +CED 653 +CED 653B +CED 653F +CED 653G +CED 653Q +CED 669 +CED 679 +CED 680B +CED 687 +CED 688 +CED 688A +CED 690 +CED 691 +CED 692 +CED 698 +CED 720B +CED 740 +CED 757 +CED 760B +CED 775 +CED 777B +CED 780A +CED 781B +CED 781D +CED 799 +CHE 101 +CHE 103 +CHE 104 +CHE 110 +CHE 111 +CHE 112 +CHE 114 +CHE 115 +CHE 191 +CHE 252 +CHE 292 +CHE 351 +CHE 352 +CHE 354 +CHE 355 +CHE 392 +CHE 401 +CHE 402 +CHE 431 +CHE 433 +CHE 442 +CHE 453 +CHE 457 +CHE 458 +CHE 462 +CHE 464 +CHE 470B +CHE 470E +CHE 492 +CHE 499 +CHE 531 +CHE 557 +CHE 570D +CHE 601 +CHE 602 +CHE 652 +CHE 659 +CHE 661 +CHE 670B +CHE 680 +CHE 699 +CHE 752 +CHE 780 +CHE 799 +CHI 101 +CHI 102 +CHI 203 +CHI 204 +CHI 302 +CHI 305 +CHI 492 +CRS 211 +CRS 231 +CRS 242 +CRS 255 +CRS 312 +CRS 312L +CRS 321 +CRS 363 +CRS 400 +CRS 405 +CRS 470 +CRS 481 +CRS 570 +CRS 605 +CRS 632 +CRS 685 +CRS 690 +CRS 699 +CRS 713 +CRS 714 +CRS 721 +CRS 781 +CRS 790 +CRS 799 +CRS 802 +CRS 803 +CSC 120 +CSC 130 +CSC 230 +CSC 250 +CSC 261 +CSC 330 +CSC 339 +CSC 340 +CSC 350 +CSC 410 +CSC 416 +CSC 425 +CSC 427 +CSC 429 +CSC 452 +CSC 454 +CSC 461 +CSC 462 +CSC 471 +CSC 490 +CSC 492 +CSC 495 +CSC 610 +CSC 616 +CSC 625 +CSC 629 +CSC 652 +CSC 654 +CSC 661 +CSC 662 +CSC 693 +CSC 694 +CSC 698 +CSC 699 +CSC 803 +CSD 150 +CSD 219 +CSD 333 +CSD 336 +CSD 337 +CSD 338 +CSD 456 +CSD 457 +CSD 476 +CSD 488 +CSD 557 +CSD 604 +CSD 616 +CSD 632 +CSD 633 +CSD 637 +CSD 650 +CSD 677 +CSD 678 +CSD 760 +CSD 780 +CSD 790 +CSD 799 +CSD 802 +CST 105 +CST 200 +CST 207 +CST 210 +CST 300 +CST 315 +CST 333 +CST 341 +CST 342 +CST 343 +CST 344 +CST 390 +CST 399 +CST 400X +CST 406 +CST 407 +CST 412 +CST 460 +CST 499 +CST 600X +CST 602 +CST 612 +CST 698 +CST 803 +CTP 111 +CTP 124 +CTP 158 +CTP 190 +CTP 204 +CTP 258 +CTP 290 +CTP 324 +CTP 326 +CTP 390 +CTP 391 +CTP 393 +CTP 404 +CTP 459 +CTP 490 +CTP 492 +CTR 101 +CTR 102 +CTR 111 +CTR 212 +CTR 213 +CTR 251 +CTR 314 +CTR 332 +CTR 338 +CTR 346 +CTR 415 +CTR 416 +CTR 417 +CTR 418 +CTR 419 +CTR 429 +CTR 437 +CTR 444 +CTR 613 +CTR 615 +CTR 634 +CTR 637 +CTR 644 +CTR 646 +CTR 695 +CTR 696 +CTR 697 +CTR 698 +DCE 101 +DCE 111 +DCE 112 +DCE 113 +DCE 114 +DCE 116 +DCE 132 +DCE 143 +DCE 200 +DCE 207 +DCE 212 +DCE 214 +DCE 231 +DCE 243 +DCE 250 +DCE 253 +DCE 255 +DCE 312 +DCE 314 +DCE 316 +DCE 330 +DCE 331 +DCE 343 +DCE 355 +DCE 360 +DCE 405 +DCE 432 +DCE 443 +DCE 446 +DCE 453 +DCE 459 +DCE 461 +DCE 463 +DCE 470 +DCE 475 +DCE 487 +DCE 493 +DCE 605 +DCE 611 +DCE 621 +DCE 624 +DCE 632 +DCE 645 +DCE 650 +DCE 651 +DCE 662 +DCE 663 +DCE 695 +DCE 697 +DCE 698 +ECO 100 +ECO 101 +ECO 201 +ECO 201R +ECO 202 +ECO 250 +ECO 250R +ECO 300 +ECO 301 +ECO 302 +ECO 312 +ECO 319 +ECO 350 +ECO 380 +ECO 413 +ECO 426 +ECO 498 +ECO 642 +ECO 644 +ECO 646 +ECO 731 +ECO 736 +ECO 737 +ECO 739 +ECO 746 +ECO 797 +ECO 798 +ECO 799 +ECO 802 +ELC 201 +ELC 375 +ELC 381 +ELC 400X +ELC 401 +ELC 615 +ELC 671 +ELC 684 +ELC 685 +ELC 688 +ELC 690 +ELC 692 +ELC 694 +ELC 705 +ELC 708 +ELC 730 +ELC 749 +ELC 767 +ELC 775 +ELC 790 +ELC 799 +ELC 802 +ELC 803 +ENG 101 +ENG 102 +ENG 103 +ENG 104 +ENG 105 +ENG 106 +ENG 107 +ENG 108 +ENG 109 +ENG 110 +ENG 208 +ENG 209 +ENG 210 +ENG 211 +ENG 212 +ENG 215 +ENG 219 +ENG 221 +ENG 225 +ENG 230 +ENG 251 +ENG 252 +ENG 262 +ENG 303 +ENG 304 +ENG 305 +ENG 306 +ENG 315 +ENG 316 +ENG 325 +ENG 326 +ENG 327 +ENG 331 +ENG 333 +ENG 337 +ENG 342 +ENG 347 +ENG 350 +ENG 360 +ENG 363 +ENG 372 +ENG 381 +ENG 390 +ENG 391 +ENG 401 +ENG 402 +ENG 425 +ENG 426 +ENG 622 +ENG 623 +ENG 626 +ENG 628 +ENG 642 +ENG 650 +ENG 659 +ENG 664 +ENG 672 +ENG 674 +ENG 678 +ENG 680 +ENG 682 +ENG 688 +ENG 699 +ENG 725 +ENG 742 +ENG 778 +ENG 780 +ENG 799 +ENT 130 +ENT 200 +ENT 201 +ENT 202 +ENT 240 +ENT 250 +ENT 275 +ENT 276 +ENT 300 +ENT 307 +ENT 312 +ENT 324 +ENT 327 +ENT 328 +ENT 335 +ENT 336 +ENT 339 +ENT 342 +ENT 362 +ENT 394 +ENT 396 +ENT 402 +ENT 427 +ENT 430 +ENT 440 +ENT 450 +ENT 451 +ENT 530 +ENT 540 +ENT 606 +ERM 402 +ERM 405 +ERM 604 +ERM 633 +ERM 643 +ERM 667 +ERM 675 +ERM 681 +ERM 692 +ERM 729 +ERM 731 +ERM 799 +ERM 802 +ERM 803 +ESL 601 +ESL 610 +ESL 611 +ESL 612 +ESL 613 +ESL 620 +ESL 621 +ESL 622 +ESL 623 +ESL 630 +ESL 631 +ESL 632 +ESL 633 +FIN 200 +FIN 300 +FIN 315 +FIN 330 +FIN 335 +FIN 360 +FIN 410 +FIN 442 +FIN 449 +FIN 450 +FIN 499 +FMS 115 +FMS 120 +FMS 121 +FMS 141 +FMS 160 +FMS 170 +FMS 184 +FMS 195 +FRE 101 +FRE 102 +FRE 203 +FRE 204 +FRE 210 +FRE 241 +FRE 303 +FRE 332 +FRE 353 +FRE 455 +FRE 693 +FYE 101 +GEN 602 +GEN 618 +GEN 630 +GEN 648 +GEN 688 +GEN 719 +GEN 749 +GER 101 +GER 102 +GER 203 +GER 204 +GER 217 +GER 218 +GER 221 +GER 310 +GER 311 +GER 405 +GES 103 +GES 103L +GES 104 +GES 105 +GES 121 +GES 121L +GES 164 +GES 301 +GES 305 +GES 306 +GES 314 +GES 314L +GES 325 +GES 331 +GES 357 +GES 359 +GES 362 +GES 368 +GES 370 +GES 382 +GES 384 +GES 400 +GES 419 +GES 421 +GES 458 +GES 490 +GES 495 +GES 619 +GES 620 +GES 621 +GES 630 +GES 631 +GES 658 +GES 684 +GES 690 +GES 695 +GES 699 +GES 701 +GES 702 +GES 730 +GES 790 +GES 799 +GRK 202 +GRK 204 +GRK 341 +GRO 201 +GRO 621 +GRO 634 +GRO 676 +HDF 211 +HDF 212 +HDF 250 +HDF 301 +HDF 302 +HDF 303 +HDF 304 +HDF 315 +HDF 321 +HDF 341 +HDF 390 +HDF 401 +HDF 409 +HDF 415 +HDF 435 +HDF 436 +HDF 440 +HDF 445 +HDF 450 +HDF 455 +HDF 464 +HDF 468 +HDF 470 +HDF 477 +HDF 482 +HDF 499 +HDF 602 +HDF 606 +HDF 651 +HDF 652 +HDF 661 +HDF 699 +HDF 703 +HDF 745 +HDF 765 +HDF 790 +HDF 799 +HDF 801 +HED 603 +HED 606 +HED 608 +HED 609 +HED 612 +HED 688 +HED 692 +HED 748 +HED 775 +HED 799 +HED 802 +HHS 120 +HHS 125 +HHS 135 +HHS 140 +HHS 250 +HHS 275 +HHS 650 +HHS 654 +HHS 746 +HHS 750 +HIS 204 +HIS 206 +HIS 207 +HIS 208 +HIS 209 +HIS 211 +HIS 212 +HIS 213 +HIS 217 +HIS 218 +HIS 221 +HIS 223 +HIS 239 +HIS 240 +HIS 313 +HIS 315 +HIS 322 +HIS 341 +HIS 344 +HIS 347 +HIS 349 +HIS 350 +HIS 378 +HIS 391 +HIS 392 +HIS 402 +HIS 403 +HIS 411B +HIS 411C +HIS 414 +HIS 422 +HIS 430 +HIS 446 +HIS 469 +HIS 514 +HIS 522 +HIS 568 +HIS 624 +HIS 625 +HIS 626 +HIS 631 +HIS 697 +HIS 702 +HIS 704 +HIS 706 +HIS 709 +HIS 716 +HIS 721 +HIS 723 +HIS 751 +HIS 799 +HIS 802 +HIS 803 +IAF 604 +IAF 605 +IAF 606 +IAR 102 +IAR 112 +IAR 202 +IAR 212 +IAR 221 +IAR 302 +IAR 331 +IAR 332 +IAR 333 +IAR 412 +IAR 427 +IAR 432 +IAR 451 +IAR 452 +IAR 465 +IAR 502 +IAR 527 +IAR 565 +IAR 600 +IAR 601 +IAR 602 +IAR 624 +IAR 625 +IAR 631 +IAR 665 +IAR 690 +IAR 699 +IAR 801 +IGS 200 +IGS 223 +IGS 297 +IGS 400 +IGS 495 +IPS 301 +IPS 302 +IPS 303 +IPS 304 +IPS 305 +IPS 306 +IPS 401 +IPS 402 +IPS 405 +IPS 410 +ISM 110 +ISM 116 +ISM 201 +ISM 210 +ISM 218 +ISM 280 +ISM 310 +ISM 324 +ISM 411 +ISM 425 +ISM 452 +ISM 646 +ISM 647 +ISM 666 +ISM 667 +ISM 670 +ISM 671 +ISM 678 +ISM 696 +ISM 698 +ISM 755 +ISM 782 +ISM 788 +ISM 789 +ISM 799 +ISM 802 +IST 200X +IST 300X +JNS 102 +JNS 204 +JNS 210 +JNS 302 +JNS 305 +KIN 101 +KIN 104 +KIN 106 +KIN 110 +KIN 130 +KIN 131 +KIN 135 +KIN 140 +KIN 150 +KIN 151 +KIN 171 +KIN 180 +KIN 203 +KIN 206 +KIN 214 +KIN 220 +KIN 231 +KIN 250 +KIN 263 +KIN 263L +KIN 264 +KIN 265 +KIN 265L +KIN 272 +KIN 291 +KIN 291L +KIN 292 +KIN 292L +KIN 307 +KIN 330 +KIN 340 +KIN 353 +KIN 354 +KIN 370 +KIN 375 +KIN 375L +KIN 376 +KIN 379 +KIN 386 +KIN 388 +KIN 419 +KIN 420 +KIN 441 +KIN 461 +KIN 466 +KIN 471 +KIN 475 +KIN 477 +KIN 496 +KIN 520 +KIN 601 +KIN 620 +KIN 640 +KIN 645 +KIN 649 +KIN 669 +KIN 695 +KIN 699 +KIN 700 +KIN 701 +KIN 704 +KIN 705 +KIN 709 +KIN 713 +KIN 714 +KIN 718 +KIN 720 +KIN 721 +KIN 723 +KIN 724 +KIN 729 +KIN 735 +KIN 744 +KIN 745 +KIN 746 +KIN 778 +KIN 795 +KIN 799 +KIN 801 +KIN 802 +LAT 102 +LAT 203 +LAT 204 +LAT 430 +LIS 120 +LIS 200 +LIS 600 +LIS 610 +LIS 617 +LIS 618 +LIS 619 +LIS 620 +LIS 630 +LIS 635 +LIS 636 +LIS 640 +LIS 643 +LIS 649 +LIS 650 +LIS 653 +LIS 654 +LIS 655 +LIS 656 +LIS 658 +LIS 662 +LIS 664 +LIS 665 +LIS 672 +LIS 688 +LIS 690 +LIS 691 +LIS 692 +LIS 693 +LIS 698 +LLC 130 +LLC 130R +LLC 222 +LLC 250 +LLC 340 +LLC 389 +LLC 455 +LLC 465 +LLC 468 +LLC 601 +LLC 665 +MAS 610A +MAS 610B +MAS 610C +MAS 610D +MAS 620A +MAS 620B +MAS 620C +MAS 630A +MAT 112 +MAT 115 +MAT 120 +MAT 150 +MAT 151 +MAT 181 +MAT 190 +MAT 191 +MAT 253 +MAT 292 +MAT 293 +MAT 310 +MAT 322 +MAT 390 +MAT 394 +MAT 395 +MAT 405 +MAT 414 +MAT 427 +MAT 465 +MAT 486 +MAT 490 +MAT 493 +MAT 602 +MAT 627 +MAT 686 +MAT 687 +MAT 696 +MAT 701 +MAT 709 +MAT 728 +MAT 741 +MAT 790 +MAT 799 +MAT 801 +MAT 802 +MBA 701 +MBA 703 +MBA 707 +MBA 708 +MBA 712 +MBA 717 +MBA 718 +MBA 721 +MBA 732 +MBA 741 +MBA 742 +MBA 743 +MGT 300 +MGT 301 +MGT 302 +MGT 304 +MGT 312 +MGT 313 +MGT 314 +MGT 315 +MGT 317 +MGT 318 +MGT 330 +MGT 354 +MGT 375 +MGT 400 +MGT 403 +MGT 414 +MGT 475 +MGT 491 +MGT 493 +MKT 309 +MKT 320 +MKT 324 +MKT 326 +MKT 328 +MKT 330 +MKT 407 +MKT 422 +MKT 424 +MKT 426 +MKT 427 +MKT 429 +MKT 444 +MKT 450 +MST 100 +MST 190 +MST 204 +MST 205 diff --git a/ScheduleCreator/resources/views/primary.fxml b/ScheduleCreator/resources/views/primary.fxml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> +<?import java.lang.*?> +<?import javafx.scene.control.*?> +<?import javafx.scene.image.*?> +<?import javafx.scene.layout.*?> +<?import javafx.scene.text.*?> <?import javafx.scene.control.Button?> <?import javafx.scene.image.Image?> <?import javafx.scene.image.ImageView?> @@ -7,27 +12,22 @@ <?import javafx.scene.text.Font?> <?import javafx.scene.text.Text?> -<AnchorPane id="AnchorPane" prefHeight="276.0" prefWidth="496.0" stylesheets="@../style.css" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ScheduleCreator.controllers.PrimaryController"> +<AnchorPane id="AnchorPane" prefHeight="900" prefWidth="1750" stylesheets="@../style.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ScheduleCreator.controllers.PrimaryController"> <children> - <Button layoutX="31.0" layoutY="79.0" onAction="#changeToSelectClasses" prefHeight="39.0" prefWidth="286.0" text="Find/Select Classes"> + <Button layoutX="532.0" layoutY="373.0" onAction="#changeToSelectClasses" prefHeight="39.0" prefWidth="286.0" text="Schedule Generator"> <font> <Font size="18.0" /> </font></Button> - <Button layoutX="31.0" layoutY="145.0" onAction="#changeToRegistrationScreen" prefHeight="39.0" prefWidth="286.0" text="My Registration Details"> + <Button layoutX="532.0" layoutY="439.0" onAction="#changeToRegistrationScreen" prefHeight="39.0" prefWidth="286.0" text="My Registration Details"> <font> <Font size="18.0" /> </font></Button> - <Text layoutX="14.0" layoutY="45.0" strokeType="OUTSIDE" strokeWidth="0.0" text="UNCG Schedule Creator" wrappingWidth="451.1748046875"> + <Text layoutX="515.0" layoutY="339.0" strokeType="OUTSIDE" strokeWidth="0.0" text="UNCG Schedule Creator" wrappingWidth="451.1748046875"> <font> <Font name="System Italic" size="37.0" /> </font> </Text> - <Button layoutX="31.0" layoutY="214.0" prefHeight="39.0" prefWidth="286.0" text="Schedule Generator (DUMMY)"> - <font> - <Font size="18.0" /> - </font> - </Button> - <ImageView fitHeight="181.0" fitWidth="113.0" layoutX="361.0" layoutY="75.0" pickOnBounds="true" preserveRatio="true"> + <ImageView fitHeight="181.0" fitWidth="113.0" layoutX="862.0" layoutY="369.0" pickOnBounds="true" preserveRatio="true"> <image> <Image url="@../uncg_emblem_3-color-174x300.png" /> </image> diff --git a/ScheduleCreator/resources/views/select_courses.fxml b/ScheduleCreator/resources/views/select_courses.fxml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> +<?import java.lang.*?> +<?import javafx.scene.control.*?> +<?import javafx.scene.layout.*?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.ScrollPane?> @@ -10,32 +13,50 @@ <?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.StackPane?> -<AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" stylesheets="@../style.css" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ScheduleCreator.controllers.CoursesController"> +<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="900" prefWidth="1750" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ScheduleCreator.controllers.CoursesController"> <children> - <Button layoutX="14.0" layoutY="22.0" onAction="#backToPrimary" text="Back" /> - <Button layoutX="193.0" layoutY="80.0" onAction="#addCourse" text="Add Course" /> - <StackPane layoutX="200.0" layoutY="131.0" prefHeight="150.0" prefWidth="200.0" /> - <AnchorPane layoutX="386.0" layoutY="16.0" prefHeight="368.0" prefWidth="200.0" stylesheets="@../style.css"> - <children> - <Label layoutX="52.0" layoutY="19.0" text="Find Courses: " /> - <TextField layoutX="26.0" layoutY="45.0" /> - </children> - </AnchorPane> - <ScrollPane layoutX="34.0" layoutY="124.0" maxHeight="1000.0" prefViewportHeight="252.0" prefViewportWidth="315.0"> - <content> - <GridPane fx:id="courses" hgap="5.0" layoutX="34.0" layoutY="124.0" prefHeight="237.0" prefWidth="300.0" vgap="5.0"> - <columnConstraints> - <ColumnConstraints /> - </columnConstraints> - <rowConstraints> - <RowConstraints /> - <RowConstraints /> - </rowConstraints> - <children> + <TextField layoutX="126.0" layoutY="184.0" prefHeight="25.0" prefWidth="262.0" promptText="Search" /> + <Button fx:id="searchButton" layoutX="407.0" layoutY="184.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="38.0" text="Go" /> + + <ComboBox fx:id="comboBox" layoutX="126.0" layoutY="306.0" prefHeight="25.0" prefWidth="262.0" promptText="-" /> + <Button fx:id="courseButton" layoutX="407.0" layoutY="306.0" mnemonicParsing="false" onAction="#addSelectedCourse" text="Add" /> + + <ListView fx:id="selectedCourses" layoutX="126.0" layoutY="403.0" prefHeight="85.0" prefWidth="262.0" /> + <Button fx:id="getSectionsButton" layoutX="125.0" layoutY="497.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="123.0" text="Get Sections" /> + <Button fx:id="removeCourseButton" layoutX="257.0" layoutY="497.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="131.0" text="Remove" /> + + <ComboBox fx:id="sectionBox" layoutX="126.0" layoutY="596.0" prefHeight="25.0" prefWidth="262.0" promptText="Select Section" /> + <Button fx:id="AddSectionButton" layoutX="407.0" layoutY="596.0" mnemonicParsing="false" text="Add" /> + + <GridPane gridLinesVisible="true" layoutX="663.0" layoutY="50.0" prefHeight="822.0" prefWidth="872.0" style="-fx-border-color: black;"> + <columnConstraints> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + </columnConstraints> + <rowConstraints> + <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 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> + </GridPane> - </children></GridPane> - </content> - </ScrollPane> - <TextField fx:id="courseText" layoutX="35.0" layoutY="81.0" /> + <Label layoutX="125.0" layoutY="275.0" text="Available Courses" /> + <Label layoutX="126.0" layoutY="378.0" text="Selected Courses" /> + <Label layoutX="731.0" layoutY="22.0" text="Monday" /> + <Label layoutX="903.0" layoutY="22.0" text="Tuesday" /> + <Label layoutX="1087.0" layoutY="22.0" text="Wednesday" /> + <Label layoutX="1257.0" layoutY="22.0" text="Thursday" /> + <Label layoutX="1435.0" layoutY="23.0" text="Friday" /> + </children> </AnchorPane>