#17 Luotu custom label luokka, otettu uudet säädöt käyttöön mahdollisimman monessa paikkaa
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package fi.lpam.gui;
|
||||
|
||||
import fi.lpam.Main;
|
||||
import fi.lpam.dataluokat.RaporttiRivi;
|
||||
import fi.lpam.gui.elementit.FontLabel;
|
||||
import fi.lpam.tulostajat.KuljetusRaporttiTulostaja;
|
||||
import fi.lpam.gui.tableCell.PaivamaaraTableCell;
|
||||
import fi.lpam.gui.elementit.TabPohja;
|
||||
@@ -41,16 +43,16 @@ public class KuljetusRaportit extends TabPohja {
|
||||
BorderPane yläpalkki = new BorderPane();
|
||||
root.setTop(yläpalkki);
|
||||
|
||||
Label infoTeksti = new Label("Kuljetusraportit. \nTarkka-valinnalla koostetun raportin tulostaminen paperille ei suositeltua.");
|
||||
infoTeksti.setFont(tekstiFont);
|
||||
Label infoTeksti = new FontLabel(tekstiFont, "Kuljetusraportit. \nTarkka-valinnalla koostetun raportin tulostaminen paperille ei suositeltua.");
|
||||
yläpalkki.setLeft(infoTeksti);
|
||||
|
||||
HBox yläpalkinNapit = new HBox();
|
||||
yläpalkinNapit.setAlignment(Pos.CENTER);
|
||||
yläpalkinNapit.setSpacing(5);
|
||||
yläpalkinNapit.setSpacing(spacing);
|
||||
yläpalkki.setRight(yläpalkinNapit);
|
||||
|
||||
tarkka = new CheckBox("Tarkka");
|
||||
tarkka.setFont(tekstiFont);
|
||||
alkuPvm = new DatePicker(LocalDate.now().minusDays(LocalDate.now().getDayOfMonth() - 1));
|
||||
loppuPvm = new DatePicker(LocalDate.now());
|
||||
Button haeKuljetukset = new Button("Hae");
|
||||
@@ -60,8 +62,8 @@ public class KuljetusRaportit extends TabPohja {
|
||||
tulostaRaportti.setFont(buttonFont);
|
||||
tulostaRaportti.setOnAction(_ ->tulostaRaportti());
|
||||
yläpalkinNapit.getChildren().addAll(tarkka,
|
||||
new Label("Hae kuljetukset välillä:"),
|
||||
alkuPvm, new Label("-"), loppuPvm,
|
||||
new FontLabel(tekstiFont,"Hae kuljetukset välillä:"),
|
||||
alkuPvm, new FontLabel(tekstiFont,"-"), loppuPvm,
|
||||
haeKuljetukset, tulostaRaportti);
|
||||
|
||||
root.setCenter(tableView);
|
||||
@@ -109,12 +111,15 @@ public class KuljetusRaportit extends TabPohja {
|
||||
|
||||
tableView.getColumns().addAll(tcNimi, tcPvm, tcSalaatit, tcPääruoat, tcJälkiruoat, tcLisätiedot,
|
||||
tcYhteyshenkilönNimi, tcLaskutusOsoite, tcYhteyshenkilönPuhelinnumero, tcYhteyshenkilönSähköposti);
|
||||
tableView.setPlaceholder(new Label("Hae raportti"));
|
||||
tableView.setPlaceholder(new FontLabel(buttonFont, "Hae raportti"));
|
||||
for (TableColumn<RaporttiRivi, ?> sarake : tableView.getColumns()) {
|
||||
sarake.setSortable(false);
|
||||
sarake.setEditable(false);
|
||||
sarake.setResizable(true);
|
||||
sarake.setStyle("-fx-alignment: CENTER; -fx-font-size: 16px;");
|
||||
sarake.setStyle(
|
||||
"-fx-alignment: CENTER;" +
|
||||
"-fx-font-size: " + Main.properties.getProperty("tekstiFonttiKoko") + "px;" +
|
||||
"-fx-font-family: " + Main.properties.getProperty("tekstiFontti"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user