An open API service indexing awesome lists of open source software.

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.

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"
}
]
```