diff --git a/.gitignore b/.gitignore index ccd0144..d32f6f4 100644 --- a/.gitignore +++ b/.gitignore @@ -119,3 +119,7 @@ /Semester 2/Assignments/lab7_CalebFontenot/target/ /Semester 2/Assignments/lab8_CalebFontenot/target/ /Semester 2/Assignments/lab8_2_CalebFontenot/target/ +/Semester 2/Assignments/MP5_CalebFontenot/target/ +/Semester 2/Assignments/JavaFX_CalebFontenot/target/ +/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/private/ +/Semester 2/Assignments/JavaFX_CalebFontenot/build/ diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/JavaFX_CalebFontenot.html b/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/JavaFX_CalebFontenot.html new file mode 100644 index 0000000..22c07b1 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/JavaFX_CalebFontenot.html @@ -0,0 +1,75 @@ + + + +JavaFX_CalebFontenot.java + + + + +
/home/caleb/ASDV-Java/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/JavaFX_CalebFontenot.java
+
+package javafx_calebfontenot;
+import javafx.application.Application;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.scene.Scene;
+import javafx.scene.control.Button;
+import javafx.scene.layout.StackPane;
+import javafx.stage.Stage;
+
+public class JavaFX_CalebFontenot extends Application {
+    
+    @Override
+    public void start(Stage primaryStage)
+    {
+        Button btn = new Button();
+        btn.setText("Say 'Hello World'");
+        btn.setOnAction(new EventHandler<ActionEvent>() {
+            
+            @Override
+            public void handle(ActionEvent event)
+            {
+                System.out.println("Hello World!");
+            }
+        });
+        
+        
+        StackPane root = new StackPane();
+        root.getChildren().add(btn);
+        
+        Scene scene = new Scene(root, 300, 250);
+        
+        primaryStage.setTitle("Hello World!");
+        primaryStage.setScene(scene);
+        primaryStage.show();
+    }
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String[] args)
+    {
+        launch(args);
+    }
+    
+}
+
+
+ diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/ShowCircle.html b/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/ShowCircle.html new file mode 100644 index 0000000..4be6bc1 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/ShowCircle.html @@ -0,0 +1,67 @@ + + + +ShowCircle.java + + + + +
/home/caleb/ASDV-Java/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowCircle.java
+
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package javafx_calebfontenot;
+
+import javafx.application.Application;
+import javafx.scene.Scene;
+import javafx.scene.layout.Pane;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.Circle;
+import javafx.stage.Stage;
+
+/**
+ *
+ * @author caleb
+ */
+public class ShowCircle extends Application {
+
+    @Override
+    public void start(Stage primaryStage) 
+    {
+        Pane pane = new Pane();                                                      // Create a pane object
+        Scene scene = new Scene(pane, 300, 200);  // Create a scene object
+        primaryStage.setScene(scene);                                           // Set the stage scene to the scene object
+        primaryStage.show();                                                           // Make the window display on the screen
+        Circle c = new Circle(20);                                                 // Create a circle object
+        c.setCenterX(150);                                                            // Set the center X for the circle object to '150'
+        c.setCenterY(80);                                                              // Set the center Y for the circle object to '80'
+        c.setStroke(Color.BLUE);                                              // Set the circle outline to Blue
+        c.setFill(Color.RED);                                                     // Set the interior of the circle to Red
+        pane.getChildren().add(c);                                              // Add the circle object to the pane
+    }
+    public static void main(String[] args)
+    {
+        launch(args);
+    }
+}
+
+
+ diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/ShowCircleCentered.html b/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/ShowCircleCentered.html new file mode 100644 index 0000000..62658c1 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/ShowCircleCentered.html @@ -0,0 +1,76 @@ + + + +ShowCircleCentered.java + + + + +
/home/caleb/ASDV-Java/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowCircleCentered.java
+
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package javafx_calebfontenot;
+
+import javafx.application.Application;
+import javafx.scene.Scene;
+import javafx.scene.layout.Pane;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.Circle;
+import javafx.stage.Stage;
+
+/**
+ *
+ * @author caleb
+ */
+public class ShowCircleCentered extends Application {
+
+    @Override
+    public void start(Stage primaryStage)
+    {
+        // Create a pane to hold the Circle
+        Pane pane = new Pane();
+        
+        // Create a circle and set its properties
+        Circle circle = new Circle();
+        circle.centerXProperty().bind(pane.widthProperty().divide(2));
+        circle.centerYProperty().bind(pane.heightProperty().divide(2));
+        circle.setRadius(50);
+        circle.setStroke(Color.BLACK);
+        circle.setFill(Color.WHITE);
+        pane.getChildren().add(circle); // Add the circle to the pane
+        
+        // Create a scene and place it in the stage
+        Scene scene = new Scene(pane, 200, 200);
+        primaryStage.setTitle("ShowCircleCentered"); // Set the stage title
+        primaryStage.setScene(scene); // Place the scene in the stage
+        primaryStage.show(); // Display the stage
+    }
+    public static void main(String[] args)
+    {
+        launch(args);
+    }
+    
+}
+
+
+ diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/ShowRectangle.html b/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/ShowRectangle.html new file mode 100644 index 0000000..4c3df93 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/Printed HTMLs/ShowRectangle.html @@ -0,0 +1,69 @@ + + + +ShowRectangle.java + + + + +
/home/caleb/ASDV-Java/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowRectangle.java
+
+/*
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
+ * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
+ */
+package javafx_calebfontenot;
+
+import javafx.application.Application;
+import static javafx.application.Application.launch;
+import javafx.scene.Scene;
+import javafx.scene.layout.Pane;
+import javafx.scene.paint.Color;
+import javafx.scene.shape.Rectangle;
+import javafx.stage.Stage;
+
+/**
+ *
+ * @author caleb
+ */
+public class ShowRectangle extends Application {
+
+    @Override
+    public void start(Stage primaryStage)
+    {
+        Pane pane = new Pane();                                                      // Create a pane object
+        Scene scene = new Scene(pane, 300, 200);  // Create a scene object
+        primaryStage.setScene(scene);                                           // Set the stage scene to the scene object
+        primaryStage.show();                                                           // Make the window display on the screen
+        Rectangle r = new Rectangle(30, 30, 88, 44);
+        r.setX(30);
+        r.setY(30);
+        r.setStroke(Color.BLUE);                                              // Set the rectangle outline to Blue
+        r.setFill(Color.RED);                                                     // Set the interior of the rectangle to Red
+        pane.getChildren().add(r);                                              // Add the circle object to the pane
+    }
+
+    public static void main(String[] args)
+    {
+        launch(args);
+    }
+}
+
+
+ diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/build.xml b/Semester 2/Assignments/JavaFX_CalebFontenot/build.xml new file mode 100644 index 0000000..baa44ce --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/build.xml @@ -0,0 +1,53 @@ + + Builds, tests, and runs the project JavaFX_CalebFontenot. + + + diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/lab16-1.pdf b/Semester 2/Assignments/JavaFX_CalebFontenot/lab16-1.pdf new file mode 100644 index 0000000..7a6daaf Binary files /dev/null and b/Semester 2/Assignments/JavaFX_CalebFontenot/lab16-1.pdf differ diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/manifest.mf b/Semester 2/Assignments/JavaFX_CalebFontenot/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/build-impl.xml b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/build-impl.xml new file mode 100644 index 0000000..2978b93 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/build-impl.xml @@ -0,0 +1,1800 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set platform.home + Must set platform.bootcp + Must set platform.java + Must set platform.javac + + The J2SE Platform is not correctly set up. + Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files. + Either open the project in the IDE and setup the Platform with the same name or add it manually. + For example like this: + ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.${platform.active}.home" in a .properties file) + or ant -Dplatforms.${platform.active}.home=<path_to_JDK_home> jar (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + ${platform.java} -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/configs/Run_as_WebStart.properties b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/configs/Run_as_WebStart.properties new file mode 100644 index 0000000..670fff0 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/configs/Run_as_WebStart.properties @@ -0,0 +1,2 @@ +# Do not modify this property in this configuration. It can be re-generated. +$label=Run as WebStart diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/configs/Run_in_Browser.properties b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/configs/Run_in_Browser.properties new file mode 100644 index 0000000..f2a5a65 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/configs/Run_in_Browser.properties @@ -0,0 +1,2 @@ +# Do not modify this property in this configuration. It can be re-generated. +$label=Run in Browser diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/genfiles.properties b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/genfiles.properties new file mode 100644 index 0000000..6ee5cb0 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=ebd628e2 +build.xml.script.CRC32=94f41b4f +build.xml.stylesheet.CRC32=f85dc8f2@1.105.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=ebd628e2 +nbproject/build-impl.xml.script.CRC32=58460c11 +nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.105.0.48 diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/jfx-impl.xml b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/jfx-impl.xml new file mode 100644 index 0000000..6aeb313 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/jfx-impl.xml @@ -0,0 +1,4197 @@ + + + + + JavaFX-specific Ant calls + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${cssfileslist} + + + + + + + + + + + + + + + + + + + + + + + + self.addMappedName( + (source.indexOf("jfxrt.jar") >= 0) || + (source.indexOf("deploy.jar") >= 0) || + (source.indexOf("javaws.jar") >= 0) || + (source.indexOf("plugin.jar") >= 0) + ? "" : source + ); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/project.properties b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/project.properties new file mode 100644 index 0000000..c55b2d8 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/project.properties @@ -0,0 +1,120 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=JavaFX_CalebFontenot +application.vendor=caleb +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +compile.on.save=true +compile.on.save.unsupported.javafx=true +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/JavaFX_CalebFontenot.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +includes=** +# Non-JavaFX jar file creation is deactivated in JavaFX 2.0+ projects +jar.archive.disabled=true +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +javafx.application.implementation.version=1.0 +javafx.binarycss=false +javafx.deploy.allowoffline=true +# If true, application update mode is set to 'background', if false, update mode is set to 'eager' +javafx.deploy.backgroundupdate=false +javafx.deploy.embedJNLP=true +javafx.deploy.includeDT=true +# Set true to prevent creation of temporary copy of deployment artifacts before each run (disables concurrent runs) +javafx.disable.concurrent.runs=false +# Set true to enable multiple concurrent runs of the same WebStart or Run-in-Browser project +javafx.enable.concurrent.external.runs=false +# This is a JavaFX project +javafx.enabled=true +javafx.fallback.class=com.javafx.main.NoJavaFXFallback +# Main class for JavaFX +javafx.main.class=javafx_calebfontenot.JavaFX_CalebFontenot +javafx.preloader.class= +# This project does not use Preloader +javafx.preloader.enabled=false +javafx.preloader.jar.filename= +javafx.preloader.jar.path= +javafx.preloader.project.path= +javafx.preloader.type=none +# Set true for GlassFish only. Rebases manifest classpaths of JARs in lib dir. Not usable with signed JARs. +javafx.rebase.libs=false +javafx.run.height=600 +javafx.run.width=800 +# Pre-JavaFX 2.0 WebStart is deactivated in JavaFX 2.0+ projects +jnlp.enabled=false +# Main class for Java launcher +main.class=com.javafx.main.Main +# For improved security specify narrower Codebase manifest attribute to prevent RIAs from being repurposed +manifest.custom.codebase=* +# Specify Permissions manifest attribute to override default (choices: sandbox, all-permissions) +manifest.custom.permissions= +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +platform.active=JDK_1.8 +run.classpath=\ + ${dist.jar}:\ + ${javac.classpath}:\ + ${build.classes.dir} +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/project.xml b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/project.xml new file mode 100644 index 0000000..454076d --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/nbproject/project.xml @@ -0,0 +1,26 @@ + + + org.netbeans.modules.java.j2seproject + + + + + + + + + + + + + JavaFX_CalebFontenot + + + + + + + + + + diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/JavaFX_CalebFontenot.java b/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/JavaFX_CalebFontenot.java new file mode 100644 index 0000000..5ea6dbb --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/JavaFX_CalebFontenot.java @@ -0,0 +1,45 @@ +package javafx_calebfontenot; +import javafx.application.Application; +import javafx.event.ActionEvent; +import javafx.event.EventHandler; +import javafx.scene.Scene; +import javafx.scene.control.Button; +import javafx.scene.layout.StackPane; +import javafx.stage.Stage; + +public class JavaFX_CalebFontenot extends Application { + + @Override + public void start(Stage primaryStage) + { + Button btn = new Button(); + btn.setText("Say 'Hello World'"); + btn.setOnAction(new EventHandler() { + + @Override + public void handle(ActionEvent event) + { + System.out.println("Hello World!"); + } + }); + + + StackPane root = new StackPane(); + root.getChildren().add(btn); + + Scene scene = new Scene(root, 300, 250); + + primaryStage.setTitle("Hello World!"); + primaryStage.setScene(scene); + primaryStage.show(); + } + + /** + * @param args the command line arguments + */ + public static void main(String[] args) + { + launch(args); + } + +} diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowCircle.java b/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowCircle.java new file mode 100644 index 0000000..59ca012 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowCircle.java @@ -0,0 +1,38 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package javafx_calebfontenot; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.scene.paint.Color; +import javafx.scene.shape.Circle; +import javafx.stage.Stage; + +/** + * + * @author caleb + */ +public class ShowCircle extends Application { + + @Override + public void start(Stage primaryStage) + { + Pane pane = new Pane(); // Create a pane object + Scene scene = new Scene(pane, 300, 200); // Create a scene object + primaryStage.setScene(scene); // Set the stage scene to the scene object + primaryStage.show(); // Make the window display on the screen + Circle c = new Circle(20); // Create a circle object + c.setCenterX(150); // Set the center X for the circle object to '150' + c.setCenterY(80); // Set the center Y for the circle object to '80' + c.setStroke(Color.BLUE); // Set the circle outline to Blue + c.setFill(Color.RED); // Set the interior of the circle to Red + pane.getChildren().add(c); // Add the circle object to the pane + } + public static void main(String[] args) + { + launch(args); + } +} diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowCircleCentered.java b/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowCircleCentered.java new file mode 100644 index 0000000..9c73f8f --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowCircleCentered.java @@ -0,0 +1,46 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package javafx_calebfontenot; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.scene.paint.Color; +import javafx.scene.shape.Circle; +import javafx.stage.Stage; + +/** + * + * @author caleb + */ +public class ShowCircleCentered extends Application { + + @Override + public void start(Stage primaryStage) + { + // Create a pane to hold the Circle + Pane pane = new Pane(); + + // Create a circle and set its properties + Circle circle = new Circle(); + circle.centerXProperty().bind(pane.widthProperty().divide(2)); + circle.centerYProperty().bind(pane.heightProperty().divide(2)); + circle.setRadius(50); + circle.setStroke(Color.BLACK); + circle.setFill(Color.WHITE); + pane.getChildren().add(circle); // Add the circle to the pane + + // Create a scene and place it in the stage + Scene scene = new Scene(pane, 200, 200); + primaryStage.setTitle("ShowCircleCentered"); // Set the stage title + primaryStage.setScene(scene); // Place the scene in the stage + primaryStage.show(); // Display the stage + } + public static void main(String[] args) + { + launch(args); + } + +} diff --git a/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowRectangle.java b/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowRectangle.java new file mode 100644 index 0000000..b858ed6 --- /dev/null +++ b/Semester 2/Assignments/JavaFX_CalebFontenot/src/javafx_calebfontenot/ShowRectangle.java @@ -0,0 +1,40 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package javafx_calebfontenot; + +import javafx.application.Application; +import static javafx.application.Application.launch; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; +import javafx.stage.Stage; + +/** + * + * @author caleb + */ +public class ShowRectangle extends Application { + + @Override + public void start(Stage primaryStage) + { + Pane pane = new Pane(); // Create a pane object + Scene scene = new Scene(pane, 300, 200); // Create a scene object + primaryStage.setScene(scene); // Set the stage scene to the scene object + primaryStage.show(); // Make the window display on the screen + Rectangle r = new Rectangle(30, 30, 88, 44); + r.setX(30); + r.setY(30); + r.setStroke(Color.BLUE); // Set the rectangle outline to Blue + r.setFill(Color.RED); // Set the interior of the rectangle to Red + pane.getChildren().add(r); // Add the circle object to the pane + } + + public static void main(String[] args) + { + launch(args); + } +} diff --git a/Semester 2/Assignments/MP5_CalebFontenot/pom.xml b/Semester 2/Assignments/MP5_CalebFontenot/pom.xml new file mode 100644 index 0000000..c63390a --- /dev/null +++ b/Semester 2/Assignments/MP5_CalebFontenot/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + com.calebfontenot + MP5_CalebFontenot + 1.0-SNAPSHOT + jar + + UTF-8 + 17 + 17 + com.calebfontenot.mp5_calebfontenot.MP5_CalebFontenot + + \ No newline at end of file diff --git a/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/FD.java b/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/FD.java new file mode 100644 index 0000000..58f6d1c --- /dev/null +++ b/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/FD.java @@ -0,0 +1,97 @@ +package com.calebfontenot.mp5_calebfontenot; + + +/** + * + * @author ASDV2 + */ +public class FD +{ + + private String lhs; + + private String rhs; + + /** + * + * @param lhs the LHS of the FD + * @param rhs the RHS of the FD + * @throws IllegalArgumentException if the length of the LHS or the length + * of the RHS are less than 1 or if they are null. + */ + public FD(String lhs, String rhs) + throws IllegalArgumentException + { + if (lhs == null || rhs == null ) + throw new IllegalArgumentException( "the LHS and/or RHS cannot be null."); + + if (lhs.length() < 1 || rhs.length() < 1 ) + throw new IllegalArgumentException( "the LHS and/or RHS cannot be of lenght less than 1."); + + this.lhs = lhs; + this.rhs = rhs; + } + + /** + * Get the value of rhs + * + * @return the value of rhs + */ + public String getRhs() + { + return rhs; + } + + /** + * Set the value of rhs + * + * @param rhs new value of rhs + */ + public void setRhs(String rhs) + { + this.rhs = rhs; + } + + /** + * Get the value of lhs + * + * @return the value of lhs + */ + public String getLhs() + { + return lhs; + } + + /** + * Set the value of lhs + * + * @param lhs new value of lhs + */ + public void setLhs(String lhs) + { + this.lhs = lhs; + } + + @Override + public String toString() + { + return lhs + " -> " + rhs; + } + + /** + * Decomposes the RHS of the FD into singletons. where the LHS is the same + * as this FD and the RHS is 1 character of each character of the FD. + * + * @return array of FD he + */ + public FD[] decomposeRightHandSide() + { + FD[] fdDecomosition = new FD[this.rhs.length()]; + + for (int i = 0; i < this.rhs.length(); ++i) + { + fdDecomosition[i] = new FD(this.lhs, Character.toString(rhs.charAt(i))); + } + return fdDecomosition; + } +} \ No newline at end of file diff --git a/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/MP5_CalebFontenot.java b/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/MP5_CalebFontenot.java new file mode 100644 index 0000000..4aaaa44 --- /dev/null +++ b/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/MP5_CalebFontenot.java @@ -0,0 +1,16 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + */ + +package com.calebfontenot.mp5_calebfontenot; + +/** + * + * @author caleb + */ +public class MP5_CalebFontenot { + + public static void main(String[] args) { + System.out.println("Hello World!"); + } +} diff --git a/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/NormalizeDatabase.java b/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/NormalizeDatabase.java new file mode 100644 index 0000000..e02a825 --- /dev/null +++ b/Semester 2/Assignments/MP5_CalebFontenot/src/main/java/com/calebfontenot/mp5_calebfontenot/NormalizeDatabase.java @@ -0,0 +1,116 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package com.calebfontenot.mp5_calebfontenot; + +/** + * + * @author caleb + */ +/* + * 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. + */ +import java.util.ArrayList; +import java.util.Set; + +/** + * + * @author ASDV2 + */ +public class NormalizeDatabase { + + /** + * Finds the closure of a set of attributes given a set of FDs of a relation R + * + * @param attributes attributes to find their closure + * @param fds set of FDs of relation R + * @return the closure of the parameter attributes. + */ + public static String closure(String attributes, ArrayList fds) + { + attributes = attributes.toUpperCase(); + String closurePrevious = attributes; + String closure = attributes; + for (int i = 0; i < fds.size(); ++i) { + + if (closure.contains(fds.get(i).getRhs())) { + continue; + } + FD capitalFD = new FD(fds.get(i).getLhs().toUpperCase(), + fds.get(i).getRhs().toUpperCase()); + } + //1. Set x+ = x + //2. Starting with x+ apply each FD xF —> y in F where + //xF belongs in closure x+, but whre the rhs y is not already in the closure x+ + //to find the determined attribute + //3. x+ = x+ U y + while (true) { + for (int i = 0; i < fds.size(); ++i) { + //the LHS of the FD is contained in the closure + //then add to the closure the RHS of the FD + if (attributes.contains(fds.get(i).getLhs())) { + attributes += fds.get(i).getRhs(); + } + } + if (closurePrevious.equals(closure)) { + break; + } else { + closurePrevious = closure; + } + } + //4, If y not empty go to (2) + //5. Return x+ + + return closure; + } + + /** + * Eliminates redundant attributes from the LHS of each FD of a set of FDs given as parameters. + * + * @param fds the set of FDs to eliminate the redundancy + * @return and ArrayList with no redundancy on LHS of each FD. + */ + public static ArrayList eliminateRedundantAttributes(ArrayList fds) + { + return null; + } + + public static void main(String[] args) + { + ArrayList fds = new ArrayList(); + FD fd = new FD("a", "bc"); + FD[] fdDecomposed = fd.decomposeRightHandSide(); + for (int i = 0; i < fdDecomposed.length; ++i) { + fds.add(new FD(fdDecomposed[i].getLhs(), fdDecomposed[i].getRhs())); + } + fds.add(new FD("a", "bc")); + fds.add(new FD("b", "c")); + fds.add(new FD("AB", "B")); + System.out.println(fds); + System.out.println(closure("ac", fds)); + + /* TEST it with + Let F1 = {1. A -> BC + 2. B -> C, + 3. AB -> D }. + Attribute B is extraneous in FD 3 AB -> D + + */ + /* + F2 = { 1. AB -> C, + 2. C -> A, + 3. BC -> D, + 4. ACD -> B, + 5. D -> E, + 6. D -> G, + 7. BE -> C, + 8. CG -> B, + 9. CG -> D, + 10. CE -> A, + 11. CE -> G} + */ + } +} diff --git a/Semester 2/ZIPs/JavaFX_CalebFontenot.zip b/Semester 2/ZIPs/JavaFX_CalebFontenot.zip new file mode 100644 index 0000000..2bb7d89 Binary files /dev/null and b/Semester 2/ZIPs/JavaFX_CalebFontenot.zip differ