en:javafx
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende ÜberarbeitungNächste ÜberarbeitungBeide Seiten der Revision | ||
en:javafx [2018/12/22 13:03] – [TableView] roehner | en:javafx [2018/12/22 13:37] – roehner | ||
---|---|---|---|
Zeile 30: | Zeile 30: | ||
{{: | {{: | ||
<code java> | <code java> | ||
- | \\ | ||
---- | ---- | ||
- | |||
==== NumberField ==== | ==== NumberField ==== | ||
{{: | {{: | ||
Zeile 46: | Zeile 44: | ||
<code java> | <code java> | ||
nfSum.setDouble(Sum, | nfSum.setDouble(Sum, | ||
- | \\ | ||
---- | ---- | ||
==== TextArea ==== | ==== TextArea ==== | ||
Zeile 59: | Zeile 56: | ||
<code java> | <code java> | ||
taOutput.appendText(" | taOutput.appendText(" | ||
- | \\ | ||
---- | ---- | ||
==== Button ==== | ==== Button ==== | ||
Zeile 83: | Zeile 79: | ||
{{: | {{: | ||
<code java> | <code java> | ||
- | \\ | ||
- | \\ | ||
---- | ---- | ||
==== RadioButton & ToggleGroup ==== | ==== RadioButton & ToggleGroup ==== | ||
Zeile 99: | Zeile 93: | ||
<code java> | <code java> | ||
String choosen= choosenRadioButton.getText(); | String choosen= choosenRadioButton.getText(); | ||
- | \\ | ||
---- | ---- | ||
==== ListView ==== | ==== ListView ==== | ||
Zeile 123: | Zeile 116: | ||
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 141: | ||
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 150: | ||
At runtime you can use the // | At runtime you can use the // | ||
<code java> | <code java> | ||
- | \\ | ||
---- | ---- | ||
==== Canvas ==== | ==== Canvas ==== | ||
Zeile 175: | Zeile 165: | ||
<code java> | <code java> | ||
- | \\ | ||
---- | ---- | ||
==== Turtle ==== | ==== Turtle ==== | ||
Zeile 187: | Zeile 176: | ||
Example: | Example: | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== MenuBar ==== | ==== MenuBar ==== | ||
Zeile 193: | Zeile 181: | ||
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 193: | ||
{{: | {{: | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== MenuButton ==== | ==== MenuButton ==== | ||
Zeile 213: | Zeile 198: | ||
In the object inspector enter the menu commands under // | In the object inspector enter the menu commands under // | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== SplitMenuButton ==== | ==== SplitMenuButton ==== | ||
Zeile 220: | Zeile 203: | ||
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 214: | ||
double value = slider1.getValue(); | double value = slider1.getValue(); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== ProgressBar==== | ==== ProgressBar==== | ||
Zeile 246: | Zeile 223: | ||
progressBar1.setProgress(0.3); | progressBar1.setProgress(0.3); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
- | |||
==== ToolBar==== | ==== ToolBar==== | ||
{{: | {{: | ||
Zeile 259: | Zeile 233: | ||
toolBar1.getItems().addAll(bNew, | toolBar1.getItems().addAll(bNew, | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== Separator==== | ==== Separator==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== ToggleButton==== | ==== ToggleButton==== | ||
Zeile 272: | Zeile 243: | ||
if (toggleButton1.isSelected()) ... | if (toggleButton1.isSelected()) ... | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== PasswordField==== | ==== PasswordField==== | ||
{{: | {{: | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== ChoiceBox==== | ==== ChoiceBox==== | ||
{{: | {{: | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== Hyperlink==== | ==== Hyperlink==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
==== HTMLEditor==== | ==== HTMLEditor==== | ||
Zeile 297: | Zeile 261: | ||
String s = hTMLEditor1.getHtmlText(); | String s = hTMLEditor1.getHtmlText(); | ||
</ | </ | ||
- | \\ | ||
---- | ---- | ||
==== WebView==== | ==== WebView==== | ||
Zeile 303: | Zeile 266: | ||
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 275: | ||
Color c = colorPicker1.getValue(); | Color c = colorPicker1.getValue(); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== DatePicker==== | ==== DatePicker==== | ||
Zeile 325: | Zeile 284: | ||
LocalDate d = datePicker1.getValue(); | LocalDate d = datePicker1.getValue(); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== Pagination==== | ==== Pagination==== | ||
{{: | {{: | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== FileChooser==== | ==== FileChooser==== | ||
Zeile 349: | Zeile 304: | ||
File f = fileChooser1_openFile(); | File f = fileChooser1_openFile(); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== FileChooser==== | ==== FileChooser==== | ||
Zeile 368: | Zeile 321: | ||
File f = fileChooser1_saveFile(); | File f = fileChooser1_saveFile(); | ||
</ | </ | ||
- | |||
- | \\ | ||
==== DirectoryChooser==== | ==== DirectoryChooser==== | ||
{{: | {{: | ||
Zeile 386: | Zeile 337: | ||
File d = directoryChooser1_openDirectory(); | File d = directoryChooser1_openDirectory(); | ||
</ | </ | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== ImageView==== | ==== ImageView==== | ||
{{: | {{: | ||
- | |||
- | \\ | ||
---- | ---- | ||
==== MediaView==== | ==== MediaView==== | ||
{{: | {{: | ||
- | \\ | ||
---- | ---- | ||
- | |||
==== TableView==== | ==== TableView==== | ||
{{: | {{: | ||
Zeile 405: | Zeile 350: | ||
The attribute // | The attribute // | ||
- | \\ | ||
---- | ---- | ||
==== TreeTableView==== | ==== TreeTableView==== | ||
{{: | {{: | ||
+ | ---- | ||
+ | =====JavaFX Shapes===== | ||
+ | Graphics can be programmed with the shape components of JavaFX. | ||
+ | ==== Circle ==== | ||
+ | {{: | ||
- | \\ | + | If you place a Circle component on a canvas component, you can use the // |
+ | |||
+ | <code java> | ||
+ | public void canvas1_MouseMoved(MouseEvent evt) { | ||
+ | circle1.setCenterX(evt.getX()); | ||
+ | circle1.setCenterY(evt.getY()); | ||
+ | } | ||
+ | </ | ||
+ | ---- | ||
+ | ==== Rectangle ==== | ||
+ | {{: | ||
+ | ---- | ||
+ | ==== Ellipse ==== | ||
+ | {{: | ||
+ | ---- | ||
+ | ==== Polygon==== | ||
+ | {{: | ||
+ | ---- | ||
+ | ==== Arc ==== | ||
+ | {{: | ||
+ | ---- | ||
+ | ==== Line ==== | ||
+ | {{: | ||
+ | ---- | ||
+ | ==== Text ==== | ||
+ | {{: | ||
+ | ---- | ||
+ | ==== QuadCurve ==== | ||
+ | {{: | ||
+ | ---- | ||
+ | ==== CubicCurve ==== | ||
+ | {{: | ||
+ | ---- | ||
+ | ==== SVGPath==== | ||
+ | {{: | ||
---- | ---- |
en/javafx.txt · Zuletzt geändert: 2022/09/02 10:27 von 127.0.0.1