Advertisement
Guest User

Untitled

a guest
May 28th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.53 KB | None | 0 0
  1. //ChangeListener Einheit
  2.         dropdownsprache.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {
  3.             @Override
  4.             public void changed(ObservableValue observable, Object oldValue, Object newValue) {
  5.                 if (newValue != oldValue) {
  6.  
  7.                     if (newValue.equals("de_DE")) {
  8.                         maßstab_label.setText("Maßstab");
  9.                         original_label.setText("Originallänge");
  10.                         model_label.setText("Modellänge");
  11.                         einheitFehler = "Bitte geben Sie eine Einheit zum Umrechnen an.";
  12.                         eingabeFehler = "Fehlerhafte Eingabe. Bitte benutzen Sie nur die Zahlen von 0-9 und '.' oder ',' als Kommata.";
  13.                     } else if (newValue.equals("de_AT")) {
  14.                         maßstab_label.setText("Skala");
  15.                         original_label.setText("Moddellänge");
  16.                         model_label.setText("Orígínallänge");
  17.                         einheitFehler = "Bitte geben Sie Daten zum umrechnen an.";
  18.                         eingabeFehler = "Fehlerhafte Eingabe. Bitte nutzen Sie nur die Zahlen von 0-9 und '.' oder ',' als Kommata.";
  19.                     } else if (newValue.equals("en_US")) {
  20.                         maßstab_label.setText("Scale");
  21.                         original_label.setText("Original lenght");
  22.                         model_label.setText("Model legnth");
  23.                         einheitFehler = "Please enter a value.";
  24.                         eingabeFehler = "Error. Only use 0-9 and '.' or ',' as separators.";
  25.                     } else if (newValue.equals("en_GB")) {
  26.                         maßstab_label.setText("Scale");
  27.                         original_label.setText("Original lenght");
  28.                         model_label.setText("Model length");
  29.                         einheitFehler = "Please supply a value.";
  30.                         eingabeFehler = "Error. Please only use the numbers 0-9 and '.' or ',' as separators.";
  31.                     } else if (newValue.equals("en_ZA")) {
  32.                         maßstab_label.setText("Scaling");
  33.                         original_label.setText("Origin lenght");
  34.                         model_label.setText("Modeling length");
  35.                         einheitFehler = "Please enter a value into the assigned field.";
  36.                         eingabeFehler = "Error. Please only use the characters 0-9 and '.' or ','.";
  37.                     }
  38.  
  39.                 }
  40.  
  41.             }
  42.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement