roskenet / springboot-javafx-support

SpringBoot / JavaFX8 Integration
MIT License
422 stars 139 forks source link

Setting Scene RIGHT TO LEFT Orientation #67

Closed mtbadi39 closed 6 years ago

mtbadi39 commented 6 years ago

Trying to apply RIGHT TO LEFT Orientation to the scene objects by adding : Main.getScene().setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); in Main but not worked

mtbadi39 commented 6 years ago

resolved by adding :

Locale.setDefault(new Locale("ar", "DZ"));
String lang = Locale.getDefault().getLanguage();
   switch (lang) {
      case "ar": // Arabic. 
      case "iw": // Hebrew old. 
      case "he": // Hebrew new. 
      case "fa": // Persian. 
          System.setProperty("javafx.scene.nodeOrientation.RTL", "true");
          break;
}

in Main before launch method.