<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.diirt.javafx.tools;

import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.ComboBox;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

/**
 * Allows the user to select some form of data (e.g. a Gaussian wave or a sine
 * wave) and graphs it.
 * 
 * @author mjchao
 */
abstract public class BaseGraphApp extends Application {
    
    final private DataSelectionPanel pnlData = new DataSelectionPanel();
    private BaseGraphView pnlGraph;
    final private MessagePanel pnlError = new MessagePanel();
    
    abstract public BaseGraphView getGraphView();
    <commit_msg>Document how to use BaseGraphApp<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.diirt.javafx.tools;

import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.ComboBox;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

/**
 * Allows the user to select some form of data (e.g. a Gaussian wave or a sine
 * wave) and graphs it.
 * <p>
 * To produce a custom graph app, e.g. a BubbleGraphApp, you first extend the
 * BaseGraphApp. Inside this new class, you must create the BaseGraphView object
 * templated with the correct Graph2DRendererUpdate for your graph type.
 * Furthermore, you must define how to create expressions to be sent to
 * PVManager for data. Inside the BaseGraphView object, you will also find a
 * Graph2DExpression object which represents the data to be plotted on the graph.
 * You can send updates to this if you choose to.
 * <p>
 * The BaseGraphView object is created, so you can define the getGraphView()
 * method. Now, everything should be all set up. Just override start(), 
 * add your data formulae, and your graph app should be complete.
 * 
 * @author mjchao
 */
abstract public class BaseGraphApp extends Application {
    
    final private DataSelectionPanel pnlData = new DataSelectionPanel();
    private BaseGraphView pnlGraph;
    final private MessagePanel pnlError = new MessagePanel();
    
    abstract public BaseGraphView getGraphView();
    
{'fraction_non_alphanumeric': 0.07285911602209945, 'fraction_numerical': 0.0006906077348066298, 'mean_word_length': 4.345018450184502, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6961308', 'n_tokens_mistral': 789, 'n_tokens_neox': 782, 'n_words': 314}