en:javafx
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende ÜberarbeitungLetzte ÜberarbeitungBeide Seiten der Revision | ||
en:javafx [2018/12/22 13:14] – [Line] roehner | en:javafx [2019/04/07 20:30] – roehner | ||
---|---|---|---|
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 | + | As of JDK 11 JavaFX is no longer included |
+ | |||
+ | A documentation of JavaFX | ||
{{: | {{: | ||
+ | Please note that in the configuration under // | ||
Gerhard Röhner | Gerhard Röhner | ||
Zeile 30: | Zeile 33: | ||
{{: | {{: | ||
<code java> | <code java> | ||
- | \\ | ||
---- | ---- | ||
- | |||
==== NumberField ==== | ==== NumberField ==== | ||
{{: | {{: | ||
Zeile 46: | Zeile 47: | ||
<code java> | <code java> | ||
nfSum.setDouble(Sum, | nfSum.setDouble(Sum, | ||
- | \\ | ||
---- | ---- | ||
==== TextArea ==== | ==== TextArea ==== | ||
Zeile 59: | Zeile 59: | ||
<code java> | <code java> | ||
taOutput.appendText(" | taOutput.appendText(" | ||
- | \\ | ||
---- | ---- | ||
==== Button ==== | ==== Button ==== | ||
Zeile 83: | Zeile 82: | ||
{{: | {{: | ||
<code java> | <code java> | ||
- | \\ | ||
- | \\ | ||
---- | ---- | ||
==== RadioButton & ToggleGroup ==== | ==== RadioButton & ToggleGroup ==== | ||
Zeile 99: | Zeile 96: | ||
<code java> | <code java> | ||
String choosen= choosenRadioButton.getText(); | String choosen= choosenRadioButton.getText(); | ||
- | \\ | ||
---- | ---- | ||
==== ListView ==== | ==== ListView ==== | ||
Zeile 123: | Zeile 119: | ||
If the ListView contains numbers, the selected string must be converted into a number: | If the ListView contains numbers, the selected string must be converted into a number: | ||
<code java> | <code java> | ||
- | int Number= Integer.parseInt(s);</ | + | int Number= Integer.parseInt(s);</ |
- | \\ | + | |
---- | ---- | ||
==== ComboBox ==== | ==== ComboBox ==== | ||
Zeile 149: | Zeile 144: | ||
To be able to react automatically to an input or selection in a ComboBox an event method for //action// is created in the object inspector. | To be able to react automatically to an input or selection in a ComboBox an event method for //action// is created in the object inspector. | ||
- | \\ | ||
---- | ---- | ||
==== Spinner ==== | ==== Spinner ==== | ||
Zeile 159: | Zeile 153: | ||
At runtime you can use the // | At runtime you can use the // | ||
<code java> | <code java> | ||
- | \\ | ||
---- | ---- | ||
==== Canvas ==== | ==== Canvas ==== | ||
Zeile 175: | Zeile 168: | ||
<code java> | <code java> | ||
- | \\ | ||
---- | ---- | ||
==== Turtle ==== | ==== Turtle ==== | ||
Zeile 187: | Zeile 179: | ||
Example: | Example: | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== MenuBar ==== | ==== MenuBar ==== | ||
Zeile 193: | Zeile 184: | ||
With a MenuBar component you can create a menu bar. The menu bar displays the menus (menu components) assigned to it. | With a MenuBar component you can create a menu bar. The menu bar displays the menus (menu components) assigned to it. | ||
- | \\ | ||
---- | ---- | ||
==== ContextMenu ==== | ==== ContextMenu ==== | ||
Zeile 206: | Zeile 196: | ||
{{: | {{: | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== MenuButton ==== | ==== MenuButton ==== | ||
Zeile 213: | Zeile 201: | ||
In the object inspector enter the menu commands under // | In the object inspector enter the menu commands under // | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== SplitMenuButton ==== | ==== SplitMenuButton ==== | ||
Zeile 220: | Zeile 206: | ||
In the object inspector enter the menu commands under // | In the object inspector enter the menu commands under // | ||
- | |||
- | \\ | ||
---- | ---- | ||
=====JavaFX Controls===== | =====JavaFX Controls===== | ||
The control components of JavaFX extend the standard GUI components of JavaFX Base. | The control components of JavaFX extend the standard GUI components of JavaFX Base. | ||
- | |||
- | |||
==== Slider==== | ==== Slider==== | ||
{{: | {{: | ||
Zeile 235: | Zeile 217: | ||
double value = slider1.getValue(); | double value = slider1.getValue(); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== ProgressBar==== | ==== ProgressBar==== | ||
Zeile 246: | Zeile 226: | ||
progressBar1.setProgress(0.3); | progressBar1.setProgress(0.3); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
- | |||
==== ToolBar==== | ==== ToolBar==== | ||
{{: | {{: | ||
Zeile 259: | Zeile 236: | ||
toolBar1.getItems().addAll(bNew, | toolBar1.getItems().addAll(bNew, | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== Separator==== | ==== Separator==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== ToggleButton==== | ==== ToggleButton==== | ||
Zeile 272: | Zeile 246: | ||
if (toggleButton1.isSelected()) ... | if (toggleButton1.isSelected()) ... | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== PasswordField==== | ==== PasswordField==== | ||
{{: | {{: | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== ChoiceBox==== | ==== ChoiceBox==== | ||
{{: | {{: | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== Hyperlink==== | ==== Hyperlink==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== HTMLEditor==== | ==== HTMLEditor==== | ||
Zeile 297: | Zeile 264: | ||
String s = hTMLEditor1.getHtmlText(); | String s = hTMLEditor1.getHtmlText(); | ||
</ | </ | ||
- | \\ | ||
---- | ---- | ||
==== WebView==== | ==== WebView==== | ||
Zeile 303: | Zeile 269: | ||
A WebView component can display the web page for an internet address. In the //URL// attribute of the object inspector enter the internet address with protocol, e.g. http:// | A WebView component can display the web page for an internet address. In the //URL// attribute of the object inspector enter the internet address with protocol, e.g. http:// | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== ColorPicker==== | ==== ColorPicker==== | ||
Zeile 314: | Zeile 278: | ||
Color c = colorPicker1.getValue(); | Color c = colorPicker1.getValue(); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== DatePicker==== | ==== DatePicker==== | ||
Zeile 325: | Zeile 287: | ||
LocalDate d = datePicker1.getValue(); | LocalDate d = datePicker1.getValue(); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== Pagination==== | ==== Pagination==== | ||
{{: | {{: | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== FileChooser==== | ==== FileChooser==== | ||
Zeile 349: | Zeile 307: | ||
File f = fileChooser1_openFile(); | File f = fileChooser1_openFile(); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== FileChooser==== | ==== FileChooser==== | ||
Zeile 368: | Zeile 324: | ||
File f = fileChooser1_saveFile(); | File f = fileChooser1_saveFile(); | ||
</ | </ | ||
- | |||
- | \\ | ||
==== DirectoryChooser==== | ==== DirectoryChooser==== | ||
{{: | {{: | ||
Zeile 386: | Zeile 340: | ||
File d = directoryChooser1_openDirectory(); | File d = directoryChooser1_openDirectory(); | ||
</ | </ | ||
- | \\ | ||
---- | ---- | ||
==== ImageView==== | ==== ImageView==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== MediaView==== | ==== MediaView==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
- | |||
==== TableView==== | ==== TableView==== | ||
{{: | {{: | ||
Zeile 403: | Zeile 353: | ||
The attribute // | The attribute // | ||
- | \\ | ||
---- | ---- | ||
==== TreeTableView==== | ==== TreeTableView==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
=====JavaFX Shapes===== | =====JavaFX Shapes===== | ||
Zeile 423: | Zeile 371: | ||
} | } | ||
</ | </ | ||
- | \\ | ||
---- | ---- | ||
==== Rectangle ==== | ==== Rectangle ==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== Ellipse ==== | ==== Ellipse ==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== Polygon==== | ==== Polygon==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== Arc ==== | ==== Arc ==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== Line ==== | ==== Line ==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== Text ==== | ==== Text ==== | ||
{{: | {{: | ||
- | \\ | + | ---- |
+ | ==== QuadCurve ==== | ||
+ | {{: | ||
+ | ---- | ||
+ | ==== CubicCurve ==== | ||
+ | {{: | ||
+ | ---- | ||
+ | ==== SVGPath==== | ||
+ | {{: | ||
---- | ---- |
en/javafx.txt · Zuletzt geändert: 2022/09/02 10:27 von 127.0.0.1