/*                                                                      *\
**                    SICU Stress Measurement System                    **
**                      Project P04  |  C380 Team A                     **
**          EBME 380: Biomedical Engineering Design Experience          **
**                    Case Western Reserve University                   **
**                          2016 Fall Semester                          **
\*                                                                      */

package edu.cwru.sicu_sms;

import processing.core.PApplet;
import processing.core.PFont;

/**
 * The main stage of the front-end program for interfacing with the electronic system.
 *
 * @since September 27, 2016
 * @author Ted Frohlich <ttf10@case.edu>
 * @author Abby Walker <amw138@case.edu>
 */
public class Main extends PApplet {
    
    public static void main(String[] args) {
        PApplet.main(new String[] {"--present", "edu.cwru.sicu_sms.Main"});
    }
    
    @Override
    public void settings() {
        fullScreen();
        focused = true;  // unlike size(int, int), fullscreen() loses the focus
        smooth();
    }
    
    @Override
    public void setup() {
        background(0);
    }
    
    @Override
    public void draw() {
        // fade background
        fill(0, 20);
        rect(0, 0, width-1, height-1);
        
        // display project name
        PFont font = createFont("Colonna MT", 64, true);
        textFont(font);
        textAlign(CENTER);
        fill(0, 0, 180);
        text("SICU Stress Measurement System", width/2, height/2 - 200);
        
        // draw orbiter
        stroke(0, 0, 210);
        fill(0, 0, 159);
        int t = millis();
        float x = 50 * sin(t/200f);
        float y = 50 * cos(t/200f);
        ellipse(width/2 + x, height/2 - y, 20, 20);
    }
    
}

@@ -558,61 +558,151 @@
 ort 
-processing.core.PApplet;%0Aimport processing.core.PFont
+javafx.application.Application;%0Aimport javafx.fxml.FXMLLoader;%0Aimport javafx.scene.Parent;%0Aimport javafx.scene.Scene;%0Aimport javafx.stage.Stage
 ;%0A%0A/
@@ -939,1008 +939,440 @@
 nds 
-P
 Appl
-et %7B%0A    %0A    public static void main(String%5B%5D args) %7B%0A        PApplet.main(new String%5B%5D %7B%22--present%22, %22edu.cwru.sicu_sms.Main%22%7D);%0A    %7D%0A    %0A    @Override%0A    public void settings() %7B%0A        fullScreen();%0A        focused = true;  // unlike size(int, int), fullscreen() loses the focus%0A        smooth();%0A    %7D%0A    %0A    @Override%0A    public void setup() %7B%0A        background(0);%0A    %7D%0A    %0A    @Override%0A    public void draw() %7B%0A        // fade background%0A        fill(0, 20);%0A        rect(0, 0, width-1, height-1);%0A        %0A        // display project name%0A        PFont font = createFont(%22Colonna MT%22, 64, true);%0A        textFont(font);%0A        textAlign(CENTER);%0A        fill(0, 0, 180);%0A        text(%22SICU Stress Measurement System%22, width/2, height/2 - 200);%0A        %0A        // draw orbiter%0A        stroke(0, 0, 210);%0A        fill(0, 0, 159);%0A        int t = millis();%0A        float x = 50 * sin(t/200f
+ication %7B%0A    %0A    @Override%0A    public void start(Stage primaryStage) throws Exception %7B%0A        Parent root = FXMLLoader.load(getClass().getResource(%22sicu-sms.fxml%22));%0A        primaryStage.setTitle(%22SICU Stress Measurement System%22);%0A        primaryStage.setScene(new Scene(root));%0A        primaryStage.setMaximized(true);%0A        primaryStage.show(
 );%0A    
+%7D%0A
     
-float y = 50 * cos(t/200f);%0A        ellipse(width/2 + x, height/2 - y, 20, 20
+%0A    public static void main(String%5B%5D args) %7B%0A        launch(args
 );%0A 

Rewrite Processing 'PApplet' as JavaFX 'Application'