Skip to content
Snippets Groups Projects
Commit 42e1ca78 authored by mvholmsy's avatar mvholmsy
Browse files

Vaihe 3 aloitettu

parent 7709f365
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path=""/>
<classpathentry kind="output" path=""/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>src</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>fxHiihtorekisteri</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
package fxHiihtorekisteri;
import fi.jyu.mit.fxgui.ModalController;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
/**
* @author pohjo
* @version 13.1.2020
*
*/
public class HiihtorekisteriGUIController {
//
}
@FXML
private Button nappiLisaaHiihto;
@FXML
private Button nappiMuokkaa;
@FXML
private Button nappiTulosta;
@FXML
void handleMuokkaa() {
ModalController.showModal(HiihtorekisteriGUIController.class.getResource("Muokkaa.fxml"), "Hiihtaja", null, "");
}
@FXML
void handleLisaaHiihto(ActionEvent event) {
//
}
@FXML
void handleTulosta(ActionEvent event) {
//
}
}
\ No newline at end of file
package fxHiihtorekisteri;
package fxHiihtorekisteri;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.fxml.FXMLLoader;
/**
* @author pohjo
* @author JPo ja MHo
* @version 13.1.2020
*
*/
......@@ -16,7 +14,7 @@ public class HiihtorekisteriMain extends Application {
@Override
public void start(Stage primaryStage) {
try {
BorderPane root = (BorderPane)FXMLLoader.load(getClass().getResource("HiihtorekisteriGUIView.fxml"));
BorderPane root = (BorderPane)FXMLLoader.load(getClass().getResource("PaaikkunaGUIView.fxml"));
Scene scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("hiihtorekisteri.css").toExternalForm());
primaryStage.setScene(scene);
......@@ -26,10 +24,11 @@ public class HiihtorekisteriMain extends Application {
}
}
/**
* @param args ei kytss
* @param args ei kytss
*/
public static void main(String[] args) {
launch(args);
}
}
}
\ No newline at end of file
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 LisaaHiihtoGUIController implements ModalControllerInterface<String> {
@FXML
private Button nappiTallenna;
@FXML
void handleTallenna() {
Dialogs.showMessageDialog("Tallennus ei toimi vielä");
}
@FXML
void handlePeruuta() {
Platform.exit();
}
@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
......@@ -13,15 +13,15 @@
<?import javafx.scene.layout.RowConstraints?>
<?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.MuokkaaGUIController">
<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>
......
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 MuokkaaGUIController implements ModalControllerInterface<String> {
@FXML
private Button nappiTallenna;
@FXML
void handleTallenna() {
Dialogs.showMessageDialog("Tallennus ei toimi vielä");
}
@FXML
void handlePeruuta() {
Platform.exit();
}
@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
......@@ -27,9 +27,9 @@
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</BorderPane.margin>
<children>
<Button text="_Lisää hiihto" />
<Button alignment="CENTER" mnemonicParsing="false" text="Katso hiihdot" />
<Button mnemonicParsing="false" text="Tulosta" />
<Button fx:id="nappiLisaaHiihto" onAction="#handleLisaaHiihto" text="_Lisää hiihto" />
<Button fx:id="nappiMuokkaa" alignment="CENTER" mnemonicParsing="false" onAction="#handleMuokkaa" text="Muokkaa" />
<Button fx:id="nappiTulosta" mnemonicParsing="false" onAction="#handleTulosta" text="Tulosta" />
</children>
</HBox>
</bottom>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment