<commit_before>/**
 * Narvaro: @VERSION@
 * Build Date: @DATE@
 * Commit Head: @HEAD@
 * JDK: @JDK@
 * ANT: @ANT@
 *
 */

package edu.csus.ecs.moneybeets.narvaro.ui;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.YearMonth;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.TimerTask;

import edu.csus.ecs.moneybeets.narvaro.model.DataManager;
import edu.csus.ecs.moneybeets.narvaro.model.MonthData;
import edu.csus.ecs.moneybeets.narvaro.model.ParkMonth;
import edu.csus.ecs.moneybeets.narvaro.model.TimeSpan;
import edu.csus.ecs.moneybeets.narvaro.util.ConfigurationManager;
import edu.csus.ecs.moneybeets.narvaro.util.TaskEngine;
import javafx.application.Platform;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.beans.value.ChangeListener;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.Group;
import javafx.scene.chart.LineChart;
import javafx.scene.control.*;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Region;
import javafx.stage.FileChooser;
import javafx.stage.FileChooser.ExtensionFilter;

import javafx.util.Callback;
import org.apache.log4j.Logger;

public class Controller {

    private static final Logger LOG = Logger.getLogger(Controller.class.getName());

    /* Enter Data Tab Start */
    @FXML
    private Tab enterDataTab;
    @FXML
    private ComboBox<String> selectAParkDropDownMenu;
    @FXML
    private ComboBox<Integer> enterYear;
    @FXML
    private ComboBox<Month> enterMonth;
    @FXML
    private TextField conversionFactorPaidDayUseTF;
    @FXML
    private TextField paidDayUseTotalsTF;
    @FXML
    private TextField specialEventsTF;
    @FXML
    private TextField annualDayUseTF;
    @FXML
    private TextField dayUseTF;
    @FXML
    private TextField seniorTF;
    @FXML
    private TextField disabledTF;
    @FXML
    private TextField goldenBearTF;
    @FXML
    private TextField disabledVeteranTF;
    @FXML
    private TextField nonResOHVPassTF;
    @FXML
    private TextField annualPassSaleTF;
    @FXML
    private TextField campingTF;
    @FXML
    private TextField seniorCampingTF;
    @FXML
    private TextField disabledCampingTF;
    @FXML
    private TextField conversionFactorFreeDayUseTF;
    @FXML
    private TextField freeDayUseTotalsTF;
    @FXML
    private TextField totalVehiclesTF;
    @FXML
    private TextField totalPeopleTF;
    @FXML
    private TextField ratioTF;
    @FXML
    private TextArea commentsTB;
    @FXML
    private TextField mcTF;
    @FXML
    private TextField atvTF;
    @FXML
    private TextField fourByFourTF;
    @FXML
    private TextField rovTF;
    @FXML
    private TextField aqmaTF;
    @FXML
    private TextField allStarKartingTF;
    @FXML
    private TextField hangtownTF;
    @FXML
    private TextField otherTF;
    @FXML
    private Group userDataGroup;
    @FXML
    private Button clearButton;
    @FXML
    private Button submitButton;
    @FXML
    private ImageView submitButtonStatusIndicator;
    @FXML
    private Button browseFileButton;
    @FXML
    private TextField browseFileTF;
    @FXML
    private Button addParkButton1;
    @FXML
    private TextField addParkTF;
    /* Enter Data Tab End */

    /* View Data Tab Start */
    @FXML
    private Tab viewDataTab;
    @FXML
    private ComboBox<Month> monthSelectionOne;
    @FXML
    private ComboBox<Integer> yearSelectionOne;
    @FXML
    private ComboBox<Month> monthSelectionTwo;
    @FXML
    private ComboBox<Integer> yearSelectionTwo;
    @FXML
    private ListView<String> parkView;
    @FXML
    private Button searchButton;
    @FXML
    private ScrollPane scrollPane;
    @FXML
    private AnchorPane viewDataPane;
    @FXML
    private TableView viewDataTable;
    /* View Data Tab End */

    /* Graph Data Tab Start */
    @FXML
    private Tab graphDataTab;
    @FXML
    private DatePicker selectDateX;
    @FXML
    private DatePicker selectDateY;
    @FXML
    private ToggleGroup graphType;
    @FXML
    private Button viewDataButton;
    @FXML
    private Button view449FormButton;
    @FXML
    private Button graphButton;
    @FXML
    private Button printButton;
    @FXML
    private LineChart<?, ?> graphArea;
    @FXML
    private MenuButton selectParkOne;
    @FXML
    private MenuButton selectParkTwo;
    @FXML
    private MenuButton selectCategory;
    /* Graph Data Tab End */
    
    private Image okImage;
    private Image errorImage;
    private Image busyImage;
    
    @FXML
    public void initialize() {
        
        updateParkLists();

        // populate year field on enter data tab and view data tab<commit_msg>Fix imports, add graph data vars<commit_after>/**
 * Narvaro: @VERSION@
 * Build Date: @DATE@
 * Commit Head: @HEAD@
 * JDK: @JDK@
 * ANT: @ANT@
 *
 */

package edu.csus.ecs.moneybeets.narvaro.ui;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.YearMonth;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.TimerTask;

import edu.csus.ecs.moneybeets.narvaro.model.DataManager;
import edu.csus.ecs.moneybeets.narvaro.model.MonthData;
import edu.csus.ecs.moneybeets.narvaro.model.ParkMonth;
import edu.csus.ecs.moneybeets.narvaro.model.TimeSpan;
import edu.csus.ecs.moneybeets.narvaro.util.ConfigurationManager;
import edu.csus.ecs.moneybeets.narvaro.util.TaskEngine;
import javafx.application.Platform;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.beans.value.ChangeListener;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.Group;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.DatePicker;
import javafx.scene.control.ListView;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.SelectionMode;
import javafx.scene.control.Tab;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Region;
import javafx.stage.FileChooser;
import javafx.stage.FileChooser.ExtensionFilter;
import javafx.util.Callback;

import org.apache.log4j.Logger;

public class Controller {

    private static final Logger LOG = Logger.getLogger(Controller.class.getName());

    /* Enter Data Tab Start */
    @FXML
    private Tab enterDataTab;
    @FXML
    private ComboBox<String> selectAParkDropDownMenu;
    @FXML
    private ComboBox<Integer> enterYear;
    @FXML
    private ComboBox<Month> enterMonth;
    @FXML
    private TextField conversionFactorPaidDayUseTF;
    @FXML
    private TextField paidDayUseTotalsTF;
    @FXML
    private TextField specialEventsTF;
    @FXML
    private TextField annualDayUseTF;
    @FXML
    private TextField dayUseTF;
    @FXML
    private TextField seniorTF;
    @FXML
    private TextField disabledTF;
    @FXML
    private TextField goldenBearTF;
    @FXML
    private TextField disabledVeteranTF;
    @FXML
    private TextField nonResOHVPassTF;
    @FXML
    private TextField annualPassSaleTF;
    @FXML
    private TextField campingTF;
    @FXML
    private TextField seniorCampingTF;
    @FXML
    private TextField disabledCampingTF;
    @FXML
    private TextField conversionFactorFreeDayUseTF;
    @FXML
    private TextField freeDayUseTotalsTF;
    @FXML
    private TextField totalVehiclesTF;
    @FXML
    private TextField totalPeopleTF;
    @FXML
    private TextField ratioTF;
    @FXML
    private TextArea commentsTB;
    @FXML
    private TextField mcTF;
    @FXML
    private TextField atvTF;
    @FXML
    private TextField fourByFourTF;
    @FXML
    private TextField rovTF;
    @FXML
    private TextField aqmaTF;
    @FXML
    private TextField allStarKartingTF;
    @FXML
    private TextField hangtownTF;
    @FXML
    private TextField otherTF;
    @FXML
    private Group userDataGroup;
    @FXML
    private Button clearButton;
    @FXML
    private Button submitButton;
    @FXML
    private ImageView submitButtonStatusIndicator;
    @FXML
    private Button browseFileButton;
    @FXML
    private TextField browseFileTF;
    @FXML
    private Button addParkButton1;
    @FXML
    private TextField addParkTF;
    /* Enter Data Tab End */

    /* View Data Tab Start */
    @FXML
    private Tab viewDataTab;
    @FXML
    private ComboBox<Month> monthSelectionOne;
    @FXML
    private ComboBox<Integer> yearSelectionOne;
    @FXML
    private ComboBox<Month> monthSelectionTwo;
    @FXML
    private ComboBox<Integer> yearSelectionTwo;
    @FXML
    private ListView<String> parkView;
    @FXML
    private Button searchButton;
    @FXML
    private ScrollPane scrollPane;
    @FXML
    private AnchorPane viewDataPane;
    @FXML
    private TableView viewDataTable;
    /* View Data Tab End */

    /* Graph Data Tab Start */
    @FXML
    private ListView<String> selectParksGraphData;
    @FXML
    private ComboBox<Month> startingMonthGraphData;
    @FXML
    private ComboBox<Integer> startingYearGraphData;
    @FXML
    private ComboBox<Month> endingMonthGraphData;
    @FXML
    private ComboBox<Integer> endingYearGraphData;
    @FXML
    private ListView<String> selectAFieldGraphData;
    @FXML
    private Button graphButton;
    @FXML
    private HBox graphViewPane;
    /* Graph Data Tab End */
    
    private Image okImage;
    private Image errorImage;
    private Image busyImage;
    
    @FXML
    public void initialize() {
        
        updateParkLists();

        // populate year field on enter data tab and view data tab
{'fraction_non_alphanumeric': 0.07595180722891566, 'fraction_numerical': 0.0006746987951807229, 'mean_word_length': 3.5015184381778743, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2401849', 'n_tokens_mistral': 3341, 'n_tokens_neox': 3257, 'n_words': 800}