javadoc created

This commit is contained in:
Joshua Perry 2023-02-05 20:58:39 +00:00
parent 2a7a7c81e3
commit 11b61afade
1 changed files with 48 additions and 20 deletions

View File

@ -13,41 +13,60 @@ import javafx.collections.FXCollections;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.control.ToggleGroup;
import javafx.scene.control.RadioButton;
/**
* Class that defines the controller for the filters View (filters.fxml) of the GUI
* Inherits from com.r0r5chach.controllers.Controller
* @author r0r5chach
*/
public class FiltersController implements Initializable {
/**
* Attribute that stores the filter for player number for the filter View
*/
@FXML
private TextField numberFilter;
/**
* Attribute that stores the filter for player name for the filter View
*/
@FXML
private TextField nameFilter;
/**
* Attribute that stores the filter for player level for the filter View
*/
@FXML
private ChoiceBox<Rank> levelFilter;
/**
* Attribute that stores the filter for player type for the filter View
*/
@FXML
private ToggleGroup typeFilter;
/**
* Attribute that stores the filter for player's favorite agent for the filter View
*/
@FXML
private ChoiceBox<ValorantAgent> agentFilter;
/**
* Attribute that stores the filter for player's favorite attacker for the filter View
*/
@FXML
private ChoiceBox<R6Attacker> attackerFilter;
/**
* Attribute that stores the filter for player's favorite defender for the filter View
*/
@FXML
private ChoiceBox<R6Defender> defenderFilter;
@FXML
private TextArea filterBox;
/**
* Attribute that stores the Array of currently selected filters for the filter View
*/
private static String[] filters;
/**
* 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
public void initialize(URL url, ResourceBundle rb) {
attackerFilter.setItems(FXCollections.observableList(Arrays.asList(R6Attacker.values())));
@ -59,8 +78,17 @@ public class FiltersController implements Initializable {
levelFilter.setItems(FXCollections.observableList(Arrays.asList(Rank.values())));
levelFilter.setValue(Rank.NONE);
}
@FXML
/**
* Gets the Array of currently selected filters
* @return the Array of currently selected filters
*/
public static String[] getFilters() {
return filters;
}
/**
* Sets the currently selected filters based off of the selections on the filters View
*/
@FXML //Triggers when mouse leaves the area of any of the selection boxes
private void setFilters() {
String[] output = new String[7];
for(int i= 0;i < output.length;i++ ) {
@ -86,11 +114,11 @@ public class FiltersController implements Initializable {
filters = output;
}
public static String[] getFilters() {
return filters;
}
/**
* Checks to see if a string is null
* @param string The string to be checked
* @return true if null; false otherwise
*/
private boolean isNull(String string) {
if (string == null) {
return true;