|
|
|
|
@ -5,6 +5,8 @@ import javafx.collections.ObservableList;
|
|
|
|
|
import javafx.fxml.FXML;
|
|
|
|
|
import javafx.scene.control.ListView;
|
|
|
|
|
import javafx.scene.control.TextArea;
|
|
|
|
|
import javafx.scene.control.TreeItem;
|
|
|
|
|
import javafx.scene.control.TreeView;
|
|
|
|
|
import javafx.scene.layout.Pane;
|
|
|
|
|
import javafx.scene.text.Text;
|
|
|
|
|
import javafx.scene.text.TextFlow;
|
|
|
|
|
@ -14,26 +16,62 @@ import javafx.scene.text.TextFlow;
|
|
|
|
|
*/
|
|
|
|
|
public class HelpController extends Controller {
|
|
|
|
|
@FXML
|
|
|
|
|
private ListView listView;
|
|
|
|
|
private TreeView listView;
|
|
|
|
|
@FXML
|
|
|
|
|
private TextFlow textArea;
|
|
|
|
|
|
|
|
|
|
public static final ObservableList menu = FXCollections.observableArrayList();
|
|
|
|
|
//public static final ObservableList menu = FXCollections.observableArrayList();
|
|
|
|
|
Text text = new Text();
|
|
|
|
|
TreeItem main_root = new TreeItem("Main Root");
|
|
|
|
|
|
|
|
|
|
TreeItem importing = new TreeItem("Importing Data");
|
|
|
|
|
TreeItem importing_start = new TreeItem("Importing on Startup");
|
|
|
|
|
TreeItem importing_after = new TreeItem("Importing after Startup");
|
|
|
|
|
|
|
|
|
|
TreeItem viewing = new TreeItem("Viewing Data");
|
|
|
|
|
|
|
|
|
|
TreeItem manipulating = new TreeItem("Manipulating Data");
|
|
|
|
|
TreeItem adding = new TreeItem("Adding Data");
|
|
|
|
|
TreeItem filter = new TreeItem("Filtering Data");
|
|
|
|
|
TreeItem edit = new TreeItem("Editing Data");
|
|
|
|
|
TreeItem delete = new TreeItem("Deleting Data");
|
|
|
|
|
|
|
|
|
|
TreeItem analysing = new TreeItem("Analysing Data");
|
|
|
|
|
TreeItem graphing = new TreeItem("Graphs");
|
|
|
|
|
TreeItem distance = new TreeItem("Distance Calculator");
|
|
|
|
|
|
|
|
|
|
public void load() {
|
|
|
|
|
menu.addAll("Importing Data", "Viewing Data", "Manipulating Data", "Analysis");
|
|
|
|
|
//menu.addAll("Importing Data", "Viewing Data", "Manipulating Data", "Analysis");
|
|
|
|
|
listView.setRoot(main_root);
|
|
|
|
|
listView.setShowRoot(false);
|
|
|
|
|
|
|
|
|
|
main_root.getChildren().add(importing);
|
|
|
|
|
importing.getChildren().add(importing_start);
|
|
|
|
|
importing.getChildren().add(importing_after);
|
|
|
|
|
|
|
|
|
|
main_root.getChildren().add(viewing);
|
|
|
|
|
|
|
|
|
|
main_root.getChildren().add(manipulating);
|
|
|
|
|
manipulating.getChildren().add(adding);
|
|
|
|
|
manipulating.getChildren().add(filter);
|
|
|
|
|
manipulating.getChildren().add(edit);
|
|
|
|
|
manipulating.getChildren().add(delete);
|
|
|
|
|
|
|
|
|
|
main_root.getChildren().add(analysing);
|
|
|
|
|
analysing.getChildren().add(graphing);
|
|
|
|
|
analysing.getChildren().add(distance);
|
|
|
|
|
|
|
|
|
|
text = new Text("Please select an option on the left side menu to display its contents.");
|
|
|
|
|
textArea.getChildren().add(text);
|
|
|
|
|
|
|
|
|
|
listView.setItems(menu);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void sss() {
|
|
|
|
|
String menuValue = listView.getSelectionModel().getSelectedItem().toString();
|
|
|
|
|
Object menuValue = null;
|
|
|
|
|
if (listView.getSelectionModel().getSelectedItem() != null) {
|
|
|
|
|
menuValue = listView.getSelectionModel().getSelectedItem();
|
|
|
|
|
}
|
|
|
|
|
textArea.getChildren().clear();
|
|
|
|
|
if (menuValue == "Importing Data") {
|
|
|
|
|
if (menuValue.equals("TreeItem[ value: Importing on Startup ]")) {
|
|
|
|
|
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 " +
|
|
|
|
|
"of data you wish to import. Then select the file (.csv and .txt file) from the " +
|
|
|
|
|
@ -72,6 +110,11 @@ public class HelpController extends Controller {
|
|
|
|
|
"\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.");
|
|
|
|
|
textArea.getChildren().add(text);
|
|
|
|
|
} else if (menuValue == "Graphs") {
|
|
|
|
|
text = new Text("gachiGASM");
|
|
|
|
|
textArea.getChildren().add(text);
|
|
|
|
|
} else {
|
|
|
|
|
text = new Text("Fuck you");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|