use of controller.controller.TypeController in project uPMT by coco35700.
the class SchemaTransformations method addTypeTreeView.
private static void addTypeTreeView(TreeItem<TypeController> tree, Type t) {
if (!t.getTypes().isEmpty()) {
TypeController tc = new TypeController(t, tree.getValue().getType());
TreeItem<TypeController> node = new TreeItem<TypeController>(tc);
node.setExpanded(true);
tree.getChildren().add(node);
for (Type s : t.getTypes()) {
addTypeTreeView(node, s);
}
} else {
TypeController tc = new TypeController(t, tree.getValue().getType());
TreeItem<TypeController> node = new TreeItem<TypeController>(tc);
tree.getChildren().add(node);
}
}
use of controller.controller.TypeController in project uPMT by coco35700.
the class SchemaTransformations method SchemaToTreeView.
public static TreeItem<TypeController> SchemaToTreeView(Schema s) {
TreeItem<TypeController> schema;
TypeController ss = new TypeController(s, null);
schema = new TreeItem<TypeController>(ss);
schema.setExpanded(true);
for (Type c : s.getTypes()) {
addTypeTreeView(schema, c);
}
return schema;
}
use of controller.controller.TypeController in project uPMT by coco35700.
the class AddPropertyToClassCommand method execute.
@Override
public void execute() {
// adding the new property to the scheme
TreeItem<TypeController> newType = new TreeItem<TypeController>();
TypeController tc = new TypeController(newp, controller.getType());
newType.setValue(tc);
tree.getChildren().add(newType);
tree.setExpanded(true);
controller.getAddPropertySchemeController().update(newp);
MainViewTransformations.updateGrid(main);
main.needToSave();
}
Aggregations