Yhtenäinen TV_COLUMN_STYLE
Signed-off-by: laurimaaninka <lauri.maaninka@gmail.com>
This commit is contained in:
@@ -330,8 +330,8 @@ public class AsiakasIkkuna extends Stage {
|
||||
alert.setTitle("Onnistuimme!");
|
||||
alert.setHeaderText("Asiakkaan tallentaminen onnistui!");
|
||||
//TODO tähän myös dinneri määrät...
|
||||
// alert.setContentText(String.format("%s saa jatkossa yhteensä \n%s salaattia, %s pääruokaa ja %s jälkiruokaa viikossa",
|
||||
// käsiteltäväAsiakas.getNimi(), käsiteltäväAsiakas.getSalaatit()*viikonKuljetukset, käsiteltäväAsiakas.getPääruoat()*viikonKuljetukset, käsiteltäväAsiakas.getPääruoat()*viikonKuljetukset));
|
||||
alert.setContentText(String.format("%s saa lounaalla yhteensä \n%s salaattia, %s pääruokaa ja %s jälkiruokaa viikossa",
|
||||
käsiteltäväAsiakas.getNimi(), käsiteltäväAsiakas.getSalaatit()*viikonKuljetukset, käsiteltäväAsiakas.getPääruoat()*viikonKuljetukset, käsiteltäväAsiakas.getPääruoat()*viikonKuljetukset));
|
||||
alert.showAndWait();
|
||||
this.close();
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package fi.lpam.gui;
|
||||
|
||||
import fi.lpam.Main;
|
||||
import fi.lpam.dataluokat.Asiakas;
|
||||
import fi.lpam.gui.elementit.FontLabel;
|
||||
import fi.lpam.gui.elementit.MaaraTableColumn;
|
||||
import fi.lpam.gui.elementit.TabPohja;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.scene.control.*;
|
||||
@@ -191,10 +189,6 @@ public class Asiakashallinta extends TabPohja {
|
||||
column.setEditable(false);
|
||||
column.setReorderable(false);
|
||||
column.setResizable(true);
|
||||
column.setStyle(
|
||||
"-fx-alignment: CENTER;" +
|
||||
"-fx-font-size: " + Main.properties.getProperty("tekstiFonttiKoko") + "px;" +
|
||||
"-fx-font-family: " + Main.properties.getProperty("tekstiFontti")
|
||||
);
|
||||
column.setStyle(TV_COLUMN_STYLE);
|
||||
}
|
||||
}
|
||||
@@ -143,10 +143,7 @@ public class KuljetusListat extends TabPohja {
|
||||
sarake.setSortable(false);
|
||||
sarake.setEditable(true);
|
||||
sarake.setResizable(true);
|
||||
sarake.setStyle(
|
||||
"-fx-alignment: CENTER;" +
|
||||
"-fx-font-size: " + Main.properties.getProperty("tekstiFonttiKoko") + "px;" +
|
||||
"-fx-font-family: " + Main.properties.getProperty("tekstiFontti"));
|
||||
sarake.setStyle(TV_COLUMN_STYLE);
|
||||
}
|
||||
tcNimi.setEditable(false);
|
||||
}
|
||||
|
||||
@@ -123,10 +123,7 @@ public class KuljetusRaportit extends TabPohja {
|
||||
for (TableColumn<RaporttiRivi, ?> sarake : tableView.getColumns()) {
|
||||
sarake.setEditable(false);
|
||||
sarake.setResizable(true);
|
||||
sarake.setStyle(
|
||||
"-fx-alignment: CENTER;" +
|
||||
"-fx-font-size: " + Main.properties.getProperty("tekstiFonttiKoko") + "px;" +
|
||||
"-fx-font-family: " + Main.properties.getProperty("tekstiFontti"));
|
||||
sarake.setStyle(TV_COLUMN_STYLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ public class TabPohja extends Tab {
|
||||
public static Insets INSETS;
|
||||
public static Border BORDER = new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, new CornerRadii(5), BorderWidths.DEFAULT));
|
||||
public static String STYLE;
|
||||
public static String TV_COLUMN_STYLE;
|
||||
public static Font BUTTON_FONT;
|
||||
public static Font TEKSTI_FONT;
|
||||
public static double SPACING;
|
||||
@@ -29,6 +30,10 @@ public class TabPohja extends Tab {
|
||||
INSETS = new Insets(Double.parseDouble(prop.getProperty("insets")));
|
||||
SPACING = Double.parseDouble(prop.getProperty("insets"));
|
||||
STYLE = "-fx-background-color: " + prop.getProperty("taustaVari");
|
||||
TV_COLUMN_STYLE =
|
||||
"-fx-alignment: CENTER;" +
|
||||
"-fx-font-size: " + Main.properties.getProperty("tekstiFonttiKoko") + "px;" +
|
||||
"-fx-font-family: " + Main.properties.getProperty("tekstiFontti");
|
||||
BUTTON_FONT = Font.font(prop.getProperty("buttonFontti"), FontWeight.BOLD, Double.parseDouble(prop.getProperty("buttonFonttiKoko")));
|
||||
TEKSTI_FONT = Font.font(prop.getProperty("tekstiFontti"), FontWeight.NORMAL, Double.parseDouble(prop.getProperty("tekstiFonttiKoko")));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user