javadoc created

This commit is contained in:
Joshua Perry 2023-02-05 21:19:57 +00:00
parent 193512eb63
commit 8767b8b498
1 changed files with 22 additions and 7 deletions

View File

@ -11,14 +11,25 @@ import javafx.scene.control.TextArea;
/** /**
* Class that defines the controller for the report View of the GUI * Class that defines the controller for the report View of the GUI
* Inherits from com.r0r5chach.controllers.Controller * Inherits from com.r0r5chach.controllers.Controller
* @author r0r5chach
*/ */
public class ReportController extends Controller { public class ReportController extends Controller {
/**
* Attribute that stores the competitor list for the report View
*/
@FXML @FXML
private ListView<Integer> competitorList; private ListView<Integer> competitorList;
/**
* Attribute that stores the output area for the report View
*/
@FXML @FXML
private TextArea outputArea; private TextArea outputArea;
/**
* Method that runs when the program initializes the edit View
* (param details copied from super implementation)
* @param url The location used to resolve relative paths for the root object
* @param rb The resources used to localize the root object
*/
@Override @Override
public void initialize(URL url, ResourceBundle rb) { public void initialize(URL url, ResourceBundle rb) {
Platform.runLater(() -> { Platform.runLater(() -> {
@ -26,8 +37,10 @@ public class ReportController extends Controller {
competitorList.setItems(FXCollections.observableList(competitorIds)); competitorList.setItems(FXCollections.observableList(competitorIds));
}); });
} }
/**
@FXML * Outputs the short details of the selected player to the output area
*/
@FXML //Triggers when the short details button is pressed
private void shortDetailsPress() { private void shortDetailsPress() {
Integer item = competitorList.getSelectionModel().getSelectedItem(); Integer item = competitorList.getSelectionModel().getSelectedItem();
outputArea.clear(); outputArea.clear();
@ -38,8 +51,10 @@ public class ReportController extends Controller {
outputArea.setText("Select A Competitor"); outputArea.setText("Select A Competitor");
} }
} }
/**
@FXML * Outputs the full details of the selected player to the output area
*/
@FXML //Triggers when the full details button is pressed
private void fullDetailsPress() { private void fullDetailsPress() {
Integer item = competitorList.getSelectionModel().getSelectedItem(); Integer item = competitorList.getSelectionModel().getSelectedItem();
if (item != null) { if (item != null) {
@ -50,4 +65,4 @@ public class ReportController extends Controller {
outputArea.setText("Select A Competitor"); outputArea.setText("Select A Competitor");
} }
} }
} }