diff --git a/build.xml b/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..ee5a0fabf14914d7b7f552acad4b9c0dbbf79130 --- /dev/null +++ b/build.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<project default="create_run_jar" name="Create Runnable Jar for Project hiihtorekisteri"> + <!--this file was created by Eclipse Runnable JAR Export Wizard--> + <!--ANT 1.7 is required --> + <!--define folder properties--> + <property name="dir.buildfile" value="."/> + <property name="dir.workspace" value="C:/MyTemp/ohj2/ws"/> + <property name="dir.jarfile" value="${dir.buildfile}"/> + <target name="create_run_jar"> + <jar destfile="${dir.jarfile}/Hiihtorekisteri.jar" filesetmanifest="mergewithoutmain"> + <manifest> + <attribute name="Main-Class" value="fxHiihtorekisteri.HiihtorekisteriMain"/> + <attribute name="Class-Path" value="."/> + </manifest> + <fileset dir="${dir.jarfile}/bin"/> + <zipfileset excludes="META-INF/*.SF" src="C:/devel/jar/Ali.jar"/> + <zipfileset excludes="META-INF/*.SF" src="C:/devel/jar/fxgui.jar"/> + <zipfileset excludes="META-INF/*.SF" src="C:/devel/jar/Graphics.jar"/> + <zipfileset excludes="META-INF/*.SF" src="C:/devel/jar/Music.jar"/> + </jar> + </target> +</project> diff --git a/src/fxHiihtorekisteri/EiLoydy.fxml b/src/fxHiihtorekisteri/EiLoydy.fxml deleted file mode 100644 index e653798b5e3563c11147d49d25a62f8d5cd723ae..0000000000000000000000000000000000000000 --- a/src/fxHiihtorekisteri/EiLoydy.fxml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<?import javafx.geometry.Insets?> -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.Label?> -<?import javafx.scene.layout.BorderPane?> - -<BorderPane prefHeight="164.0" prefWidth="316.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.HiihtorekisteriGUIController"> - <center> - <Label text="Hakemaasi nimeä ei löydy!" BorderPane.alignment="CENTER" /> - </center> - <bottom> - <Button mnemonicParsing="false" text="OK" BorderPane.alignment="CENTER"> - <BorderPane.margin> - <Insets bottom="5.0" /> - </BorderPane.margin> - </Button> - </bottom> -</BorderPane> diff --git a/src/fxHiihtorekisteri/HiihtorekisteriGUIController.java b/src/fxHiihtorekisteri/HiihtorekisteriGUIController.java index 558c8623908f86fdaebc540ea0d1479c3c477d52..e6ae8da91eea13e03c6581b9f4b006660f479164 100644 --- a/src/fxHiihtorekisteri/HiihtorekisteriGUIController.java +++ b/src/fxHiihtorekisteri/HiihtorekisteriGUIController.java @@ -1,18 +1,24 @@ package fxHiihtorekisteri; +import fi.jyu.mit.fxgui.Dialogs; import fi.jyu.mit.fxgui.ModalController; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.Button; +import javafx.scene.control.MenuItem; +import javafx.scene.control.TextField; /** - * @author pohjo + * @author JPo ja MHo * @version 13.1.2020 - * + * */ public class HiihtorekisteriGUIController { + @FXML + private TextField Hakukentta; + @FXML private Button nappiLisaaHiihto; @@ -21,19 +27,75 @@ public class HiihtorekisteriGUIController { @FXML private Button nappiTulosta; + + @FXML + private MenuItem ylanappiTallenna; + + @FXML + private MenuItem ylanappiTulosta; + + @FXML + private MenuItem ylanappiLisaaHiihtaja; + + @FXML + private MenuItem ylanappiPoistaHiihtaja; + @FXML + private MenuItem ylanappiLopeta; + + @FXML + private MenuItem ylanappiKayttoOhje; + + @FXML + private MenuItem ylanappiTietoja; + + @FXML + void handleHaku() { + // + } + + @FXML + void handleLisaaHiihto() { + ModalController.showModal(HiihtorekisteriGUIController.class.getResource("LisaaHiihto.fxml"), "Hiihto", null, ""); + } + @FXML void handleMuokkaa() { ModalController.showModal(HiihtorekisteriGUIController.class.getResource("Muokkaa.fxml"), "Hiihtaja", null, ""); } @FXML - void handleLisaaHiihto(ActionEvent event) { - // + void handleTulosta() { + ModalController.showModal(HiihtorekisteriGUIController.class.getResource("Tulosta.fxml"), "Tulosta", null, ""); + } + + @FXML + void handleLisaaHiihtaja() { + ModalController.showModal(HiihtorekisteriGUIController.class.getResource("LisaaHiihtaja.fxml"), "Hiihtaja", null, ""); + } + + @FXML + void handlePoistaHiihtaja() { + Dialogs.showMessageDialog("Poisto ei vielä toimi"); } @FXML - void handleTulosta(ActionEvent event) { - // + void handleTallenna() { + Dialogs.showMessageDialog("Tallennus ei toimi vielä"); + } + + @FXML + void handleLopeta() { + Dialogs.showMessageDialog("Tallentaa tiedot ja lopettaa ohjelman. Tallennus ei toimi vielä."); + } + + @FXML + void handleKayttoOhje() { + ModalController.showModal(HiihtorekisteriGUIController.class.getResource("Ohje.fxml"), "Ohje", null, ""); + } + + @FXML + void handleTietoja() { + ModalController.showModal(HiihtorekisteriGUIController.class.getResource("Tietoja.fxml"), "Tietoja", null, ""); } } \ No newline at end of file diff --git a/src/fxHiihtorekisteri/LisaaHiihtaja.fxml b/src/fxHiihtorekisteri/LisaaHiihtaja.fxml index 486450a27eb22b35cd58f9d9d24d0037b869bd83..3be2cb4702c210090b3875defb31e8cb3e4656d2 100644 --- a/src/fxHiihtorekisteri/LisaaHiihtaja.fxml +++ b/src/fxHiihtorekisteri/LisaaHiihtaja.fxml @@ -11,15 +11,15 @@ <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.RowConstraints?> -<BorderPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.HiihtorekisteriGUIController"> +<BorderPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.LisaaHiihtajaGUIController"> <bottom> <HBox spacing="10.0" BorderPane.alignment="CENTER"> <BorderPane.margin> <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> </BorderPane.margin> <children> - <Button text="Tallenna" /> - <Button alignment="CENTER" mnemonicParsing="false" text="Peruuta" /> + <Button fx:id="nappiTallenna" onAction="#handleTallenna" text="Tallenna" /> + <Button fx:id="nappiPeruuta" alignment="CENTER" mnemonicParsing="false" onAction="#handlePeruuta" text="Peruuta" /> </children> </HBox> </bottom> diff --git a/src/fxHiihtorekisteri/LisaaHiihtajaGUIController.java b/src/fxHiihtorekisteri/LisaaHiihtajaGUIController.java new file mode 100644 index 0000000000000000000000000000000000000000..fef6312d077a615a9f537e89edfde8f42c2e408b --- /dev/null +++ b/src/fxHiihtorekisteri/LisaaHiihtajaGUIController.java @@ -0,0 +1,53 @@ +package fxHiihtorekisteri; + +import fi.jyu.mit.fxgui.Dialogs; +import fi.jyu.mit.fxgui.ModalController; +import fi.jyu.mit.fxgui.ModalControllerInterface; +import javafx.application.Platform; +import javafx.event.ActionEvent; +import javafx.fxml.FXML; +import javafx.scene.control.Button; + + +/** + * @author pohjo + * @version 13.1.2020 + * + */ +public class LisaaHiihtajaGUIController implements ModalControllerInterface<String> { + + @FXML + private Button nappiTallenna; + + @FXML + private Button nappiPeruuta; + + @FXML + void handleTallenna() { + Dialogs.showMessageDialog("Tallennus ei toimi vielä"); + } + + @FXML + void handlePeruuta() { + ModalController.closeStage(nappiPeruuta); + } + + @Override + public String getResult() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void handleShown() { + // TODO Auto-generated method stub + + } + + @Override + public void setDefault(String oletus) { + // TODO Auto-generated method stub + + } + // +} \ No newline at end of file diff --git a/src/fxHiihtorekisteri/LisaaHiihto.fxml b/src/fxHiihtorekisteri/LisaaHiihto.fxml index ddd373fa9a1f6e020876a3a31386fe83bada4289..46e9db0cf9ca8f4d330047a5be7ee2d8ecd90d85 100644 --- a/src/fxHiihtorekisteri/LisaaHiihto.fxml +++ b/src/fxHiihtorekisteri/LisaaHiihto.fxml @@ -12,18 +12,18 @@ <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.RowConstraints?> -<BorderPane prefHeight="254.0" prefWidth="307.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.HiihtorekisteriGUIController"> +<BorderPane prefHeight="254.0" prefWidth="307.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.LisaaHiihtoGUIController"> <bottom> <HBox spacing="10.0" BorderPane.alignment="CENTER"> <BorderPane.margin> <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> </BorderPane.margin> <children> - <Button text="Tallenna"> + <Button fx:id="nappiTallenna" onAction="#handleTallenna" text="Tallenna"> <tooltip> <Tooltip text="Uuden jäsenen lisääminen" /> </tooltip></Button> - <Button mnemonicParsing="false" text="Peruuta"> + <Button fx:id="nappiPeruuta" mnemonicParsing="false" onAction="#handlePeruuta" text="Peruuta"> <tooltip> <Tooltip text="Tallenna" /> </tooltip></Button> diff --git a/src/fxHiihtorekisteri/LisaaHiihtoGUIController.java b/src/fxHiihtorekisteri/LisaaHiihtoGUIController.java index b60f78549f5c83d737ea43da19e1367b8a7c3f85..ba8d9e9886a371bda699ee13c7c1b3ce9c249bd2 100644 --- a/src/fxHiihtorekisteri/LisaaHiihtoGUIController.java +++ b/src/fxHiihtorekisteri/LisaaHiihtoGUIController.java @@ -18,6 +18,9 @@ public class LisaaHiihtoGUIController implements ModalControllerInterface<String @FXML private Button nappiTallenna; + + @FXML + private Button nappiPeruuta; @FXML void handleTallenna() { @@ -26,7 +29,7 @@ public class LisaaHiihtoGUIController implements ModalControllerInterface<String @FXML void handlePeruuta() { - Platform.exit(); + ModalController.closeStage(nappiPeruuta); } @Override diff --git a/src/fxHiihtorekisteri/MuokkaaGUIController.java b/src/fxHiihtorekisteri/MuokkaaGUIController.java index f50c3fb4d3822e797be3e0e45cfccb367ddd0ed0..0ca7db1c5bb1743efbd4113e0c8bebe61304c019 100644 --- a/src/fxHiihtorekisteri/MuokkaaGUIController.java +++ b/src/fxHiihtorekisteri/MuokkaaGUIController.java @@ -18,6 +18,9 @@ public class MuokkaaGUIController implements ModalControllerInterface<String> { @FXML private Button nappiTallenna; + + @FXML + private Button nappiPeruuta; @FXML void handleTallenna() { @@ -26,7 +29,7 @@ public class MuokkaaGUIController implements ModalControllerInterface<String> { @FXML void handlePeruuta() { - Platform.exit(); + ModalController.closeStage(nappiPeruuta); } @Override diff --git a/src/fxHiihtorekisteri/Ohje.fxml b/src/fxHiihtorekisteri/Ohje.fxml index 6bacb25d29a8aa60f8361d46752c25ce6702743d..b6ebe7e9d18f1ea16e1112d55a88412fdcccef4e 100644 --- a/src/fxHiihtorekisteri/Ohje.fxml +++ b/src/fxHiihtorekisteri/Ohje.fxml @@ -5,9 +5,9 @@ <?import javafx.scene.control.TextArea?> <?import javafx.scene.layout.BorderPane?> -<BorderPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.HiihtorekisteriGUIController"> +<BorderPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.OhjeGUIController"> <bottom> - <Button text="Sulje" BorderPane.alignment="CENTER"> + <Button fx:id="nappiSulje" onAction="#handleSulje" text="Sulje" BorderPane.alignment="CENTER"> <BorderPane.margin> <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> </BorderPane.margin> diff --git a/src/fxHiihtorekisteri/OhjeGUIController.java b/src/fxHiihtorekisteri/OhjeGUIController.java new file mode 100644 index 0000000000000000000000000000000000000000..e0a7a738c34e56d0a84efd7bfbbf52fcf21bc305 --- /dev/null +++ b/src/fxHiihtorekisteri/OhjeGUIController.java @@ -0,0 +1,45 @@ +package fxHiihtorekisteri; + +import fi.jyu.mit.fxgui.Dialogs; +import fi.jyu.mit.fxgui.ModalController; +import fi.jyu.mit.fxgui.ModalControllerInterface; +import javafx.application.Platform; +import javafx.event.ActionEvent; +import javafx.fxml.FXML; +import javafx.scene.control.Button; + + +/** + * @author pohjo + * @version 13.1.2020 + * + */ +public class OhjeGUIController implements ModalControllerInterface<String> { + + @FXML + private Button nappiSulje; + + @FXML + void handleSulje() { + ModalController.closeStage(nappiSulje); + } + + @Override + public String getResult() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void handleShown() { + // TODO Auto-generated method stub + + } + + @Override + public void setDefault(String oletus) { + // TODO Auto-generated method stub + + } + // +} \ No newline at end of file diff --git a/src/fxHiihtorekisteri/PaaikkunaGUIView.fxml b/src/fxHiihtorekisteri/PaaikkunaGUIView.fxml index 1fbb0a58a6167b9b9ae2fd2fc1840d8448b30ee2..8336e1e3b9c297fb0cfc00cc33e663e67f0ef30a 100644 --- a/src/fxHiihtorekisteri/PaaikkunaGUIView.fxml +++ b/src/fxHiihtorekisteri/PaaikkunaGUIView.fxml @@ -38,20 +38,20 @@ <menus> <Menu mnemonicParsing="false" text="Tiedosto"> <items> - <MenuItem mnemonicParsing="false" text="Tallenna"> + <MenuItem fx:id="ylanappiTallenna" mnemonicParsing="false" onAction="#handleTallenna" text="Tallenna"> <accelerator> <KeyCodeCombination alt="UP" code="S" control="DOWN" meta="UP" shift="UP" shortcut="UP" /> </accelerator></MenuItem> - <MenuItem mnemonicParsing="false" text="Tulosta" /> - <MenuItem mnemonicParsing="false" text="Lisää hiihtäjä" /> - <MenuItem mnemonicParsing="false" text="Poista hiihtäjä" /> - <MenuItem mnemonicParsing="false" text="Lopeta" /> + <MenuItem fx:id="ylanappiTulosta" mnemonicParsing="false" onAction="#handleTulosta" text="Tulosta" /> + <MenuItem fx:id="ylanappiLisaaHiihtaja" mnemonicParsing="false" onAction="#handleLisaaHiihtaja" text="Lisää hiihtäjä" /> + <MenuItem fx:id="ylanappiPoistaHiihtaja" mnemonicParsing="false" onAction="#handlePoistaHiihtaja" text="Poista hiihtäjä" /> + <MenuItem fx:id="ylanappiLopeta" mnemonicParsing="false" onAction="#handleLopeta" text="Lopeta" /> </items> </Menu> <Menu mnemonicParsing="false" text="Ohje"> <items> - <MenuItem mnemonicParsing="false" text="Käyttöohjeet" /> - <MenuItem mnemonicParsing="false" text="Tietoja" /> + <MenuItem fx:id="ylanappiKayttoOhje" mnemonicParsing="false" onAction="#handleKayttoOhje" text="Käyttöohjeet" /> + <MenuItem fx:id="ylanappiTietoja" mnemonicParsing="false" onAction="#handleTietoja" text="Tietoja" /> </items> </Menu> </menus> @@ -63,7 +63,7 @@ <VBox BorderPane.alignment="CENTER"> <children> <ComboBoxChooser rivit="Nimi Paikkakunta " /> - <TextField prefHeight="0.0" prefWidth="200.0" /> + <TextField fx:id="Hakukentta" onAction="#handleHaku" onKeyReleased="#handleHaku" prefHeight="0.0" prefWidth="200.0" /> <VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0"> <children> <Label contentDisplay="CENTER" text="Hiihtäjät" textAlignment="CENTER" wrapText="true" /> diff --git a/src/fxHiihtorekisteri/PoistaJasen.fxml b/src/fxHiihtorekisteri/PoistaJasen.fxml deleted file mode 100644 index 9c9e083a1438f96debce72f48df1df5516fed28c..0000000000000000000000000000000000000000 --- a/src/fxHiihtorekisteri/PoistaJasen.fxml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<?import javafx.geometry.Insets?> -<?import javafx.scene.control.Button?> -<?import javafx.scene.control.Label?> -<?import javafx.scene.control.TextField?> -<?import javafx.scene.layout.BorderPane?> -<?import javafx.scene.layout.HBox?> - -<BorderPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.HiihtorekisteriGUIController"> - <bottom> - <HBox spacing="20.0" BorderPane.alignment="CENTER"> - <children> - <Button mnemonicParsing="false" text="Kyllä"> - <HBox.margin> - <Insets left="50.0" /> - </HBox.margin> - </Button> - <Button mnemonicParsing="false" text="EI"> - <HBox.margin> - <Insets left="80.0" /> - </HBox.margin> - </Button> - </children> - <BorderPane.margin> - <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> - </BorderPane.margin> - </HBox> - </bottom> - <top> - <Label text="Poistetaanko hiihtäjä?" BorderPane.alignment="CENTER"> - <BorderPane.margin> - <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> - </BorderPane.margin></Label> - </top> - <center> - <HBox spacing="5.0" BorderPane.alignment="CENTER"> - <children> - <TextField text="Juha" /> - <TextField text="Mieto" /> - </children> - <BorderPane.margin> - <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" /> - </BorderPane.margin> - </HBox> - </center> -</BorderPane> diff --git a/src/fxHiihtorekisteri/Tietoja.fxml b/src/fxHiihtorekisteri/Tietoja.fxml index 83e452cdef093a9a88b00aa6a1f86e43de5ea348..c1dd491a3fa7e3b951f973b371bb23c102b39668 100644 --- a/src/fxHiihtorekisteri/Tietoja.fxml +++ b/src/fxHiihtorekisteri/Tietoja.fxml @@ -5,9 +5,9 @@ <?import javafx.scene.control.TextArea?> <?import javafx.scene.layout.BorderPane?> -<BorderPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.HiihtorekisteriGUIController"> +<BorderPane xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.TietojaGUIController"> <bottom> - <Button text="Sulje" BorderPane.alignment="CENTER"> + <Button fx:id="nappiSulje" onAction="#handleSulje" text="Sulje" BorderPane.alignment="CENTER"> <BorderPane.margin> <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> </BorderPane.margin> diff --git a/src/fxHiihtorekisteri/TietojaGUIController.java b/src/fxHiihtorekisteri/TietojaGUIController.java new file mode 100644 index 0000000000000000000000000000000000000000..0a9000df9cf6663fe9e8bff718cf23feec2eb423 --- /dev/null +++ b/src/fxHiihtorekisteri/TietojaGUIController.java @@ -0,0 +1,45 @@ +package fxHiihtorekisteri; + +import fi.jyu.mit.fxgui.Dialogs; +import fi.jyu.mit.fxgui.ModalController; +import fi.jyu.mit.fxgui.ModalControllerInterface; +import javafx.application.Platform; +import javafx.event.ActionEvent; +import javafx.fxml.FXML; +import javafx.scene.control.Button; + + +/** + * @author pohjo + * @version 13.1.2020 + * + */ +public class TietojaGUIController implements ModalControllerInterface<String> { + + @FXML + private Button nappiSulje; + + @FXML + void handleSulje() { + ModalController.closeStage(nappiSulje); + } + + @Override + public String getResult() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void handleShown() { + // TODO Auto-generated method stub + + } + + @Override + public void setDefault(String oletus) { + // TODO Auto-generated method stub + + } + // +} \ No newline at end of file diff --git a/src/fxHiihtorekisteri/Tulosta.fxml b/src/fxHiihtorekisteri/Tulosta.fxml index 344380deac7168a12e1ecf3ad115d6e349df73eb..925c6ecc8fed5fd249457263cfbbb36418a43906 100644 --- a/src/fxHiihtorekisteri/Tulosta.fxml +++ b/src/fxHiihtorekisteri/Tulosta.fxml @@ -8,15 +8,15 @@ <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.VBox?> -<BorderPane prefHeight="408.0" prefWidth="684.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.HiihtorekisteriGUIController"> +<BorderPane prefHeight="408.0" prefWidth="684.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="fxHiihtorekisteri.TulostaGUIController"> <bottom> <HBox spacing="50.0" BorderPane.alignment="CENTER"> <BorderPane.margin> <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> </BorderPane.margin> <children> - <Button text="Tulosta" /> - <Button alignment="CENTER" mnemonicParsing="false" text="Peruuta" /> + <Button fx:id="nappiTulosta" onAction="#handleTulosta" text="Tulosta" /> + <Button fx:id="nappiPeruuta" alignment="CENTER" mnemonicParsing="false" onAction="#handlePeruuta" text="Peruuta" /> </children> </HBox> </bottom> diff --git a/src/fxHiihtorekisteri/TulostaGUIController.java b/src/fxHiihtorekisteri/TulostaGUIController.java new file mode 100644 index 0000000000000000000000000000000000000000..691d263a2bcbb51e8e41c9c9a2fdbe01eadedc0e --- /dev/null +++ b/src/fxHiihtorekisteri/TulostaGUIController.java @@ -0,0 +1,53 @@ +package fxHiihtorekisteri; + +import fi.jyu.mit.fxgui.Dialogs; +import fi.jyu.mit.fxgui.ModalController; +import fi.jyu.mit.fxgui.ModalControllerInterface; +import javafx.application.Platform; +import javafx.event.ActionEvent; +import javafx.fxml.FXML; +import javafx.scene.control.Button; + + +/** + * @author pohjo + * @version 13.1.2020 + * + */ +public class TulostaGUIController implements ModalControllerInterface<String> { + + @FXML + private Button nappiTulosta; + + @FXML + private Button nappiPeruuta; + + @FXML + void handleTulosta() { + Dialogs.showMessageDialog("Tulostus ei toimi vielä"); + } + + @FXML + void handlePeruuta() { + ModalController.closeStage(nappiPeruuta); + } + + @Override + public String getResult() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void handleShown() { + // TODO Auto-generated method stub + + } + + @Override + public void setDefault(String oletus) { + // TODO Auto-generated method stub + + } + // +} \ No newline at end of file