use of model.Category in project uPMT by coco35700.
the class Main method createBasicSchema.
/**
* Creates a basic scheme as a default
* should be improved if desired
*/
private void createBasicSchema() {
Type s = new Schema((_langBundle.getString("default_scheme")));
Type general = new Folder(_langBundle.getString("general"));
Type autre = new Folder(_langBundle.getString("other"));
Type visuel = new Category(_langBundle.getString("visual"));
Type image = new Property(_langBundle.getString("picture"));
Type sensoriel = new Category(_langBundle.getString("sensory"));
Type emotionnel = new Category(_langBundle.getString("emotional"));
Type sonore = new Category(_langBundle.getString("acoustic"));
visuel.addType(image);
general.addType(visuel);
general.addType(sensoriel);
general.addType(emotionnel);
general.addType(sonore);
s.addType(general);
s.addType(autre);
this.BasicSchema = (Schema) s;
}
use of model.Category in project uPMT by coco35700.
the class TypeTreeView method addClass.
// method used to add a class to the current cell
public void addClass(int classNumber) {
TreeItem<TypeController> newTypeController = new TreeItem<TypeController>();
Type nt = new Category("Classe " + classNumber);
TypeController tc;
if (getItem().getType().getClass().equals(Schema.class)) {
tc = new TypeController(nt, getTreeItem().getValue().getType());
} else {
tc = new TypeController(nt, getTreeItem().getParent().getValue().getType());
}
newTypeController.setValue(tc);
getTreeItem().getChildren().add(newTypeController);
getItem().getType().getTypes().add(nt);
this.getTreeItem().setExpanded(true);
}
use of model.Category in project uPMT by coco35700.
the class MainViewController method duplicate.
private Category duplicate(Category c) {
Category newc = new Category(c.getName());
newc.setColor(c.getColor());
for (Type t : c.getTypes()) {
newc.addType(t);
}
return newc;
}
Aggregations