diff --git a/.classpath b/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..9472f5ec425cece4b317d16ffca96b1bc72b36d7 --- /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 0000000000000000000000000000000000000000..29cc8804f16f7acfd96afd35a0d31dbb230e1509 --- /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 0000000000000000000000000000000000000000..52e57ad7eb11a6c8d3dd064aa1fb43bdf53f81d8 --- /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 0000000000000000000000000000000000000000..fab86febdf6f22635dc2275b672b325b76f5dbde --- /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 0000000000000000000000000000000000000000..b5a57d93f06944d0f0ab320fc133274d748299c8 --- /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 0000000000000000000000000000000000000000..48cf9f40cbb7de9808bcbe243e2f045902463e79 --- /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 0000000000000000000000000000000000000000..83d6f3343843c65d5dfaf3fedb97b6494c19113d --- /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