Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ChangeListener Einheit
- dropdownsprache.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {
- @Override
- public void changed(ObservableValue observable, Object oldValue, Object newValue) {
- if (newValue != oldValue) {
- if (newValue.equals("de_DE")) {
- maßstab_label.setText("Maßstab");
- original_label.setText("Originallänge");
- model_label.setText("Modellänge");
- einheitFehler = "Bitte geben Sie eine Einheit zum Umrechnen an.";
- eingabeFehler = "Fehlerhafte Eingabe. Bitte benutzen Sie nur die Zahlen von 0-9 und '.' oder ',' als Kommata.";
- } else if (newValue.equals("de_AT")) {
- maßstab_label.setText("Skala");
- original_label.setText("Moddellänge");
- model_label.setText("Orígínallänge");
- einheitFehler = "Bitte geben Sie Daten zum umrechnen an.";
- eingabeFehler = "Fehlerhafte Eingabe. Bitte nutzen Sie nur die Zahlen von 0-9 und '.' oder ',' als Kommata.";
- } else if (newValue.equals("en_US")) {
- maßstab_label.setText("Scale");
- original_label.setText("Original lenght");
- model_label.setText("Model legnth");
- einheitFehler = "Please enter a value.";
- eingabeFehler = "Error. Only use 0-9 and '.' or ',' as separators.";
- } else if (newValue.equals("en_GB")) {
- maßstab_label.setText("Scale");
- original_label.setText("Original lenght");
- model_label.setText("Model length");
- einheitFehler = "Please supply a value.";
- eingabeFehler = "Error. Please only use the numbers 0-9 and '.' or ',' as separators.";
- } else if (newValue.equals("en_ZA")) {
- maßstab_label.setText("Scaling");
- original_label.setText("Origin lenght");
- model_label.setText("Modeling length");
- einheitFehler = "Please enter a value into the assigned field.";
- eingabeFehler = "Error. Please only use the characters 0-9 and '.' or ','.";
- }
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement