Home

Awesome

JFXNodeMapper

Build Status

JFXNodeMapper is a simple library that focuses on mapping data from common data represntation formats to JavaFx Nodes. Our main focus is to build a library that,

Features

Upcoming Features

How to use JFXNodeMapper in your project

Examples

Scene scene = parent.getScene();
Node root = scene.getRoot();
DataMapper mapper = new DataMapper();
mapper.setRoot(root);
String json = getJsonFromServer();
mapper.setDataFromJSON(json); // json keys and node ids should match
Scene scene = parent.getScene();
Node root = scene.getRoot();
DataMapper mapper = new DataMapper();
mapper.setRoot(root);
Resulset resultset = getAllStudentDetails();
mapper.setDataFromResultSet(resultSet); //column name and node ids should match
Scene scene = parent.getScene();
Node root = scene.getRoot();
DataMapper mapper = new DataMapper();
mapper.setRoot(root);
String json = getJsonFromServer();
// this listner will be called whenever the specified id is encountered.
// this will override all other mappings for the specified id
mapper.mapToCustomDataType("subject-combo", (data, id, node) -> {
  ComboBox<String> subs = (ComboBox<String>) node;
  String subject = (String)data;
  subs.getItems.add(subject);
});
mapper.setDataFromJSON(json); // JSON keys and node ids should match