Commit 3cd42ed9 authored by Arne Styve's avatar Arne Styve
Browse files

Fixed spelling

parent f5b6bf32
# Contacts - an address book project
## Introduction
A JavaFX-project of a typical address book application. Used to demonstrate JavaFX, GUI design, use of the TableView-component and the mapping of the TabelView to the backend register. Also includes example of file handling.
A JavaFX-project of a typical address book application. Used to demonstrate JavaFX, GUI design, use of the
TableView-component and the mapping of the TableView to the backend register. Also includes example of file handling.
The project was developed for use in teaching in the course "IDATx2001 Programmering 2" at NTNU spring 2020.
![Screendump](Screendump.png)
![Screen dump](Screendump.png)
## Release notes
......@@ -19,16 +20,16 @@ v0.1 | First release with basic add, edit, delete functionality.
The project is made to demonstrate a typical application with a graphical user interface (GUI) implemented in JavaFX.
It's a classic address book example, where you can create contacts to be added to the address book, edit existing
contacts, and delete contacts.
The project does **not** make use of FXML and SceneBulider, but builds the GUI from within the Java code.
The project does **not** make use of FXML and SceneBuilder, but builds the GUI from within the Java code.
#### JavaFX concepts demonstrated in the project
The project uses JDK 8 for simplicity, since JavaFX was bundeled with the JDK up to and including JDK 8. After JDK 8
The project uses JDK 8 for simplicity, since JavaFX was bundled with the JDK up to and including JDK 8. After JDK 8
, JavaFX (and other packages) were moved into *modules* making it a bit more complex to create JavaFX based
applications.
The following JavaFX concepts are demonstrated in this project:
* General JavaFX structure: Stage, Scene, Scenegraph, Nodes etc.
* Event handling, using Lamda
* Event handling, using Lambda
* Menu bar, toolbar, status bar
* Buttons with icons
* MenuItems with icon and keyboard shortcuts.
......
......@@ -24,7 +24,7 @@ public class AddressBook implements Serializable, Iterable<ContactDetails> {
// TreeMap is a bit less efficient than a HashMap in terms of searching, du to the
// sorted order. For more details on the difference:
// https://javatutorial.net/difference-between-hashmap-and-treemap-in-java
private TreeMap<String, ContactDetails> book;
private final TreeMap<String, ContactDetails> book;
/**
* Creates an instance of the AddressBook, initialising the instance.
......@@ -92,7 +92,7 @@ public class AddressBook implements Serializable, Iterable<ContactDetails> {
}
/**
* Remove the contact with the given phonenumber from the address book.
* Remove the contact with the given phone number from the address book.
* The phone number should be one that is currently in use.
*
* @param phoneNumber The phone number to the contact to remove
......
......@@ -41,7 +41,7 @@ public class ContactsApp extends Application {
private ObservableList<ContactDetails> addressBookListWrapper;
// Need to keep track of the TableView-instance since we need to access it
// from different places in our GUI (menu, doubleclicking, toolbar etc.)
// from different places in our GUI (menu, double clicking, toolbar etc.)
private TableView<ContactDetails> contactDetailsTableView;
/**
......@@ -70,9 +70,9 @@ public class ContactsApp extends Application {
BorderPane root = new BorderPane(); // Create the root node. The Menu will be placed at the top
VBox topContainer = new VBox(); //Creates a container to hold all Menu Objects.
MenuBar mainMenu = createMenus(); //Creates our main menu to hold our Sub-Menus.
ToolBar toolBar = createToolBar(); // Creates a toolbar below the menubar
ToolBar toolBar = createToolBar(); // Creates a toolbar below the menu bar
// Place the menubar in the topContainer
// Place the menu bar in the topContainer
topContainer.getChildren().add(mainMenu);
// Place the Toolbar
topContainer.getChildren().add(toolBar);
......@@ -178,7 +178,7 @@ public class ContactsApp extends Application {
/**
* Create a statusbar to be added at the bottom of the GUI.
* Create a status bar to be added at the bottom of the GUI.
*
* @return a status bar
*/
......@@ -199,7 +199,7 @@ public class ContactsApp extends Application {
private ToolBar createToolBar() {
//Create some Buttons.
// Create the add new contact buton
// Create the add new contact button
Button addContactBtn = new Button();
//Set the icon/graphic for the ToolBar Buttons.
......@@ -238,7 +238,7 @@ public class ContactsApp extends Application {
/**
* Creates the menu bar to be placed above the toolbar.
*
* @return a menubar
* @return a menu bar
*/
private MenuBar createMenus() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment