Benutzer-Werkzeuge

Webseiten-Werkzeuge


en:javafx

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
en:javafx [2019/04/07 20:04] roehneren:javafx [2022/09/02 10:27] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 2: Zeile 2:
 JavaFX is supported as of version 14.0 by the Java-Editor. The development of this new graphical user interface for the Java-Editor took many months. But I think that the work was worth it. You can now work with a contemporary GUI library, which can also be designed with CSS. Creating a GUI interface is made even easier for novice programmers because, by default, the Object-Inspector displays only the most important attributes of GUI components. This makes the GUI components much easier to configure. In addition, graphic basic figures such as circle, rectangle and polygon are now available, which can also be used to design simple GUI applications with graphic objects in the classroom. JavaFX is supported as of version 14.0 by the Java-Editor. The development of this new graphical user interface for the Java-Editor took many months. But I think that the work was worth it. You can now work with a contemporary GUI library, which can also be designed with CSS. Creating a GUI interface is made even easier for novice programmers because, by default, the Object-Inspector displays only the most important attributes of GUI components. This makes the GUI components much easier to configure. In addition, graphic basic figures such as circle, rectangle and polygon are now available, which can also be used to design simple GUI applications with graphic objects in the classroom.
  
-Please note that in the configuration under //Visibility// you can set which tabs are displayed. For JavaFX you need FX Base, FX Controls and FX Shapes. You can disable the tabs for AWT and Swing here. +As of JDK 11 JavaFX is no longer included in the JDK and must be additionally installed. You can download a JavaFX Windows SDK from https://gluonhq.com/products/javafx/ and install it in parallel to OpenJDK. In the configuration enter the JavaFX folder under [[configuration#interpreter|InterpreterJavaFX-folder]].
- +
-As of JDK 11 JavaFX is no longer included in the JDK and must be additionally installed. You can download a JavaFX Windows SDK from https://gluonhq.com/products/javafx/ and install it in parallel to OpenJDK. In the configuration enter the JavaFX folder under [[configuration#interpreter|Interpreter/JavaFX-folder]].+
  
 A documentation of JavaFX can be downloaded at https://www.oracle.com/technetwork/java/javase/documentation/jdk8-doc-downloads-2133158.html. The path of the file docsfx\api\index.html is entered under [[configuration#documentation|Documentation - Manual Java FX]]. A documentation of JavaFX can be downloaded at https://www.oracle.com/technetwork/java/javase/documentation/jdk8-doc-downloads-2133158.html. The path of the file docsfx\api\index.html is entered under [[configuration#documentation|Documentation - Manual Java FX]].
  
 {{:en:visibilityen.png|}} {{:en:visibilityen.png|}}
 +Please note that in the configuration under //Visibility// you can set which tabs are displayed. For JavaFX you need FX Base, FX Controls and FX Shapes. You can disable the tabs for AWT and Swing here.
  
 Gerhard Röhner Gerhard Röhner
Zeile 84: Zeile 83:
 <code java>  if (myCheckBox.isSelected()) ...</code> <code java>  if (myCheckBox.isSelected()) ...</code>
 ---- ----
-==== RadioButton & ToggleGroup ====+==== Buttongroup ====
 {{:en:radiobuttonen.png}} {{:en:radiobuttonen.png}}
-RadioButtons offer different options, from which you can choose just one.\\+A Buttongroup groups Radiobuttons or Checkboxes. Set the attribute Checkboxes to true if you want a group of Checkboxes. Enter your options using the Items attribute
  
-To group RadioButtons, you need to include an invisible ToggleGroup component {{:en:buttongroup.png}} in the form. +For a buttongroup of radiobuttons the Java-Editor places this method into the java source code: 
-The name of this ToggleGroup component is specified for each RadioButton in the object inspector at the //ToggleGroup// attribute.+
  
-With the help of the ToggleGroup one can determine the selected option: +<code java>  public String buttonGroup1TG_getSelectedButtonGroupLabel() { 
- +    RadioButton rb = (RadioButton)buttonGroup1TG.getSelectedToggle(); 
-Example: +    if (rb !null) return rb.getText(); 
- +    return ""; 
-<code java>RadioButton choosenRadioButton = (RadioButton) toggleGroup1.getSelectedToggle();  +  } </code> 
-String choosenchoosenRadioButton.getText(); </code>+   
 +so it's easy to get the selected JRadioButton of a Buttongroup:\\ 
 +<code java>  if (bgColorTG_getSelectedButtonGroupLabel().equals("green"))</code>
 ---- ----
 ==== ListView ==== ==== ListView ====
Zeile 154: Zeile 154:
 At runtime you can use the //getValue()// method to get the current value: At runtime you can use the //getValue()// method to get the current value:
 <code java>  int value= mySpinner.getValue(); </code> <code java>  int value= mySpinner.getValue(); </code>
 +
 +To react directly to spinner changes, use the //mouseClicked// event.
 ---- ----
 ==== Canvas ==== ==== Canvas ====
en/javafx.1554660274.txt.gz · Zuletzt geändert: 2019/04/07 20:04 von roehner