@@ -59,18 +59,21 @@ public class KuljetusRaportit extends TabPohja {
|
||||
Button tulostaRaportti = new Button("Tulosta raportti");
|
||||
tulostaRaportti.setFont(buttonFont);
|
||||
tulostaRaportti.setOnAction(_ ->tulostaRaportti());
|
||||
yläpalkinNapit.getChildren().addAll(tarkka, new Label("Hae kuljetukset välillä:"), alkuPvm, new Label("-"), loppuPvm, haeKuljetukset, tulostaRaportti);
|
||||
yläpalkinNapit.getChildren().addAll(tarkka,
|
||||
new Label("Hae kuljetukset välillä:"),
|
||||
alkuPvm, new Label("-"), loppuPvm,
|
||||
haeKuljetukset, tulostaRaportti);
|
||||
|
||||
root.setCenter(tableView);
|
||||
|
||||
TableColumn<RaporttiRivi, String> tcNimi = new TableColumn<>("Nimi");
|
||||
tcNimi.setMinWidth(150);
|
||||
tcNimi.setMinWidth(200);
|
||||
tcNimi.setCellValueFactory(new PropertyValueFactory<>("nimi"));
|
||||
|
||||
TableColumn<RaporttiRivi, LocalDate> tcPvm = new TableColumn<>("Päivämäärä");
|
||||
tcPvm.setMinWidth(150);
|
||||
tcPvm.setCellFactory(_ ->new PaivamaaraTableCell());
|
||||
tcPvm.setCellValueFactory(new PropertyValueFactory<>("loppuPvm"));
|
||||
tcPvm.setCellValueFactory(new PropertyValueFactory<>("pvm"));
|
||||
|
||||
TableColumn<RaporttiRivi, Integer> tcSalaatit = new TableColumn<>("Salaatit");
|
||||
tcSalaatit.setMinWidth(100);
|
||||
@@ -85,10 +88,27 @@ public class KuljetusRaportit extends TabPohja {
|
||||
tcJälkiruoat.setCellValueFactory(new PropertyValueFactory<>("jälkiruoat"));
|
||||
|
||||
TableColumn<RaporttiRivi, String> tcLisätiedot = new TableColumn<>("Lisätiedot");
|
||||
tcLisätiedot.setMinWidth(500);
|
||||
tcLisätiedot.setMinWidth(300);
|
||||
tcLisätiedot.setCellValueFactory(new PropertyValueFactory<>("lisätiedot"));
|
||||
|
||||
tableView.getColumns().addAll(tcNimi, tcPvm, tcSalaatit, tcPääruoat, tcJälkiruoat, tcLisätiedot);
|
||||
TableColumn<RaporttiRivi, String> tcYhteyshenkilönNimi = new TableColumn<>("Yhteyshenkilön nimi");
|
||||
tcYhteyshenkilönNimi.setMinWidth(200);
|
||||
tcYhteyshenkilönNimi.setCellValueFactory(new PropertyValueFactory<>("yhteyshenkilönNimi"));
|
||||
|
||||
TableColumn<RaporttiRivi, String> tcLaskutusOsoite = new TableColumn<>("Laskutusosoite");
|
||||
tcLaskutusOsoite.setMinWidth(200);
|
||||
tcLaskutusOsoite.setCellValueFactory(new PropertyValueFactory<>("laskutusOsoite"));
|
||||
|
||||
TableColumn<RaporttiRivi, String> tcYhteyshenkilönPuhelinnumero = new TableColumn<>("Puhelinnumero");
|
||||
tcYhteyshenkilönPuhelinnumero.setMinWidth(200);
|
||||
tcYhteyshenkilönPuhelinnumero.setCellValueFactory(new PropertyValueFactory<>("yhteyshenkilönPuhelinnumero"));
|
||||
|
||||
TableColumn<RaporttiRivi, String> tcYhteyshenkilönSähköposti = new TableColumn<>("Sähköposti");
|
||||
tcYhteyshenkilönSähköposti.setMinWidth(200);
|
||||
tcYhteyshenkilönSähköposti.setCellValueFactory(new PropertyValueFactory<>("yhteyshenkilönSähköposti"));
|
||||
|
||||
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"));
|
||||
for (TableColumn<RaporttiRivi, ?> sarake : tableView.getColumns()) {
|
||||
sarake.setSortable(false);
|
||||
|
||||
Reference in New Issue
Block a user