Compare commits
15 Commits
3.0.1
...
71b06ff075
| Author | SHA1 | Date | |
|---|---|---|---|
| 71b06ff075 | |||
| 5344efd62c | |||
| 6fb81c27aa | |||
| 2eb3b4e18d | |||
| 235b07763b | |||
| 68eb4e3be4 | |||
| a29fb6d0f5 | |||
| c52dbcd716 | |||
| fe078f9fb8 | |||
| c2942a7455 | |||
| 69243d9cb2 | |||
| 1d4056bc99 | |||
| c676ae8400 | |||
| deb2f49fb6 | |||
| ded6accd29 |
Generated
+2
-2
@@ -1,11 +1,11 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Main" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="fi.lpam.ruokamanageri.Main" />
|
||||
<option name="MAIN_CLASS_NAME" value="fi.lpam.Main" />
|
||||
<module name="Ruokamanageri" />
|
||||
<option name="PROGRAM_PARAMETERS" value="DEV" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="fi.lpam.ruokamanageri.*" />
|
||||
<option name="PATTERN" value="fi.lpam.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
|
||||
Generated
-6
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="PROJECT" dialect="SQLite" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,6 +1,6 @@
|
||||
# [LICENSE](LICENSE)
|
||||
|
||||
# [Versiohistoria](CHANGELOG.md)
|
||||
# [Versiohistoria](src/main/resources/CHANGELOG.md)
|
||||
|
||||
# Kuvaus
|
||||
Pienen kotiateriapalvelun käyttöön rakennettu ohjelma sisältäen seuraavat ominaisuudet
|
||||
@@ -9,19 +9,18 @@ Pienen kotiateriapalvelun käyttöön rakennettu ohjelma sisältäen seuraavat o
|
||||
- Kuljetuslistojen luominen
|
||||
- Kuljetettujen määrien raportointi
|
||||
|
||||
## Toteutus
|
||||
# Toteutus
|
||||
- SQLite tietokanta
|
||||
- JavaFX GUI
|
||||
- Java 25
|
||||
- Maven
|
||||
|
||||
## Käyttöönotto
|
||||
# Käyttöönotto
|
||||
- Vaatimukset
|
||||
- Windows
|
||||
- Java 25+
|
||||
- Usean tietokoneen käyttöön OneDrive -tili (samanaikaisuus ei tuettu)
|
||||
- Lataa haluamasi julkaisuversio lähdekoodista
|
||||
- Maven `package` komennolla projektista luodaan .jar tiedosto
|
||||
- .jar tiedosto sisältää kaikki riippuvuudet
|
||||
- Tietokantatiedosto asuu osoitteessa `$KOTIKANSIO/OneDrive/Kuljetusruokasovellus/tietokanta.db`
|
||||
- Lataa haluamasi ohjelmaversio julkaisuista
|
||||
- Aja .JAR tiedosto
|
||||
- Tietokanta sijaitsee osoitteessa `~/OneDrive/Kuljetusruokasovellus/tietokanta.db`
|
||||
- Ohjelma luo tietokannan, mikäli sitä ei löydy.
|
||||
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>fi.lpam.ruokamanageri</groupId>
|
||||
<artifactId>Ruokamanageri</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<version>3.1.0</version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>25</maven.compiler.source>
|
||||
@@ -43,26 +43,31 @@
|
||||
<dependency>
|
||||
<groupId>com.dlsc.gemsfx</groupId>
|
||||
<artifactId>gemsfx</artifactId>
|
||||
<version>3.10.1</version>
|
||||
<version>4.0.5</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.pdfbox</groupId>
|
||||
<artifactId>pdfbox</artifactId>
|
||||
<version>3.0.6</version>
|
||||
<version>3.0.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.3.5</version>
|
||||
<version>1.3.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xerial</groupId>
|
||||
<artifactId>sqlite-jdbc</artifactId>
|
||||
<version>3.51.2.0</version>
|
||||
<version>3.53.1.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>one.jpro.platform</groupId>
|
||||
<artifactId>jpro-mdfx</artifactId>
|
||||
<version>0.6.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -92,7 +97,7 @@
|
||||
<!-- Usage: mvn clean javafx:run -->
|
||||
<id>default-cli</id>
|
||||
<configuration>
|
||||
<mainClass>fi.lpam.ruokamanageri.Main</mainClass>
|
||||
<mainClass>fi.lpam.Main</mainClass>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
@@ -114,7 +119,7 @@
|
||||
<transformers>
|
||||
<transformer implementation=
|
||||
"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>fi.lpam.ruokamanageri.Main</mainClass>
|
||||
<mainClass>fi.lpam.Main</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
</configuration>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package fi.lpam.ruokamanageri;
|
||||
import fi.lpam.ruokamanageri.dataluokat.Tietokanta;
|
||||
import fi.lpam.ruokamanageri.gui.Asiakashallinta;
|
||||
import fi.lpam.ruokamanageri.gui.Kierroshallinta;
|
||||
import fi.lpam.ruokamanageri.gui.KuljetusRaportit;
|
||||
import fi.lpam.ruokamanageri.gui.KuljetusListat;
|
||||
package fi.lpam;
|
||||
import fi.lpam.dataluokat.Tietokanta;
|
||||
import fi.lpam.gui.*;
|
||||
import fi.lpam.gui.elementit.MuutosIlmoitus;
|
||||
import javafx.application.Application;
|
||||
import javafx.geometry.Side;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.Tab;
|
||||
import javafx.scene.control.TabPane;
|
||||
import javafx.scene.image.Image;
|
||||
@@ -30,12 +29,13 @@ public class App extends Application {
|
||||
root.setTabMinHeight(35);
|
||||
root.setTabMaxHeight(50);
|
||||
|
||||
Tab asiakasHallinta, kierrostenHallinta, kuljetusListat, kuljetetut;
|
||||
Tab asiakasHallinta, kierrostenHallinta, kuljetusListat, kuljetetut, asetukset;
|
||||
asiakasHallinta = new Tab("Asiakashallinta", new Asiakashallinta());
|
||||
kierrostenHallinta = new Tab("Kierrostenhallinta");
|
||||
kuljetusListat = new Tab("Kuljetuslistat");
|
||||
kuljetetut = new Tab("Kuljetetut");
|
||||
root.getTabs().addAll(asiakasHallinta, kierrostenHallinta, kuljetusListat, kuljetetut);
|
||||
asetukset = new Tab("Asetukset");
|
||||
root.getTabs().addAll(asiakasHallinta, kierrostenHallinta, kuljetusListat, kuljetetut, asetukset);
|
||||
|
||||
root.getSelectionModel().selectedItemProperty().addListener((_, _, newValue) -> {
|
||||
switch (newValue.getText()) {
|
||||
@@ -43,6 +43,7 @@ public class App extends Application {
|
||||
case "Kierrostenhallinta": newValue.setContent(new Kierroshallinta()); break;
|
||||
case "Kuljetuslistat": newValue.setContent(new KuljetusListat()); break;
|
||||
case "Kuljetetut": newValue.setContent(new KuljetusRaportit()); break;
|
||||
case "Asetukset": newValue.setContent(new Asetukset()); break;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -63,5 +64,7 @@ public class App extends Application {
|
||||
primaryStage.setMaximized(true);
|
||||
primaryStage.show();
|
||||
primaryStage.getIcons().add(new Image(Objects.requireNonNull(Main.class.getClassLoader().getResourceAsStream("kuljetusruokalaatikko.jpg"))));
|
||||
|
||||
if (!Main.properties.getProperty("version").equals(Main.properties.getProperty("viimeisinVersio"))) new MuutosIlmoitus();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package fi.lpam;
|
||||
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Properties;
|
||||
|
||||
public class Main {
|
||||
public static boolean dev;
|
||||
public static Properties properties;
|
||||
|
||||
public static final File asetustiedosto = Path.of(SystemUtils.getUserHome().getAbsolutePath(), "OneDrive", "Kuljetusruokasovellus", "asetukset.properties").toFile();
|
||||
|
||||
static void main(String[] args) {
|
||||
//noinspection RedundantIfStatement
|
||||
if (args.length > 0) {
|
||||
dev = true;
|
||||
} else {
|
||||
dev = false;
|
||||
}
|
||||
|
||||
try {
|
||||
Properties defaults = new Properties();
|
||||
defaults.load(Main.class.getClassLoader().getResourceAsStream("defaults.properties"));
|
||||
properties = new Properties(defaults);
|
||||
properties.load(new FileInputStream(asetustiedosto));
|
||||
}
|
||||
catch (IOException e) {
|
||||
//noinspection CallToPrintStackTrace
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
App.main();
|
||||
|
||||
try (OutputStream os = new FileOutputStream(asetustiedosto)) {
|
||||
properties.store(os, "");
|
||||
} catch (IOException e) {
|
||||
//noinspection CallToPrintStackTrace
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package fi.lpam.ruokamanageri.dataluokat;
|
||||
package fi.lpam.dataluokat;
|
||||
|
||||
import fi.lpam.ruokamanageri.gui.virheDialogit.SiirtoVirhe;
|
||||
import fi.lpam.gui.virheDialogit.SiirtoVirhe;
|
||||
|
||||
import java.sql.*;
|
||||
import java.time.DayOfWeek;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package fi.lpam.ruokamanageri.dataluokat;
|
||||
package fi.lpam.dataluokat;
|
||||
|
||||
import fi.lpam.ruokamanageri.gui.virheDialogit.SiirtoVirhe;
|
||||
import fi.lpam.gui.virheDialogit.SiirtoVirhe;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package fi.lpam.ruokamanageri.dataluokat;
|
||||
package fi.lpam.dataluokat;
|
||||
|
||||
import fi.lpam.ruokamanageri.gui.virheDialogit.SiirtoVirhe;
|
||||
import fi.lpam.gui.virheDialogit.SiirtoVirhe;
|
||||
|
||||
import java.sql.*;
|
||||
import java.time.LocalDate;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package fi.lpam.ruokamanageri.dataluokat;
|
||||
package fi.lpam.dataluokat;
|
||||
|
||||
import fi.lpam.ruokamanageri.gui.virheDialogit.SiirtoVirhe;
|
||||
import fi.lpam.gui.virheDialogit.SiirtoVirhe;
|
||||
|
||||
import java.sql.*;
|
||||
import java.time.LocalDate;
|
||||
+9
-9
@@ -1,28 +1,28 @@
|
||||
package fi.lpam.ruokamanageri.dataluokat;
|
||||
package fi.lpam.dataluokat;
|
||||
|
||||
import fi.lpam.ruokamanageri.gui.virheDialogit.SiirtoVirhe;
|
||||
import fi.lpam.gui.virheDialogit.SiirtoVirhe;
|
||||
|
||||
import fi.lpam.ruokamanageri.Main;
|
||||
import fi.lpam.Main;
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.Path;
|
||||
import java.sql.*;
|
||||
import java.util.Objects;
|
||||
|
||||
public class Tietokanta {
|
||||
private static String osoite;
|
||||
private static String dbPath = SystemUtils.getUserHome().getAbsolutePath() + "\\OneDrive\\Kuljetusruokasovellus\\tietokanta.db";
|
||||
private static File tietokantatiedosto = Path.of(SystemUtils.getUserHome().getAbsolutePath(), "OneDrive", "Kuljetusruokasovellus", "tietokanta.db").toFile();
|
||||
|
||||
public Tietokanta(boolean dev) {
|
||||
if (dev) dbPath = "testikanta.db";
|
||||
File file = new File(dbPath);
|
||||
if (dev) tietokantatiedosto = new File("testikanta.db");
|
||||
try {
|
||||
boolean _ = file.getParentFile().mkdirs();
|
||||
boolean _ = file.createNewFile();
|
||||
boolean _ = tietokantatiedosto.getParentFile().mkdirs();
|
||||
boolean _ = tietokantatiedosto.createNewFile();
|
||||
}
|
||||
catch (Exception _) {}
|
||||
|
||||
osoite = "jdbc:sqlite:" + file.getAbsolutePath();
|
||||
osoite = "jdbc:sqlite:" + tietokantatiedosto.getAbsolutePath();
|
||||
|
||||
|
||||
try (Connection conn = haeYhteys()) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package fi.lpam.ruokamanageri.dataluokat;
|
||||
package fi.lpam.dataluokat;
|
||||
|
||||
public interface TietokantaOlio {
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package fi.lpam.gui;
|
||||
|
||||
import fi.lpam.gui.elementit.TabPohja;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
|
||||
|
||||
public class Asetukset extends TabPohja {
|
||||
public Asetukset() {
|
||||
BorderPane root = new BorderPane();
|
||||
root.setPadding(oletusInsets);
|
||||
|
||||
HBox yläpalkki = new HBox();
|
||||
yläpalkki.setSpacing(5);
|
||||
yläpalkki.setAlignment(Pos.CENTER_RIGHT);
|
||||
Button btnTallenna = new Button("Tallenna");
|
||||
btnTallenna.setFont(buttonFont);
|
||||
btnTallenna.setOnAction(e -> tallennaAsetukset());
|
||||
yläpalkki.getChildren().add(btnTallenna);
|
||||
root.setTop(yläpalkki);
|
||||
|
||||
|
||||
root.setCenter(new Label("Asetukset"));
|
||||
|
||||
this.getChildren().add(root);
|
||||
}
|
||||
|
||||
private void tallennaAsetukset() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
}
|
||||
|
||||
private void näytäAsetukset() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
package fi.lpam.ruokamanageri.gui;
|
||||
package fi.lpam.gui;
|
||||
|
||||
import fi.lpam.ruokamanageri.dataluokat.Asiakas;
|
||||
import fi.lpam.dataluokat.Asiakas;
|
||||
|
||||
import fi.lpam.ruokamanageri.gui.elementit.IntegerSpinner;
|
||||
import fi.lpam.ruokamanageri.gui.elementit.TabPohja;
|
||||
import fi.lpam.ruokamanageri.Main;
|
||||
import fi.lpam.gui.elementit.IntegerSpinner;
|
||||
import fi.lpam.gui.elementit.TabPohja;
|
||||
import fi.lpam.Main;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.geometry.Side;
|
||||
+4
-5
@@ -1,8 +1,8 @@
|
||||
package fi.lpam.ruokamanageri.gui;
|
||||
package fi.lpam.gui;
|
||||
|
||||
import fi.lpam.ruokamanageri.dataluokat.Asiakas;
|
||||
import fi.lpam.ruokamanageri.gui.elementit.MaaraTableColumn;
|
||||
import fi.lpam.ruokamanageri.gui.elementit.TabPohja;
|
||||
import fi.lpam.dataluokat.Asiakas;
|
||||
import fi.lpam.gui.elementit.MaaraTableColumn;
|
||||
import fi.lpam.gui.elementit.TabPohja;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.control.Button;
|
||||
@@ -13,7 +13,6 @@ import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.*;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
+5
-6
@@ -1,18 +1,17 @@
|
||||
package fi.lpam.ruokamanageri.gui;
|
||||
package fi.lpam.gui;
|
||||
|
||||
import com.dlsc.gemsfx.MultiColumnListView;
|
||||
|
||||
import fi.lpam.ruokamanageri.dataluokat.Asiakas;
|
||||
import fi.lpam.ruokamanageri.dataluokat.Kierros;
|
||||
import fi.lpam.ruokamanageri.gui.elementit.AsiakasListCell;
|
||||
import fi.lpam.ruokamanageri.gui.elementit.TabPohja;
|
||||
import fi.lpam.dataluokat.Asiakas;
|
||||
import fi.lpam.dataluokat.Kierros;
|
||||
import fi.lpam.gui.elementit.AsiakasListCell;
|
||||
import fi.lpam.gui.elementit.TabPohja;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.ScrollPane;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
|
||||
+9
-9
@@ -1,13 +1,13 @@
|
||||
package fi.lpam.ruokamanageri.gui;
|
||||
package fi.lpam.gui;
|
||||
|
||||
import fi.lpam.ruokamanageri.dataluokat.Asiakas;
|
||||
import fi.lpam.ruokamanageri.dataluokat.Kierros;
|
||||
import fi.lpam.ruokamanageri.dataluokat.Kuljetus;
|
||||
import fi.lpam.ruokamanageri.gui.tableCell.IntegerFieldTableCellFactory;
|
||||
import fi.lpam.ruokamanageri.gui.tableCell.KuljetaTableCell;
|
||||
import fi.lpam.ruokamanageri.tulostajat.KuljetusListaTulostaja;
|
||||
import fi.lpam.ruokamanageri.gui.elementit.MaaraTableColumn;
|
||||
import fi.lpam.ruokamanageri.gui.elementit.TabPohja;
|
||||
import fi.lpam.dataluokat.Asiakas;
|
||||
import fi.lpam.dataluokat.Kierros;
|
||||
import fi.lpam.dataluokat.Kuljetus;
|
||||
import fi.lpam.gui.tableCell.IntegerFieldTableCellFactory;
|
||||
import fi.lpam.gui.tableCell.KuljetaTableCell;
|
||||
import fi.lpam.tulostajat.KuljetusListaTulostaja;
|
||||
import fi.lpam.gui.elementit.MaaraTableColumn;
|
||||
import fi.lpam.gui.elementit.TabPohja;
|
||||
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
import javafx.collections.FXCollections;
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package fi.lpam.ruokamanageri.gui;
|
||||
package fi.lpam.gui;
|
||||
|
||||
import fi.lpam.ruokamanageri.dataluokat.RaporttiRivi;
|
||||
import fi.lpam.ruokamanageri.tulostajat.KuljetusRaporttiTulostaja;
|
||||
import fi.lpam.ruokamanageri.gui.tableCell.PaivamaaraTableCell;
|
||||
import fi.lpam.ruokamanageri.gui.elementit.TabPohja;
|
||||
import fi.lpam.dataluokat.RaporttiRivi;
|
||||
import fi.lpam.tulostajat.KuljetusRaporttiTulostaja;
|
||||
import fi.lpam.gui.tableCell.PaivamaaraTableCell;
|
||||
import fi.lpam.gui.elementit.TabPohja;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.control.*;
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package fi.lpam.ruokamanageri.gui.elementit;
|
||||
package fi.lpam.gui.elementit;
|
||||
|
||||
import com.dlsc.gemsfx.MultiColumnListView;
|
||||
import fi.lpam.ruokamanageri.dataluokat.Asiakas;
|
||||
import fi.lpam.dataluokat.Asiakas;
|
||||
import javafx.beans.property.BooleanProperty;
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
import javafx.geometry.Pos;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package fi.lpam.ruokamanageri.gui.elementit;
|
||||
package fi.lpam.gui.elementit;
|
||||
|
||||
import javafx.scene.control.Spinner;
|
||||
import javafx.scene.control.SpinnerValueFactory;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package fi.lpam.ruokamanageri.gui.elementit;
|
||||
package fi.lpam.gui.elementit;
|
||||
|
||||
import javafx.scene.control.TableColumn;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package fi.lpam.gui.elementit;
|
||||
|
||||
import fi.lpam.Main;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.stage.Stage;
|
||||
import one.jpro.platform.mdfx.MarkdownView;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.Objects;
|
||||
|
||||
public class MuutosIlmoitus extends Stage {
|
||||
public MuutosIlmoitus() {
|
||||
super();
|
||||
VBox root = new VBox();
|
||||
root.setBorder(TabPohja.oletusBorder);
|
||||
root.setPadding(TabPohja.oletusInsets);
|
||||
root.setAlignment(Pos.CENTER);
|
||||
root.setSpacing(10);
|
||||
|
||||
String md;
|
||||
try (InputStreamReader isr = new InputStreamReader(Objects.requireNonNull(Main.class.getClassLoader().getResourceAsStream("CHANGELOG.md")))) {
|
||||
md = isr.readAllAsString();
|
||||
int toinenMerkintä = md.indexOf("# ", 1);
|
||||
int kolmasMerkintä = md.indexOf("# ", toinenMerkintä + 1);
|
||||
int endIndex = md.indexOf("# ", kolmasMerkintä + 1);
|
||||
md = md.substring(0, endIndex);
|
||||
}
|
||||
catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
md = "# Virhe versiolokin haussa";
|
||||
}
|
||||
|
||||
MarkdownView markdownView = new MarkdownView(md);
|
||||
root.getChildren().add(markdownView);
|
||||
|
||||
Button ok = new Button("OK");
|
||||
ok.setFont(TabPohja.buttonFont);
|
||||
ok.setOnAction(e -> this.close());
|
||||
root.getChildren().add(ok);
|
||||
|
||||
Scene scene = new Scene(root);
|
||||
this.setScene(scene);
|
||||
this.setTitle("Uusi versio, katso muutokset alta!");
|
||||
this.setResizable(false);
|
||||
this.show();
|
||||
|
||||
Main.properties.setProperty("viimeisinVersio", Main.properties.getProperty("version"));
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package fi.lpam.ruokamanageri.gui.elementit;
|
||||
package fi.lpam.gui.elementit;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.layout.*;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package fi.lpam.ruokamanageri.gui.tableCell;
|
||||
package fi.lpam.gui.tableCell;
|
||||
|
||||
import javafx.scene.control.TableCell;
|
||||
import javafx.scene.control.TableColumn;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package fi.lpam.ruokamanageri.gui.tableCell;
|
||||
package fi.lpam.gui.tableCell;
|
||||
|
||||
import fi.lpam.ruokamanageri.dataluokat.Asiakas;
|
||||
import fi.lpam.ruokamanageri.dataluokat.Kuljetus;
|
||||
import fi.lpam.ruokamanageri.gui.KuljetusListat;
|
||||
import fi.lpam.dataluokat.Asiakas;
|
||||
import fi.lpam.dataluokat.Kuljetus;
|
||||
import fi.lpam.gui.KuljetusListat;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.ContentDisplay;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package fi.lpam.ruokamanageri.gui.tableCell;
|
||||
package fi.lpam.gui.tableCell;
|
||||
|
||||
import fi.lpam.ruokamanageri.dataluokat.RaporttiRivi;
|
||||
import fi.lpam.dataluokat.RaporttiRivi;
|
||||
import javafx.scene.control.TableCell;
|
||||
|
||||
import java.time.LocalDate;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package fi.lpam.ruokamanageri.gui.virheDialogit;
|
||||
package fi.lpam.gui.virheDialogit;
|
||||
|
||||
public class SiirtoVirhe extends TietokantaVirhe{
|
||||
public SiirtoVirhe(Exception e){
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package fi.lpam.ruokamanageri.gui.virheDialogit;
|
||||
package fi.lpam.gui.virheDialogit;
|
||||
|
||||
import fi.lpam.ruokamanageri.Main;
|
||||
import fi.lpam.Main;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
@@ -1,29 +0,0 @@
|
||||
package fi.lpam.ruokamanageri;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
public class Main {
|
||||
public static boolean dev;
|
||||
public static Properties properties;
|
||||
|
||||
static void main(String[] args) {
|
||||
//noinspection RedundantIfStatement
|
||||
if (args.length > 0) {
|
||||
dev = true;
|
||||
} else {
|
||||
dev = false;
|
||||
}
|
||||
|
||||
try {
|
||||
properties = new Properties();
|
||||
properties.load(Main.class.getClassLoader().getResourceAsStream("app.properties"));
|
||||
}
|
||||
catch (IOException e) {
|
||||
//noinspection CallToPrintStackTrace
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
App.main();
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package fi.lpam.ruokamanageri.tulostajat;
|
||||
package fi.lpam.tulostajat;
|
||||
|
||||
import fi.lpam.ruokamanageri.dataluokat.Kuljetus;
|
||||
import fi.lpam.dataluokat.Kuljetus;
|
||||
import javafx.collections.ObservableList;
|
||||
|
||||
import java.io.IOException;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package fi.lpam.ruokamanageri.tulostajat;
|
||||
package fi.lpam.tulostajat;
|
||||
|
||||
import fi.lpam.ruokamanageri.dataluokat.RaporttiRivi;
|
||||
import fi.lpam.dataluokat.RaporttiRivi;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package fi.lpam.ruokamanageri.tulostajat;
|
||||
package fi.lpam.tulostajat;
|
||||
|
||||
import fi.lpam.ruokamanageri.gui.virheDialogit.SiirtoVirhe;
|
||||
import fi.lpam.gui.virheDialogit.SiirtoVirhe;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.pdmodel.PDPage;
|
||||
import org.apache.pdfbox.pdmodel.PDPageContentStream;
|
||||
@@ -8,7 +8,8 @@ module fi.lpam.ruokamanageri {
|
||||
requires java.desktop;
|
||||
requires org.apache.pdfbox;
|
||||
requires org.apache.commons.lang3;
|
||||
requires one.jpro.platform.mdfx;
|
||||
|
||||
opens fi.lpam.ruokamanageri.dataluokat to javafx.base;
|
||||
exports fi.lpam.ruokamanageri;
|
||||
opens fi.lpam.dataluokat to javafx.base;
|
||||
exports fi.lpam;
|
||||
}
|
||||
@@ -1,3 +1,8 @@
|
||||
# 3.1.0
|
||||
- Muutosloki näkyy käynnistäessä uutta versiota ensimmäistä kertaa
|
||||
- Ohjelman taustariippuvuuksia päivitetty
|
||||
- Yleistä huoltoa
|
||||
|
||||
# 3.0.1
|
||||
- Kierroshallinnan muokkaus tukemaan paremmin useampaa kierrosta
|
||||
- Kosmeettisia viilauksia muuallekin
|
||||
@@ -1,2 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: fi.lpam.ruokamanageri.Main
|
||||
@@ -1 +0,0 @@
|
||||
version=${project.version}
|
||||
@@ -0,0 +1,2 @@
|
||||
version=${project.version}
|
||||
viimeisinVersio=0.0.0
|
||||
Reference in New Issue
Block a user