Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tnlx/jfxoo
Generate JavaFX Form at compile time
https://github.com/tnlx/jfxoo
annotation-processor code-generation javafx libary
Last synced: 29 days ago
JSON representation
Generate JavaFX Form at compile time
- Host: GitHub
- URL: https://github.com/tnlx/jfxoo
- Owner: tnlx
- License: mit
- Created: 2024-04-22T05:44:24.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-04T05:44:22.000Z (8 months ago)
- Last Synced: 2024-05-05T06:32:56.676Z (8 months ago)
- Topics: annotation-processor, code-generation, javafx, libary
- Language: Java
- Homepage: https://tnlx.github.io/jfxoo/
- Size: 91.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jfxoo
[Annotation processor](https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html) library
to generate [JavaFX](https://openjfx.io/) Form during compile time.## Usage
```gradle
// build.gradledependencies {
implementation 'io.github.tnlx:jfxoo:0.1.0'
annotationProcessor 'io.github.tnlx:jfxoo:0.1.0'
}
```### Form
Annotate object with `@JFXooForm`
```java
@JFXooForm
public class Contact {
private String name;
private String phone;
private String email;
}
``````java
// Init the main JFXoo interface
JFXoo jfxoo = JFXoo.init();JFXooForm contactForm = jfxoo.get("Contact", Contact.class);
// Obtain the JavaFX Node to add to the Scene
Node form = contactForm.node();// Buttons to be displayed at the bottom of the form
contactForm.button("Save", contact -> {});
contactForm.button("Cancel", contact -> {});
```### Table
Annotate object with `@JFXooTable`
```java
JFXooTable contactTable = jfxoo.table("Contact", Contact.class);// Obtain the JavaFX Node(s) to add to the Scene
Node node = contactTable.node(); // table and basic control buttons (as VBox)
Node table = contactTable.table(); // only the TableView
```