-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renamed screens package to match use case package, further debugging …
…not qqc ne fonctionne pas
- Loading branch information
Showing
23 changed files
with
205 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import entities.CourseMap; | ||
import screens.course_features.*; | ||
import use_cases.course_features.course_creation_use_case.CourseCreationDsGateway; | ||
import use_cases.course_features.course_creation_use_case.CourseCreationInputBoundary; | ||
import use_cases.course_features.course_creation_use_case.CourseCreationInteractor; | ||
import use_cases.course_features.course_creation_use_case.CourseCreationOutputBoundary; | ||
|
||
import javax.swing.*; | ||
import java.awt.*; | ||
import java.io.IOException; | ||
|
||
public class CourseCreationMain { | ||
public static void main(String[] args) { | ||
|
||
// Build the main program window | ||
JFrame application = new JFrame("Course Creation Example!"); | ||
CardLayout cardLayout = new CardLayout(); | ||
JPanel screens = new JPanel(cardLayout); | ||
application.add(screens); | ||
|
||
// Create parts to plug into use case + entities engine | ||
CourseCreationDsGateway course; | ||
try { | ||
course = new FileCourse("courses.ser"); | ||
// course = new InMemoryCourse(); | ||
} catch (IOException | ClassNotFoundException e) { | ||
throw new RuntimeException("Could not create file."); | ||
} | ||
|
||
CourseCreationOutputBoundary presenter = new CourseCreationPresenter(); | ||
CourseMap courseMap = new CourseMap(); | ||
CourseCreationInputBoundary interactor = new CourseCreationInteractor(course, presenter, courseMap); | ||
CourseCreationController controller = new CourseCreationController(interactor); | ||
|
||
// Build the GUI, plugging in the parts | ||
CourseCreationScreen createScreen = new CourseCreationScreen(controller, screens, cardLayout); | ||
screens.add(createScreen, "Create a new course"); | ||
cardLayout.show(screens, "create a new course"); | ||
application.pack(); | ||
application.setVisible(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import entities.CourseMap; | ||
import screens.course_features.*; | ||
import use_cases.course_features.course_enrolment_use_case.CourseEnrolmentDsGateway; | ||
import use_cases.course_features.course_enrolment_use_case.CourseEnrolmentInputBoundary; | ||
import use_cases.course_features.course_enrolment_use_case.CourseEnrolmentInteractor; | ||
import use_cases.course_features.course_enrolment_use_case.CourseEnrolmentOutputBoundary; | ||
|
||
import javax.swing.*; | ||
import java.awt.*; | ||
|
||
public class CourseEnrolmentMain { | ||
public static void main(String[] args) { | ||
|
||
// Build the main program window | ||
JFrame application = new JFrame("Course Enrolment Example!"); | ||
CardLayout cardLayout = new CardLayout(); | ||
JPanel screens = new JPanel(cardLayout); | ||
application.add(screens); | ||
|
||
// Create parts to plug into use case + entities engine | ||
CourseEnrolmentDsGateway course = null; | ||
|
||
CourseEnrolmentOutputBoundary presenter = new CourseEnrolmentPresenter(); | ||
|
||
// not to be initialized, for the sake of running only | ||
CourseMap courseMap = new CourseMap(); | ||
// not to be initialized, for the sake of running only | ||
|
||
CourseEnrolmentInputBoundary interactor = new CourseEnrolmentInteractor( | ||
course, presenter, courseMap, "studentid"); | ||
CourseEnrolmentController controller = new CourseEnrolmentController(interactor); | ||
|
||
// Build GUI, plug in parts | ||
CourseEnrolmentScreen enrolmentScreen = new CourseEnrolmentScreen(controller); | ||
screens.add(enrolmentScreen, "Enrol in a course"); | ||
cardLayout.show(screens, "enrol in course"); | ||
application.pack(); | ||
application.setVisible(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es_features/CourseCreationController.java → ...se_features/CourseCreationController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ourses_features/CourseCreationFailed.java → ...course_features/CourseCreationFailed.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ses_features/CourseCreationPresenter.java → ...rse_features/CourseCreationPresenter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package screens.courses_features; | ||
package screens.course_features; | ||
|
||
// Interface adapters layer | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s_features/CourseEnrolmentController.java → ...e_features/CourseEnrolmentController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...urses_features/CourseEnrolmentFailed.java → ...ourse_features/CourseEnrolmentFailed.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es_features/CourseEnrolmentPresenter.java → ...se_features/CourseEnrolmentPresenter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package screens.courses_features; | ||
package screens.course_features; | ||
|
||
// Interfaces adapters layer | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/courses_features/CourseFoundScreen.java → ...ns/course_features/CourseFoundScreen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package screens.courses_features; | ||
package screens.course_features; | ||
|
||
// Framework/Driver layer | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.