https://github.com/jphp-group/jtgc
This utility helps to create a JavaFX GUI layout from json or array.
https://github.com/jphp-group/jtgc
gui javafx jphp json ui
Last synced: about 1 month ago
JSON representation
This utility helps to create a JavaFX GUI layout from json or array.
- Host: GitHub
- URL: https://github.com/jphp-group/jtgc
- Owner: jphp-group
- Created: 2018-05-11T15:49:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-11T20:18:32.000Z (about 7 years ago)
- Last Synced: 2025-02-15T15:19:55.423Z (3 months ago)
- Topics: gui, javafx, jphp, json, ui
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JTGC
This utility helps to create a JavaFX GUI layout from json.## Example
php class :
```php
use gui;
use jtgc\parser\JTGC;
use std;class Form extends UXForm
{
public function show()
{
$this->layout = new JTGC(fs::parse("layout.json"))->get([ 300, 300 ]); // [ 300, 300 ] is a size of panel
parent::show(); // show form$this->mySuperButton->on("click", fn() => {
UXDialog::show("mySuperButton is clicked!"); // show dialog
});
}
}
```
layout.json :
```json
[
{
"_": "button",
"text": "test JTGC",
"size": [50, 70],
"id": "mySuperButton"
}
]
```