diff --git a/docs/Developer-Guide.md b/docs/Developer-Guide.md index 75ace63..0725840 100644 --- a/docs/Developer-Guide.md +++ b/docs/Developer-Guide.md @@ -24,6 +24,7 @@ so that you can understand the big picture before moving on to the more detailed - [`MainApp` Class](#mainapp-class) - [`CommandBarController` Class](#commandbarcontroller-class) - [`SummaryController` Class](#summarycontroller-class) + - [`AuthorBean` Class](#authorbean-class) - [`FileStatsController` Class](#filestatscontroller-class) - [`FileStatsItem` Class](#filestatsitem-class) - [Testing](#testing) @@ -173,16 +174,6 @@ display that users will see. This class represents authors who have contributed to the project. Each `Author` can have multiple associated `CodeSnippet` objects. -The `Author` class is also specially constructed to make it easier for the GUI to use its fields. -`Author` objects have several fields of `Property` type. These class variables are special JavaFX constructs -which behave in a similar manner as typical Java types such as integer, double and String types. For example, -`Author` has a `IntegerProperty` type for its `linesOfCode` variable. This variable contains an integer -which can be accessed by calling `linesOfCode.get()`. - -By utilising JavaFX `Property` types, the GUI can interact directly with the `Author` class to render details in a table easily. - -> You can read more about JavaFX Properties [here](https://docs.oracle.com/javase/8/javafx/properties-binding-tutorial/binding.htm). - ## `CodeSnippet` Class Each `CodeSnippet` represents the lines of code between two consecutive author tags that were written by an `Author`. Since this code belongs to a file, a `SourceFile` object is associated with each `CodeSnippet` object. @@ -291,12 +282,26 @@ This class loads `Summary.fxml` which is a type of `StackPane` (also a type of ` > The use of `StackPane` ensures the `TableView` has a maximum height and width i.e fills the space given by its parent container. -`SummaryController` uses JavaFX's APIs to iterate through `Author` objects (from the `data` package) and -construct rows based on certain attributes of these objects. +`SummaryController` converts `Author` objects (from the `data` package) to their corresponding `AuthorBean` objects and +construct rows based on certain attributes of the `AuthorBean` objects. > More details of these JavaFX APIs can be found [here](https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/TableView.html). +## `AuthorBean` Class +The `AuthorBean` class is a wrapper for the `Author` class. It represents fields in the `Author` class in a way +that makes it easier for the GUI to interact with. + +`AuthorBean` objects have several fields of `Property` type. These class variables are special JavaFX constructs +which behave in a similar manner as typical Java types such as integer, double and String types. For example, +`AuthorBean` has a `IntegerProperty` type for its `linesOfCode` variable. This variable contains an integer +which can be accessed by calling `linesOfCode.get()`. + +By utilising JavaFX `Property` types, the GUI can interact indirectly with the `Author` class to render details +in a table easily without sacrificing the semantics of the `Author` class. + +> You can read more about JavaFX Properties [here](https://docs.oracle.com/javase/8/javafx/properties-binding-tutorial/binding.htm). + ## `FileStatsController` Class The `FileStatsController` controls the display that is shown when a user enters the `view` command. It shows the files that the specified target author has contributed to and the proportion diff --git a/docs/Diagrams.pptx b/docs/Diagrams.pptx index 2eb35ba..8ae3e11 100644 Binary files a/docs/Diagrams.pptx and b/docs/Diagrams.pptx differ diff --git a/docs/images/developer-guide/gui-class-diagram.png b/docs/images/developer-guide/gui-class-diagram.png index 7ba71ff..71cf884 100644 Binary files a/docs/images/developer-guide/gui-class-diagram.png and b/docs/images/developer-guide/gui-class-diagram.png differ