From 81e837c84bf19ef8f7c1edf66da55d068805b3dc Mon Sep 17 00:00:00 2001
From: julipits <jussi.e.lipitsainen@student.jyu.fi>
Date: Thu, 30 Jan 2025 22:08:23 +0200
Subject: [PATCH] =?UTF-8?q?P=C3=A4=C3=A4ikkunan=20eka=20versio=20valmis?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .classpath                                    |  12 +
 .project                                      |  34 +++
 build.fxbuild                                 |   8 +
 .../KohtaushallintaGUIController.java         |  10 +
 .../KohtaushallintaGUIView.fxml               | 246 ++++++++++++++++++
 .../KohtaushallintaMain.java                  |  38 +++
 src/fxKohtaushallinta/kohtaushallinta.css     |   1 +
 7 files changed, 349 insertions(+)
 create mode 100644 .classpath
 create mode 100644 .project
 create mode 100644 build.fxbuild
 create mode 100644 src/fxKohtaushallinta/KohtaushallintaGUIController.java
 create mode 100644 src/fxKohtaushallinta/KohtaushallintaGUIView.fxml
 create mode 100644 src/fxKohtaushallinta/KohtaushallintaMain.java
 create mode 100644 src/fxKohtaushallinta/kohtaushallinta.css

diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..9472f5e
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+		<attributes>
+			<attribute name="module" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/ohj2"/>
+	<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/.project b/.project
new file mode 100644
index 0000000..29cc880
--- /dev/null
+++ b/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>htyo</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	    <buildCommand>
+            <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+            <arguments>
+            </arguments>
+        </buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+	<filteredResources>
+		<filter>
+			<id>1737533798199</id>
+			<name>tiedostot</name>
+			<type>5</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-false-*.dat</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
+</projectDescription>
diff --git a/build.fxbuild b/build.fxbuild
new file mode 100644
index 0000000..52e57ad
--- /dev/null
+++ b/build.fxbuild
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ASCII"?>
+<anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build">
+  <deploy>
+    <application name="kohtaushallinta"/>
+    <info/>
+  </deploy>
+  <signjar/>
+</anttasks:AntTask>
diff --git a/src/fxKohtaushallinta/KohtaushallintaGUIController.java b/src/fxKohtaushallinta/KohtaushallintaGUIController.java
new file mode 100644
index 0000000..fab86fe
--- /dev/null
+++ b/src/fxKohtaushallinta/KohtaushallintaGUIController.java
@@ -0,0 +1,10 @@
+package fxKohtaushallinta;
+
+/**
+ * @author jlipi
+ * @version 26.1.2025
+ *
+ */
+public class KohtaushallintaGUIController {
+      // TODO
+}
\ No newline at end of file
diff --git a/src/fxKohtaushallinta/KohtaushallintaGUIView.fxml b/src/fxKohtaushallinta/KohtaushallintaGUIView.fxml
new file mode 100644
index 0000000..b5a57d9
--- /dev/null
+++ b/src/fxKohtaushallinta/KohtaushallintaGUIView.fxml
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.geometry.Insets?>
+<?import javafx.scene.control.Button?>
+<?import javafx.scene.control.ComboBox?>
+<?import javafx.scene.control.ListView?>
+<?import javafx.scene.control.TextArea?>
+<?import javafx.scene.control.TextField?>
+<?import javafx.scene.control.TitledPane?>
+<?import javafx.scene.layout.BorderPane?>
+<?import javafx.scene.layout.HBox?>
+<?import javafx.scene.layout.Pane?>
+<?import javafx.scene.layout.VBox?>
+
+<BorderPane minWidth="1000.0" prefHeight="800.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxKohtaushallinta.KohtaushallintaGUIController">
+   <bottom>
+      <VBox BorderPane.alignment="CENTER">
+         <children>
+            <HBox spacing="5.0">
+               <children>
+                  <VBox prefWidth="600.0">
+                     <children>
+                        <TextField id="txtValittuKohtaus" disable="true">
+                           <VBox.margin>
+                              <Insets bottom="5.0" />
+                           </VBox.margin>
+                        </TextField>
+                        <TextArea id="txtAreaKohtauksenKuvaus" />
+                     </children>
+                     <HBox.margin>
+                        <Insets bottom="5.0" left="5.0" top="5.0" />
+                     </HBox.margin>
+                  </VBox>
+                  <TitledPane animated="false" collapsible="false" prefWidth="600.0" text="Muistiinpanot" HBox.hgrow="ALWAYS">
+                     <content>
+                        <TextArea id="txtAreaMuistiinpanot" />
+                     </content>
+                     <HBox.margin>
+                        <Insets top="5.0" />
+                     </HBox.margin>
+                  </TitledPane>
+               </children>
+            </HBox>
+         </children>
+         <BorderPane.margin>
+            <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+         </BorderPane.margin>
+      </VBox>
+   </bottom>
+   <center>
+      <VBox alignment="TOP_CENTER" minWidth="500.0" prefWidth="580.0" BorderPane.alignment="CENTER">
+         <children>
+            <HBox alignment="TOP_CENTER" minWidth="500.0" prefWidth="600.0">
+               <children>
+                  <TitledPane id="tpaneHahmot" animated="false" collapsible="false" contentDisplay="CENTER" minHeight="200.0" minWidth="280.0" prefHeight="400.0" prefWidth="250.0" text="Hahmot">
+                     <content>
+                        <VBox maxWidth="150.0" minWidth="250.0" prefHeight="200.0" prefWidth="250.0">
+                           <children>
+                              <HBox fillHeight="false" prefHeight="30.0">
+                                 <children>
+                                    <TextField id="txtHahmotSuodatin" promptText="Suodatin">
+                                       <HBox.margin>
+                                          <Insets right="5.0" />
+                                       </HBox.margin>
+                                    </TextField>
+                                    <Button id="btnHahmotTyhjenna" mnemonicParsing="false" text="Tyhjennä" />
+                                 </children>
+                                 <VBox.margin>
+                                    <Insets top="5.0" />
+                                 </VBox.margin>
+                              </HBox>
+                              <HBox fillHeight="false" prefHeight="30.0">
+                                 <children>
+                                    <ComboBox id="cmbHahmotAvain1" prefWidth="150.0" promptText="Avainsana">
+                                       <padding>
+                                          <Insets right="5.0" />
+                                       </padding>
+                                       <HBox.margin>
+                                          <Insets right="5.0" />
+                                       </HBox.margin>
+                                    </ComboBox>
+                                    <ComboBox id="cmbHahmotAvain2" prefWidth="150.0" promptText="Avainsana" />
+                                 </children>
+                                 <VBox.margin>
+                                    <Insets bottom="5.0" top="5.0" />
+                                 </VBox.margin>
+                              </HBox>
+                              <ListView id="listHahmot" prefWidth="250.0">
+                                 <VBox.margin>
+                                    <Insets />
+                                 </VBox.margin>
+                              </ListView>
+                              <HBox alignment="CENTER" prefHeight="100.0" spacing="5.0">
+                                 <children>
+                                    <Button id="btnLisaaHahmo" mnemonicParsing="false" prefWidth="115.0" text="Lisää hahmo" />
+                                    <Button id="btnPoistaHahmo" mnemonicParsing="false" prefWidth="115.0" text="Poista hahmo" />
+                                 </children>
+                                 <VBox.margin>
+                                    <Insets top="5.0" />
+                                 </VBox.margin>
+                              </HBox>
+                           </children>
+                        </VBox>
+                     </content>
+                     <HBox.margin>
+                        <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                     </HBox.margin>
+                  </TitledPane>
+                  <TitledPane id="tpaneAsiat" animated="false" collapsible="false" minHeight="200.0" minWidth="280.0" prefHeight="400.0" text="Asiat / Esineet">
+                     <content>
+                        <VBox maxWidth="150.0" minWidth="250.0" prefHeight="200.0" prefWidth="250.0">
+                           <children>
+                              <HBox fillHeight="false" prefHeight="30.0">
+                                 <children>
+                                    <TextField id="txtAsiatSuodatin" promptText="Suodatin">
+                                       <HBox.margin>
+                                          <Insets right="5.0" />
+                                       </HBox.margin>
+                                    </TextField>
+                                    <Button id="btnAsiatTyhjenna" mnemonicParsing="false" text="Tyhjennä" />
+                                 </children>
+                                 <VBox.margin>
+                                    <Insets top="5.0" />
+                                 </VBox.margin>
+                              </HBox>
+                              <HBox fillHeight="false" prefHeight="30.0">
+                                 <children>
+                                    <ComboBox id="cmbHahmotAvain1" prefWidth="150.0" promptText="Avainsana">
+                                       <padding>
+                                          <Insets right="5.0" />
+                                       </padding>
+                                       <HBox.margin>
+                                          <Insets right="5.0" />
+                                       </HBox.margin>
+                                    </ComboBox>
+                                    <ComboBox id="cmbHahmotAvain2" prefWidth="150.0" promptText="Avainsana" />
+                                 </children>
+                                 <VBox.margin>
+                                    <Insets bottom="5.0" top="5.0" />
+                                 </VBox.margin>
+                              </HBox>
+                              <ListView id="listAsiat" prefWidth="250.0">
+                                 <VBox.margin>
+                                    <Insets />
+                                 </VBox.margin>
+                              </ListView>
+                              <HBox alignment="CENTER" prefHeight="100.0" spacing="5.0">
+                                 <children>
+                                    <Button id="btnLisaaAsia" mnemonicParsing="false" prefWidth="115.0" text="Lisää asia / esine" />
+                                    <Button id="btnPoistaAsia" mnemonicParsing="false" prefWidth="115.0" text="Poista asia / esine" />
+                                 </children>
+                                 <VBox.margin>
+                                    <Insets top="5.0" />
+                                 </VBox.margin>
+                              </HBox>
+                           </children>
+                        </VBox>
+                     </content>
+                     <HBox.margin>
+                        <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                     </HBox.margin>
+                  </TitledPane>
+               </children>
+            </HBox>
+            <TextField id="txtValittuKohtaus" disable="true" prefWidth="500.0">
+               <VBox.margin>
+                  <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+               </VBox.margin>
+            </TextField>
+            <TextArea id="txtAreaKohtauksenKuvaus" prefWidth="500.0">
+               <VBox.margin>
+                  <Insets left="5.0" right="5.0" />
+               </VBox.margin>
+            </TextArea>
+         </children>
+      </VBox>
+   </center>
+   <left>
+      <TitledPane animated="false" collapsible="false" minHeight="500.0" prefWidth="300.0" text="Kohtaukset" BorderPane.alignment="TOP_CENTER">
+         <content>
+            <HBox prefHeight="400.0" prefWidth="200.0">
+               <children>
+                  <VBox minHeight="500.0" minWidth="250.0" prefWidth="300.0">
+                     <children>
+                        <HBox>
+                           <children>
+                              <TextField id="txtKohtauksetSuodatin" promptText="Suodatin">
+                                 <HBox.margin>
+                                    <Insets right="5.0" />
+                                 </HBox.margin>
+                              </TextField>
+                              <Button id="btnKohtauksetTyhjenna" mnemonicParsing="false" text="Tyhjennä" />
+                           </children>
+                           <VBox.margin>
+                              <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                           </VBox.margin>
+                        </HBox>
+                        <HBox>
+                           <children>
+                              <ComboBox id="cmbKohtauksetAvain1" prefWidth="150.0" promptText="Avainsana">
+                                 <padding>
+                                    <Insets right="5.0" />
+                                 </padding>
+                                 <HBox.margin>
+                                    <Insets right="5.0" />
+                                 </HBox.margin>
+                              </ComboBox>
+                              <ComboBox id="cmbKohtauksetAvain2" prefWidth="150.0" promptText="Avainsana" />
+                           </children>
+                           <VBox.margin>
+                              <Insets bottom="5.0" left="5.0" right="5.0" />
+                           </VBox.margin>
+                        </HBox>
+                        <ListView id="listKohtaukset" minHeight="500.0" prefWidth="300.0">
+                           <VBox.margin>
+                              <Insets bottom="5.0" left="5.0" right="5.0" />
+                           </VBox.margin>
+                        </ListView>
+                     </children>
+                     <HBox.margin>
+                        <Insets />
+                     </HBox.margin>
+                  </VBox>
+                  <VBox alignment="CENTER" minHeight="500.0" minWidth="130.0" prefWidth="130.0" spacing="20.0">
+                     <children>
+                        <Button id="btnUusiLista" minHeight="40.0" minWidth="120.0" mnemonicParsing="false" text="UUSI LISTA" />
+                        <Button id="btnLataaLista" minHeight="40.0" minWidth="120.0" mnemonicParsing="false" text="LATAA LISTA" />
+                        <Pane prefHeight="40.0" />
+                        <Button id="btnUusiKohtaus" minHeight="40.0" minWidth="120.0" mnemonicParsing="false" text="UUSI KOHTAUS" />
+                        <Button id="btnPoistaKohtaus" minHeight="40.0" minWidth="120.0" mnemonicParsing="false" text="POISTA KOHTAUS" />
+                        <Pane prefHeight="40.0" />
+                        <Button id="btnSuljeOhjelma" minHeight="40.0" minWidth="120.0" mnemonicParsing="false" text="SULJE OHJELMA" />
+                     </children>
+                     <HBox.margin>
+                        <Insets />
+                     </HBox.margin>
+                  </VBox>
+               </children>
+            </HBox>
+         </content>
+         <BorderPane.margin>
+            <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+         </BorderPane.margin>
+      </TitledPane>
+   </left>
+</BorderPane>
diff --git a/src/fxKohtaushallinta/KohtaushallintaMain.java b/src/fxKohtaushallinta/KohtaushallintaMain.java
new file mode 100644
index 0000000..48cf9f4
--- /dev/null
+++ b/src/fxKohtaushallinta/KohtaushallintaMain.java
@@ -0,0 +1,38 @@
+package fxKohtaushallinta;
+
+import javafx.application.Application;
+import javafx.stage.Stage;
+import javafx.scene.Scene;
+import javafx.scene.layout.Pane;
+import javafx.fxml.FXMLLoader;
+
+
+/**
+ * @author jlipi
+ * @version 26.1.2025
+ *
+ */
+public class KohtaushallintaMain extends Application {
+    @Override
+    public void start(Stage primaryStage) {
+        try {
+            FXMLLoader ldr = new FXMLLoader(getClass().getResource("KohtaushallintaGUIView.fxml"));
+            final Pane root = ldr.load();
+            //final KohtaushallintaGUIController kohtaushallintaCtrl = (KohtaushallintaGUIController) ldr.getController();
+            Scene scene = new Scene(root);
+            scene.getStylesheets().add(getClass().getResource("kohtaushallinta.css").toExternalForm());
+            primaryStage.setScene(scene);
+            primaryStage.setTitle("Kohtaushallinta");
+            primaryStage.show();
+        } catch(Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * @param args Ei kaytossa
+     */
+    public static void main(String[] args) {
+        launch(args);
+    }
+}
\ No newline at end of file
diff --git a/src/fxKohtaushallinta/kohtaushallinta.css b/src/fxKohtaushallinta/kohtaushallinta.css
new file mode 100644
index 0000000..83d6f33
--- /dev/null
+++ b/src/fxKohtaushallinta/kohtaushallinta.css
@@ -0,0 +1 @@
+/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */
\ No newline at end of file
-- 
GitLab