Added a help pop up pane.
This commit is contained in:
@@ -12,7 +12,7 @@ public enum SceneCode {
|
||||
AIRPORT_DIST_CALC("airport_dist_calc.fxml"), AIRLINE_ADD("airline_add_form.fxml"), AIRLINE_FILTER("airline_filter_form.fxml"),
|
||||
AIRPORT_ADD("airport_add_form.fxml"), AIRPORT_FILTER("airport_filter_form.fxml"), ROUTE_ADD("route_add_form.fxml"),
|
||||
ROUTE_FILTER("route_filter_form.fxml"), AIRLINE_EDIT("airline_edit_form.fxml"), AIRPORT_EDIT("airport_edit_form.fxml"),
|
||||
ROUTE_EDIT("route_edit_form.fxml"), FLIGHT_EDITOR("flight_editor_form.fxml");
|
||||
ROUTE_EDIT("route_edit_form.fxml"), FLIGHT_EDITOR("flight_editor_form.fxml"), HELP("help.fxml");
|
||||
|
||||
|
||||
private String filePath;
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package seng202.group9.GUI;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.scene.control.TextArea;
|
||||
import javafx.scene.text.Text;
|
||||
import javafx.scene.text.TextFlow;
|
||||
|
||||
/**
|
||||
* Created by spe76 on 30/09/16.
|
||||
*/
|
||||
public class HelpController extends Controller {
|
||||
@FXML
|
||||
private ListView listView;
|
||||
@FXML
|
||||
private TextArea textArea;
|
||||
|
||||
public static final ObservableList menu = FXCollections.observableArrayList();
|
||||
|
||||
public void load() {
|
||||
menu.addAll("Importing Data", "Viewing Data", "Manipulating Data", "Analysis");
|
||||
|
||||
textArea.setStyle("-fx-text-alignment: justify");
|
||||
listView.setItems(menu);
|
||||
}
|
||||
|
||||
public void sss() {
|
||||
String menuValue = listView.getSelectionModel().getSelectedItem().toString();
|
||||
if (menuValue == "Importing Data") {
|
||||
textArea.setText("You can import data from the first start up of the application and " +
|
||||
"from the 'File' menu on the top of the screen. \nTo import data, select the type " +
|
||||
"of data you wish to import. Then select the file (.csv and .txt file) from the " +
|
||||
"file selector. The data will be loaded into the program and taken to the " +
|
||||
"corresponding summary page.");
|
||||
} else if (menuValue == "Viewing Data") {
|
||||
textArea.setText("There are two types of views available: Summary view and Raw Data view. " +
|
||||
"These are accessable from the menu on the top of the screen under the " +
|
||||
"'View' tab. You first choose which set of data you want to view and then you can select" +
|
||||
" either 'Summary' or 'Raw Data'.\n" +
|
||||
" The summary view does not have every column but provides a map of where the " +
|
||||
"place is. \nThe raw data view allows the user to view the full data table.");
|
||||
} else if (menuValue == "Manipulating Data") {
|
||||
textArea.setText("Data manipulation is all available in the Raw Data views. There are four " +
|
||||
"ways to manipulate data: 'Add', 'Filter', 'Edit' and 'Delete'. \n" +
|
||||
"Add: To add a new entry, first go to the raw data view for that data type. Then click " +
|
||||
"on the add button located on the bottom of the page. Then fill out the entries in the " +
|
||||
"pop-up box and click add at the bottom of the screen. If there is an error with your entry, " +
|
||||
"a message will pop up to help you.\n" +
|
||||
"Filter: To filter all current entries, click on the filter option and a pop " +
|
||||
"up will appear. Then type in the fields you wish to filter by and press the filter button. " +
|
||||
"The table should update with the fields specified.\n" +
|
||||
"Edit: The edit function can be accessed by right clicking on the entry you wish to edit and" +
|
||||
" clicking the edit option. This will lead to a pop up where you can edit the current entry. " +
|
||||
" When the edit has been completed, you can press the apply button on the bottom of the pop up. " +
|
||||
"Again, when the program detects an invalid field, a message will pop up.\n" +
|
||||
"Delete: The delete function is also accessed by right clicking an entry and pressing the delete field. " +
|
||||
"This will come up with a pop up to confirm your delete. When you press ok, the entry will be deleted " +
|
||||
"from the program. The program also allows multiple deletes.");
|
||||
} else if (menuValue == "Analysis") {
|
||||
textArea.setText("There are two ways to do analysis. \nThe first method is to go to the raw data page and " +
|
||||
"press analyse. This will come up with specific graphs that are related to the set of data. " +
|
||||
"\nThe second method is by accessing the 'Analysis' button on the menu on the top of the page. " +
|
||||
"You can select which type of analysis you want from here.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -78,6 +78,10 @@ public class MenuController extends Controller{
|
||||
replaceSceneContent(SceneCode.INITIAL);
|
||||
}
|
||||
|
||||
public void goToHelp() {
|
||||
createPopUpStage(SceneCode.HELP, 600, 400);
|
||||
}
|
||||
|
||||
public void load() {
|
||||
//nothing to load
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<Insets bottom="15.0" />
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<Label text="Welcome to this screen!" GridPane.columnSpan="5" GridPane.halignment="CENTER">
|
||||
<Label text="Welcome!" GridPane.columnSpan="5" GridPane.halignment="CENTER">
|
||||
<font>
|
||||
<Font size="36.0" />
|
||||
</font>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.media.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" fx:controller="seng202.group9.GUI.HelpController">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="286.0" minWidth="10.0" prefWidth="200.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="471.0" minWidth="10.0" prefWidth="400.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="126.0" minHeight="0.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="305.0" minHeight="10.0" prefHeight="289.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="Help Section" GridPane.columnSpan="2" GridPane.halignment="CENTER">
|
||||
<font>
|
||||
<Font size="24.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<ListView fx:id="listView" onMouseClicked="#sss" prefHeight="303.0" prefWidth="208.0" GridPane.rowIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" />
|
||||
</GridPane.margin>
|
||||
</ListView>
|
||||
<TextArea fx:id="textArea" editable="false" prefHeight="200.0" prefWidth="200.0" promptText="Select a menu from the side to get information about it." style="-fx-text-alignment: justify;" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" right="10.0" />
|
||||
</GridPane.margin>
|
||||
<font>
|
||||
<Font size="16.0" />
|
||||
</font>
|
||||
</TextArea>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets top="10.0" />
|
||||
</padding>
|
||||
</GridPane>
|
||||
@@ -55,6 +55,7 @@
|
||||
<Menu mnemonicParsing="false" text="Help">
|
||||
<items>
|
||||
<MenuItem mnemonicParsing="false" onAction="#goToGettingStarted" text="Getting Started" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#goToHelp" text="Help Page" />
|
||||
</items>
|
||||
</Menu>
|
||||
</menus>
|
||||
|
||||
Reference in New Issue
Block a user