Search in sources :

Example 26 with Circuit

use of de.neemann.digital.draw.elements.Circuit in project Digital by hneemann.

the class TableDialog method createCircuit.

private void createCircuit(boolean useJKff, ExpressionModifier... modifier) {
    try {
        CircuitBuilder circuitBuilder = new CircuitBuilder(shapeFactory, useJKff, model.getTable().getVars()).setModelAnalyzerInfo(model.getTable().getModelAnalyzerInfo());
        new BuilderExpressionCreator(circuitBuilder, modifier).setUseJKOptimizer(useJKff).create(lastGeneratedExpressions);
        Circuit circuit = circuitBuilder.createCircuit();
        new Main.MainBuilder().setParent(TableDialog.this).setLibrary(library).setCircuit(circuit).setBaseFileName(filename).openLater();
    } catch (ExpressionException | FormatterException | RuntimeException e) {
        new ErrorMessage(Lang.get("msg_errorDuringCalculation")).addCause(e).show(this);
    }
}
Also used : FormatterException(de.neemann.digital.analyse.expression.format.FormatterException) Circuit(de.neemann.digital.draw.elements.Circuit) ErrorMessage(de.neemann.gui.ErrorMessage) Main(de.neemann.digital.gui.Main) ExpressionException(de.neemann.digital.analyse.expression.ExpressionException) CircuitBuilder(de.neemann.digital.builder.circuit.CircuitBuilder)

Aggregations

Circuit (de.neemann.digital.draw.elements.Circuit)26 ElementLibrary (de.neemann.digital.draw.library.ElementLibrary)9 ShapeFactory (de.neemann.digital.draw.shapes.ShapeFactory)8 Vector (de.neemann.digital.draw.graphics.Vector)7 ModelCreator (de.neemann.digital.draw.model.ModelCreator)7 Expression (de.neemann.digital.analyse.expression.Expression)6 VisualElement (de.neemann.digital.draw.elements.VisualElement)6 File (java.io.File)6 TestExecuter (de.neemann.digital.TestExecuter)5 Wire (de.neemann.digital.draw.elements.Wire)5 Variable (de.neemann.digital.analyse.expression.Variable)4 IOException (java.io.IOException)4 ElementAttributes (de.neemann.digital.core.element.ElementAttributes)3 Main (de.neemann.digital.gui.Main)3 CircuitBuilder (de.neemann.digital.builder.circuit.CircuitBuilder)2 Model (de.neemann.digital.core.Model)2 ExpressionListenerStore (de.neemann.digital.gui.components.table.ExpressionListenerStore)2 ToBreakRunner (de.neemann.digital.integration.ToBreakRunner)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 ModelAnalyser (de.neemann.digital.analyse.ModelAnalyser)1