Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tie/ohj2/ve/2025/kevat/ohj2
  • hasemajo/ohj2
  • nikaleko/ohj2
  • tntvanha/ohj2
  • lemaline/ohj2
  • rintahe/ohj2
  • tersaton/ohj2
  • tornhale/ohj2
  • pjyypiix/ohj-2
  • aneejoko/ohj2
  • reponaw/ohj2
  • saarian/ohj2
  • niemimm/ohj2
  • jppaasww/ohj2-2025k
  • ssniinim/ohj2
  • niememan/ohj2
  • milimaas/ohj2
  • kallmovu/ohj2
  • adaoliro/ohj2
  • tojuhann/ohj2
  • vevejuha/ohj2
  • mieikrla/ohj2
  • miankort/ohj2
  • saeteppo/ohj2
  • saelripa/ohj2
  • saniitty/ohj2
  • nsmietyt/ohj2
  • mikkolto/ohj2
  • mmuhonen/ohj2k25
  • saukkota/ohj-2-ht
  • eenorta/ohj2
  • oapaaso/ht-2
  • eeeeoino/ohj2
  • hietmaem/ohj2
  • vvlaspa/ohj2ht
  • lalaajal/ohj2
  • pepartyy/ohj2
  • loukovjv/ohj2
  • vihtkaan/ohj2
  • annelinu/ohjelmointi2
  • lehtikmi/ohj2
  • ihakalel/ohj2
  • aichinos/ohj2
  • lahteela/ohj-2-ht
  • pellrata/ohj2
  • iljinisa/ohj2
  • nkeuren/ohj2
  • hiltunma/ohj2
  • esshelkr/ohj2
  • vianelo/ohj2
  • kousaepw/ohj-2-ht
  • amheikkz/ohj2
  • jatirkko/ohj2
  • akharine/ohj2
  • rlokilja/ohj2
  • eskrliim/ohj2
  • masakoiv/ohj2
  • toivjope/ohj2
  • sasalons/ohj2
  • hirvepjw/ohj2
  • lajoveps/vuororekisteri
  • lelitirr/ohj-225
  • juhsansa/ohj2
  • essmarpe/ohj2
  • lehtlrvt/ohj2
  • setilus/ohj2
  • julipits/ohj2
  • kivistve/ohj2
  • erpajala/ohj2
  • pslohi/ohj2
  • sediiv/ohj2
  • jovesaar/ohj2
  • jutaalko/ohj2
  • valltoha/ohj2
  • ruotvive/ohj2ht
  • kkvalke/ohj2
  • aetuukka/espanjakohderekisteri
  • pdanilei/ohj2ht
  • lahtlule/ohj2
  • jaemvahu/ohj2
  • kantsiii/ohj2
  • tototuru/ohj2
  • elmotabe/ohj2
  • sutinele/ohj2
  • vepajuna/ohj2
  • tornittu/reseptilista
  • sasoleht/ohj2
  • eemjorto/ohj2
  • gagolzar/ohj2
  • sievanee/ohj2
  • nobekail/ohj2
  • mamiparv/ohj2
  • halolpvz/ohj2
  • tukilo/ohj2
  • mmleppis/ohj2
  • tmruisma/ohj2
  • aajataip/ohj-2
  • salonevs/ohj-2
  • ygulusen/ohj2
  • saarakka/ohj2
  • eakoskix/ohj2
  • lamminm/ohj2ht
  • sellmmv/salibandynpelaajarekisteri
  • tuoskopp/ohj2
  • haarates/ohj-2
  • jormlsuu/ohj2
  • lihiauka/ohj2
  • eeemkarv/ohj2
  • uekolehm/ohj2
  • smkolari/ohj-2-a
  • spicjrxz/ohj2
  • maalvirt/ohj-2-ht
  • hietaolo/ohj2ht
  • rtmatilt/ohj2
  • veevjoen/ohj2
  • lainejee/ohj2
  • pohtojoj/tuotelistaaja
  • jokayli/ohj2
  • sulasaal/ohj2
  • kalloupe/ohj2
  • apeshhhh/ohj2
  • kopperp/ohj2
  • garammtu/ohj2
  • ettalaes/ohj2
  • rajanije/ohj2
  • timovaan/ohj2
  • mkvuonos/ohj2
  • tuomiluu/ohj2
  • konttijm/ohj2
  • palolala/ohj2
  • vejokauk/ohj2
  • peihanus/ohj2
  • itsario/ohj2
  • hejumivu/ohj2
  • isojarto/ohj2
  • pirinpot/ohj2ht
  • oihietan/ohj2
  • niemhizz/ohj2
  • oparve/ohj2
  • truhtejo/ohj-2-ht
  • malineps/ohj-2-pelivalikoima
  • kylkii/ohj2
  • emigrank/ohj2
  • samavakk/ohj2
  • lausofla/ohj2
  • arossors/ohj-2-2
  • nurmsajo/ohj2
  • mattarma/ohj2
  • akjuhesa/ohj-2-ht
  • ovevalka/ohj2
  • lequyanh/ohj-2-ht
  • jasyvays/ohj2
  • lindtope/ohj2
  • kaipainm/ohj2
  • peillips/ohj2
  • miwamich/ohj2
  • anpahypp/ohj2harkka
  • kreenk/ohj2
  • iiaumaoi/ohj2
  • jmsutizy/ohj-2-25
  • conrcsir/ohj2
  • palaakho/ht-metsastyspaivakirja
  • makelkjt/ohj2
  • jooantni/ohj2
  • ttkelaw/ohj-2-2025-k
  • koivishe/kuntohalli-oy
  • laleiho/harjoitustyo-ohj-2
  • joolmatt/ohj2-ht
  • akrasa/ohj2
  • rikretel/ohj-2-ht
  • vuorelma/ohj2
171 results
Show changes
Commits on Source (13)
Showing
with 671 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/ohj2"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Fanttikvariaatti</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>
</projectDescription>
<?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="Fanttikvariaatti"/>
<info/>
</deploy>
<signjar/>
</anttasks:AntTask>
package harjoitustyofx;
//import javafx.application.Application;
import javafx.fxml.FXML;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.Pane;
import javafx.fxml.FXMLLoader;
/**
* Luokka Katalogisivua varten.
* @author jimis
* @version 27.2.2025
*
*/
public class KatalogiGUIController {
@FXML private Button closeButton;
/**
* Event handler peruuta-painikkeelle,
*/
@FXML private void suljeSivu(){
Stage stage = (Stage) closeButton.getScene().getWindow();
stage.close();
}
/**
* Avaa kirjan Lisäyssivun
* @throws Exception
*/
@FXML void lisaaKirja() throws Exception {
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("LisaaKirjaGUIView.fxml"));
final Pane root = ldr.load();
Stage stage = new Stage();
stage.setScene(new Scene(root));
stage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?import fi.jyu.mit.fxgui.StringGrid?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<BorderPane xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="harjoitustyofx.KatalogiGUIController">
<center>
<VBox>
<children>
<HBox>
<children>
<StringGrid prefWidth="500.0" rivit="Kirjailija|Kirja|Vuosi|Hinta|Sivumäärä" />
<VBox prefHeight="200.0" prefWidth="90.0">
<children>
<Button fx:id="closeButton" mnemonicParsing="false" onMousePressed="#suljeSivu" prefHeight="44.0" prefWidth="52.0" text="Koti">
<VBox.margin>
<Insets bottom="20.0" top="20.0" />
</VBox.margin>
</Button>
<Button mnemonicParsing="false" onMouseReleased="#lisaaKirja" prefHeight="25.0" prefWidth="48.0" text="Lisää">
<VBox.margin>
<Insets bottom="20.0" top="20.0" />
</VBox.margin>
</Button>
<Button mnemonicParsing="false" text="Poista">
<VBox.margin>
<Insets bottom="20.0" top="20.0" />
</VBox.margin>
</Button>
<Button mnemonicParsing="false" prefHeight="25.0" prefWidth="48.0" text="Edit">
<VBox.margin>
<Insets top="20.0" />
</VBox.margin>
</Button>
</children>
</VBox>
</children>
</HBox>
</children>
</VBox>
</center>
<top>
<Label text="Katalogi" BorderPane.alignment="CENTER">
<font>
<Font size="31.0" />
</font>
</Label>
</top>
</BorderPane>
package harjoitustyofx;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.fxml.FXMLLoader;
/**
* @author jimis
* @version 16.2.2025
*
*/
public class KirjakatalogiMain extends Application {
@Override
public void start(Stage primaryStage) {
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("MenuGUI.fxml"));
final Pane root = ldr.load();
Scene scene = new Scene(root);
scene.getStylesheets().add(getClass().getResource("kirjakatalogi.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.setTitle("kirjakatalogi");
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
package harjoitustyofx;
import fi.jyu.mit.fxgui.Dialogs;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
/**
* Luokka Laskutussivun painikkeita varten.
* @author jimis
* @version 26.2.2025
*
*/
public class LaskutussivuGUIController {
@FXML private Button closeButton;
/**
* Event handler peruuta-painikkeelle,
*/
@FXML private void suljeSivu(){
Stage stage = (Stage) closeButton.getScene().getWindow();
stage.close();
}
@FXML void lisaaLasku() throws Exception {
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("LisaaLaskuGUIView.fxml"));
final Pane root = ldr.load();
Stage stage = new Stage();
stage.setScene(new Scene(root));
stage.show();
}
catch(Exception e) {
e.printStackTrace();
}
}
/**
* Tukipainikkeessa on vain puhelinnumero
*/
@FXML private void avaaTuki()
{
Dialogs.showMessageDialog("Tekninen tuki: Puh: +3581234567");
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?import fi.jyu.mit.fxgui.StringGrid?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<BorderPane xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="harjoitustyofx.LaskutussivuGUIController">
<right>
<VBox prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
<children>
<Button fx:id="lisaaLasku" mnemonicParsing="false" onMousePressed="#lisaaLasku" prefHeight="33.0" prefWidth="109.0" text="Lisää">
<VBox.margin>
<Insets bottom="25.0" left="5.0" right="5.0" top="50.0" />
</VBox.margin>
</Button>
<Button fx:id="closeButton" mnemonicParsing="false" onMousePressed="#suljeSivu" prefHeight="32.0" prefWidth="117.0" text="Palaa Etusivulle">
<VBox.margin>
<Insets bottom="25.0" left="5.0" right="5.0" top="10.0" />
</VBox.margin>
</Button>
<Button mnemonicParsing="false" onMousePressed="#avaaTuki" prefHeight="35.0" prefWidth="112.0" text="Tuki">
<VBox.margin>
<Insets bottom="25.0" left="5.0" right="5.0" top="10.0" />
</VBox.margin>
</Button>
<Button mnemonicParsing="false" prefHeight="32.0" prefWidth="89.0" text="Poista Maksetut">
<VBox.margin>
<Insets left="5.0" right="5.0" top="10.0" />
</VBox.margin>
<padding>
<Insets bottom="1.0" />
</padding>
</Button>
</children>
</VBox>
</right>
<center>
<StringGrid rivit="S-Posti|Hinta|Eräpäivä|Maksettu|Nimi&#10;sample|0,00€|01.01.1970|Kyllä|;Matti Meikäläinen&#10;" BorderPane.alignment="CENTER" />
</center>
<top>
<Label text="Laskutussivu" BorderPane.alignment="CENTER">
<font>
<Font size="29.0" />
</font>
</Label>
</top>
</BorderPane>
package harjoitustyofx;
//import javafx.application.Application;
import javafx.fxml.FXML;
import javafx.stage.Stage;
//import javafx.scene.Scene;
import javafx.scene.control.Button;
//import javafx.scene.layout.Pane;
//import javafx.fxml.FXMLLoader;
/**
* @author jimis
* @version 16.2.2025
* Tämä hallitsee kirjan Lisäyssivua
* tyhä
*/
public class LisaaKirjaGUIController {
@FXML private Button closeButton;
/**
* Event handler peruuta-painikkeelle,
*/
@FXML private void suljeSivu(){
Stage stage = (Stage) closeButton.getScene().getWindow();
stage.close();
}
}
\ No newline at end of file
<?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.SplitPane?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<AnchorPane xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="harjoitustyofx.LisaaKirjaGUIController">
<children>
<SplitPane dividerPositions="0.7911073825503354" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" orientation="VERTICAL" prefHeight="400.0" prefWidth="477.0">
<items>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="311.0" prefWidth="522.0" style="-fx-border-color: blue; -fx-background-color: white; -fx-border-width: 3;">
<children>
<GridPane layoutX="80.0" layoutY="47.0" prefHeight="239.0" prefWidth="346.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="84.66669209798177" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="84.66669209798177" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="84.66669209798177" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="67.33331298828125" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="71.00001017252605" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="73.33335367838542" minHeight="0.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="60.0" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<TextField minWidth="60.0" GridPane.columnIndex="1" GridPane.rowIndex="3">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<TextField minWidth="60.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<TextField minWidth="60.0" GridPane.columnIndex="1" GridPane.rowIndex="4">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<TextField minWidth="60.0" GridPane.columnIndex="1" GridPane.rowIndex="5">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<TextField minWidth="60.0" GridPane.columnIndex="1" GridPane.rowIndex="6">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<TextField minWidth="60.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<TextField minWidth="60.0" GridPane.columnIndex="1">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<Label prefHeight="17.0" prefWidth="73.0" text="Teoksen nimi" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<Label prefHeight="17.0" prefWidth="47.0" text="Kirjailija" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
<Label prefHeight="17.0" prefWidth="34.0" text="Vuosi" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER" />
<Label prefHeight="17.0" prefWidth="59.0" text="Sivumäärä" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER" />
<Label prefHeight="17.0" prefWidth="39.0" text="Kannet" GridPane.halignment="CENTER" GridPane.rowIndex="4" GridPane.valignment="CENTER" />
<Label text="Kunto" GridPane.halignment="CENTER" GridPane.rowIndex="5" GridPane.valignment="CENTER" />
<Label prefHeight="17.0" prefWidth="33.0" text="Hinta" GridPane.halignment="CENTER" GridPane.rowIndex="6" GridPane.valignment="CENTER" />
</children>
</GridPane>
<Label layoutX="96.0" layoutY="12.0" prefHeight="35.0" prefWidth="140.0" text="Fanttikvariaatti OY">
<font>
<Font size="17.0" />
</font>
</Label>
</children>
</AnchorPane>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="100.0" prefWidth="160.0" style="-fx-border-color: blue; -fx-border-width: 3;">
<children>
<Button layoutX="60.0" layoutY="27.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="140.0" text="Lisää kirja" />
<Button layoutX="276.0" layoutY="27.0" mnemonicParsing="false" onAction="#suljeSivu" fx:id="closeButton" prefHeight="25.0" prefWidth="140.0" text="Peruuta" />
</children>
</AnchorPane>
</items>
</SplitPane>
</children>
</AnchorPane>
package harjoitustyofx;
//import javafx.application.Application;
import javafx.fxml.FXML;
//import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
//import javafx.scene.Scene;
//import javafx.scene.Scene;
import javafx.scene.control.Button;
//import javafx.scene.layout.Pane;
//import javafx.fxml.FXMLLoader;
//import javafx.scene.layout.Pane;
/**
* Laskun lisäys.
* @author jimis
* @version 27.2.2025
*
*/
public class LisaaLaskuGUIController {
@FXML private Button closeButton;
/**
* Event handler peruuta-painikkeelle,
*/
@FXML private void suljeSivu(){
Stage stage = (Stage) closeButton.getScene().getWindow();
stage.close();
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<AnchorPane xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="harjoitustyofx.LisaaLaskuGUIController">
<children>
<SplitPane dividerPositions="0.7911073825503354" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" orientation="VERTICAL" prefHeight="400.0" prefWidth="477.0">
<items>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="311.0" prefWidth="522.0" style="-fx-border-color: blue; -fx-background-color: white; -fx-border-width: 3;">
<children>
<GridPane layoutX="80.0" layoutY="47.0" prefHeight="239.0" prefWidth="346.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="84.66669209798177" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="84.66669209798177" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="67.33331298828125" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="71.00001017252605" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="71.00001017252605" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<TextField minWidth="60.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<TextField minWidth="60.0" GridPane.columnIndex="1" GridPane.rowIndex="3">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<TextField minWidth="60.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<TextField minWidth="60.0" GridPane.columnIndex="1">
<GridPane.margin>
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</GridPane.margin>
</TextField>
<Label alignment="CENTER" prefHeight="17.0" prefWidth="73.0" text="Sähköposti" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<Label prefHeight="17.0" prefWidth="47.0" text="Eräpäivä" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
<Label alignment="CENTER" prefHeight="17.0" prefWidth="59.0" text="Hinta" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER" />
<Label alignment="CENTER" prefHeight="17.0" prefWidth="39.0" text="Nimi" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER" />
<Label alignment="CENTER" contentDisplay="CENTER" prefHeight="17.0" prefWidth="179.0" GridPane.rowIndex="4" />
<CheckBox alignment="CENTER_RIGHT" contentDisplay="CENTER" mnemonicParsing="false" text="Maksettu" GridPane.rowIndex="4">
<GridPane.margin>
<Insets left="50.0" />
</GridPane.margin>
</CheckBox>
</children>
</GridPane>
<Label layoutX="96.0" layoutY="12.0" prefHeight="35.0" prefWidth="140.0" text="Fanttikvariaatti OY">
<font>
<Font size="17.0" />
</font>
</Label>
</children>
</AnchorPane>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="100.0" prefWidth="160.0" style="-fx-border-color: blue; -fx-border-width: 3;">
<children>
<Button layoutX="60.0" layoutY="27.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="140.0" text="Lisää lasku" />
<Button fx:id="closeButton" layoutX="276.0" layoutY="27.0" mnemonicParsing="false" onAction="#suljeSivu" prefHeight="25.0" prefWidth="140.0" text="Peruuta" />
</children>
</AnchorPane>
</items>
</SplitPane>
</children>
</AnchorPane>
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.MenuButton?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<AnchorPane xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="harjoitustyofx.MenuGUIcontroller">
<children>
<SplitPane dividerPositions="0.3" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0">
<items>
<AnchorPane minHeight="0.0" minWidth="0.0" opacity="0.78" prefHeight="160.0" prefWidth="100.0" style="-fx-background-color: green; -fx-border-color: blue; -fx-border-width: 2;">
<children>
<Button layoutX="33.0" layoutY="319.0" mnemonicParsing="false" onMouseReleased="#lisaaKirja" prefHeight="55.0" prefWidth="110.0" style="-fx-border-color: blue;" text="Lisää kirja" />
<Button layoutX="33.0" layoutY="233.0" mnemonicParsing="false" onMouseReleased="#avaaLasku" prefHeight="55.0" prefWidth="110.0" style="-fx-border-color: blue; -fx-border-radius: 3;" text="Laskutus" />
<Button layoutX="33.0" layoutY="143.0" mnemonicParsing="false" onMouseReleased="#avaaTuki" prefHeight="55.0" prefWidth="110.0" style="-fx-border-color: blue;" text="Tuki" />
</children>
<opaqueInsets>
<Insets />
</opaqueInsets>
</AnchorPane>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="397.0" prefWidth="419.0" style="-fx-background-color: green; -fx-border-width: 2; -fx-border-color: blue;">
<children>
<Button id="hakupainike" layoutX="14.0" layoutY="186.0" mnemonicParsing="false" onMouseReleased="#haku" text="Hae" />
<TextField layoutX="65.0" layoutY="186.0" />
<MenuButton layoutX="227.0" layoutY="186.0" mnemonicParsing="false" text="Valinta">
<items>
<MenuItem mnemonicParsing="false" text="sivumäärä yli" />
<MenuItem mnemonicParsing="false" text="sivumäärä alle" />
<MenuItem mnemonicParsing="false" text="Hinta" />
<MenuItem mnemonicParsing="false" text="Nimi - kirjailija" />
<MenuItem mnemonicParsing="false" text="Nimi - teos" />
</items>
</MenuButton>
<Text layoutX="33.0" layoutY="268.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Tervetuloa kirjakauppa Fanttikvariaatti OY:n kirjakatalogiin.Ylhäältä voit etsiä haluamaasi kirjaa. Napauta ensin Valinta-painiketta,jonka avulla voit valita hakuperusteen.Kirjoita sen jälkeen hakusana ja paina hae- painiketta." wrappingWidth="318.8034019470215" />
<Text layoutX="14.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Fanttikvariaatti" wrappingWidth="218.13669967651367">
<font>
<Font size="30.0" />
</font>
</Text>
</children>
</AnchorPane>
</items>
</SplitPane>
</children>
</AnchorPane>
package harjoitustyofx;
import fi.jyu.mit.fxgui.Dialogs;
// import javafx.application.Application;
import javafx.fxml.FXML;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.fxml.FXMLLoader;
//import java.net.URL;
//import java.util.ResourceBundle;
/**
* @author jimis
* @version 16.2.2025
* Hakutoiminto käynnistää katalogin.
* tyhä
*/
public class MenuGUIcontroller {
/**
* Avaa katalogilistaussivun
*/
@FXML void haku () throws Exception {
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("KatalogilistausGUIView.fxml"));
final Pane root = ldr.load();
Stage stage = new Stage();
stage.setScene(new Scene(root));
stage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
/**
* Avaa laskutussivun
* @throws Exception
*/
@FXML void avaaLasku () throws Exception {
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("LaskutussivuGUIView.fxml"));
final Pane root = ldr.load();
Stage stage = new Stage();
stage.setScene(new Scene(root));
stage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
/**
* Avaa kirjan Lisäyssivun
* @throws Exception
*/
@FXML void lisaaKirja() throws Exception {
try {
FXMLLoader ldr = new FXMLLoader(getClass().getResource("LisaaKirjaGUIView.fxml"));
final Pane root = ldr.load();
Stage stage = new Stage();
stage.setScene(new Scene(root));
stage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
/**
* Tukipainikkeessa on vain puhelinnumero
*/
@FXML private void avaaTuki()
{
Dialogs.showMessageDialog("Tekninen tuki: Puh: +3581234567");
}
}
\ No newline at end of file
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */
\ No newline at end of file
kuvat/CRC-Kortti1.jpg

1.21 MiB

kuvat/CRC-Kortti1.png

4.58 MiB

Image diff could not be displayed: it is too large. Options to address this: view the blob.
kuvat/katalogiikkuna.png

46.5 KiB

kuvat/katalogiikkunafx.png

20.3 KiB