Improved the help menu item.
This commit is contained in:
@@ -5,6 +5,7 @@ import javafx.collections.ObservableList;
|
|||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.ListView;
|
import javafx.scene.control.ListView;
|
||||||
import javafx.scene.control.TextArea;
|
import javafx.scene.control.TextArea;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
import javafx.scene.text.Text;
|
import javafx.scene.text.Text;
|
||||||
import javafx.scene.text.TextFlow;
|
import javafx.scene.text.TextFlow;
|
||||||
|
|
||||||
@@ -15,35 +16,41 @@ public class HelpController extends Controller {
|
|||||||
@FXML
|
@FXML
|
||||||
private ListView listView;
|
private ListView listView;
|
||||||
@FXML
|
@FXML
|
||||||
private TextArea textArea;
|
private TextFlow textArea;
|
||||||
|
|
||||||
public static final ObservableList menu = FXCollections.observableArrayList();
|
public static final ObservableList menu = FXCollections.observableArrayList();
|
||||||
|
Text text = new Text();
|
||||||
|
|
||||||
public void load() {
|
public void load() {
|
||||||
menu.addAll("Importing Data", "Viewing Data", "Manipulating Data", "Analysis");
|
menu.addAll("Importing Data", "Viewing Data", "Manipulating Data", "Analysis");
|
||||||
|
|
||||||
textArea.setStyle("-fx-text-alignment: justify");
|
text = new Text("Please select an option on the left side menu to display its contents.");
|
||||||
|
textArea.getChildren().add(text);
|
||||||
|
|
||||||
listView.setItems(menu);
|
listView.setItems(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sss() {
|
public void sss() {
|
||||||
String menuValue = listView.getSelectionModel().getSelectedItem().toString();
|
String menuValue = listView.getSelectionModel().getSelectedItem().toString();
|
||||||
|
textArea.getChildren().clear();
|
||||||
if (menuValue == "Importing Data") {
|
if (menuValue == "Importing Data") {
|
||||||
textArea.setText("You can import data from the first start up of the application and " +
|
text = new Text("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 " +
|
"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 " +
|
"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 " +
|
"file selector. The data will be loaded into the program and taken to the " +
|
||||||
"corresponding summary page.");
|
"corresponding summary page.");
|
||||||
|
textArea.getChildren().add(text);
|
||||||
} else if (menuValue == "Viewing Data") {
|
} else if (menuValue == "Viewing Data") {
|
||||||
textArea.setText("There are two types of views available: Summary view and Raw Data view. " +
|
text = new Text("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 " +
|
"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" +
|
"'View' tab. You first choose which set of data you want to view and then you can select" +
|
||||||
" either 'Summary' or 'Raw Data'.\n" +
|
" either 'Summary' or 'Raw Data'.\n" +
|
||||||
" The summary view does not have every column but provides a map of where the " +
|
"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.");
|
"place is.\nThe raw data view allows the user to view the full data table.");
|
||||||
|
textArea.getChildren().add(text);
|
||||||
} else if (menuValue == "Manipulating Data") {
|
} else if (menuValue == "Manipulating Data") {
|
||||||
textArea.setText("Data manipulation is all available in the Raw Data views. There are four " +
|
text = new Text("Data manipulation is all available in the Raw Data views. There are four " +
|
||||||
"ways to manipulate data: 'Add', 'Filter', 'Edit' and 'Delete'. \n" +
|
"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 " +
|
"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 " +
|
"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, " +
|
"pop-up box and click add at the bottom of the screen. If there is an error with your entry, " +
|
||||||
@@ -58,11 +65,13 @@ public class HelpController extends Controller {
|
|||||||
"Delete: The delete function is also accessed by right clicking an entry and pressing the delete field. " +
|
"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 " +
|
"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.");
|
"from the program. The program also allows multiple deletes.");
|
||||||
|
textArea.getChildren().add(text);
|
||||||
} else if (menuValue == "Analysis") {
|
} 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 " +
|
text = new Text("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. " +
|
"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. " +
|
"\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.");
|
"You can select which type of analysis you want from here.");
|
||||||
|
textArea.getChildren().add(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<?import java.lang.*?>
|
<?import java.lang.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?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">
|
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng202.group9.GUI.HelpController">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="286.0" minWidth="10.0" prefWidth="200.0" />
|
<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 hgrow="SOMETIMES" maxWidth="471.0" minWidth="10.0" prefWidth="400.0" />
|
||||||
@@ -28,14 +28,14 @@
|
|||||||
<Insets bottom="10.0" left="10.0" right="10.0" />
|
<Insets bottom="10.0" left="10.0" right="10.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</ListView>
|
</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">
|
<ScrollPane prefHeight="200.0" prefWidth="200.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets bottom="10.0" right="10.0" />
|
<Insets bottom="10.0" right="10.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<font>
|
<content>
|
||||||
<Font size="16.0" />
|
<TextFlow fx:id="textArea" maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="289.0" prefWidth="364.0" textAlignment="JUSTIFY" />
|
||||||
</font>
|
</content>
|
||||||
</TextArea>
|
</ScrollPane>
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
<Insets top="10.0" />
|
<Insets top="10.0" />
|
||||||
|
|||||||
Reference in New Issue
Block a user