- SimpleLogicUIStandalone.executeVisualisation(model ->
- {
- int y = 0;
- for (String componentID : allComponents)
- try
- {
- ModelComponent createComponent = IndirectModelComponentCreator.createComponent(model, componentID);
- createComponent.moveTo(0, y);
- new ModelTextComponent(model, componentID).moveTo(createComponent.getWidth() + 10, y);
- y += createComponent.getHeight() + 10;
- }
- catch (RuntimeException e)
- {
- new ModelTextComponent(model, "Error creating " + componentID + ": " + e).moveTo(0, y);
- y += 20;
- }
- });
+ LogicModelModifiable model = new LogicModelModifiable();
+ int y = 0;
+ for (String componentID : allComponents)
+ try
+ {
+ ModelComponent createComponent = IndirectModelComponentCreator.createComponent(model, componentID);
+ createComponent.moveTo(0, y);
+ new ModelTextComponent(model, componentID).moveTo(createComponent.getWidth() + 10, y);
+ y += createComponent.getHeight() + 10;
+ }
+ catch (RuntimeException e)
+ {
+ new ModelTextComponent(model, "Error creating " + componentID + ": " + e).moveTo(0, y);
+ y += 20;
+ }
+
+ // give the wires color
+ LogicCoreAdapter.convert(model, CoreModelParameters.builder().build());
+
+ new LogicUIStandaloneGUI(model, new DefaultRenderPreferences()).run();