Search in sources :

Example 61 with Circuit

use of com.cburch.logisim.circuit.Circuit in project logisim-evolution by reds-heig.

the class FPGACommanderGui method performDRC.

private boolean performDRC() {
    clearAllMessages();
    String CircuitName = circuitsList.getSelectedItem().toString();
    Circuit root = MyProject.getLogisimFile().getCircuit(CircuitName);
    ArrayList<String> SheetNames = new ArrayList<String>();
    int DRCResult = Netlist.DRC_PASSED;
    if (root == null) {
        DRCResult |= Netlist.DRC_ERROR;
    } else {
        root.getNetList().clear();
        DRCResult = root.getNetList().DesignRuleCheckResult(MyReporter, HDLType.getText(), true, SheetNames);
    }
    return (DRCResult == Netlist.DRC_PASSED);
}
Also used : ArrayList(java.util.ArrayList) Circuit(com.cburch.logisim.circuit.Circuit)

Example 62 with Circuit

use of com.cburch.logisim.circuit.Circuit in project logisim-evolution by reds-heig.

the class FPGACommanderGui method Annotate.

private void Annotate(boolean ClearExistingLabels) {
    clearAllMessages();
    String CircuitName = circuitsList.getSelectedItem().toString();
    Circuit root = MyProject.getLogisimFile().getCircuit(CircuitName);
    if (root != null) {
        if (ClearExistingLabels) {
            root.ClearAnnotationLevel();
        }
        root.Annotate(ClearExistingLabels, MyReporter);
        MyReporter.AddInfo("Annotation done");
        /* TODO: Dirty hack, see Circuit.java function Annotate for details */
        MyProject.repaintCanvas();
        MyProject.getLogisimFile().setDirty(true);
    }
}
Also used : Circuit(com.cburch.logisim.circuit.Circuit)

Aggregations

Circuit (com.cburch.logisim.circuit.Circuit)62 Component (com.cburch.logisim.comp.Component)19 SubcircuitFactory (com.cburch.logisim.circuit.SubcircuitFactory)12 Project (com.cburch.logisim.proj.Project)11 ArrayList (java.util.ArrayList)9 Wire (com.cburch.logisim.circuit.Wire)8 ComponentFactory (com.cburch.logisim.comp.ComponentFactory)8 Location (com.cburch.logisim.data.Location)8 Bounds (com.cburch.logisim.data.Bounds)6 LogisimFile (com.cburch.logisim.file.LogisimFile)6 AddTool (com.cburch.logisim.tools.AddTool)6 Tool (com.cburch.logisim.tools.Tool)6 CircuitState (com.cburch.logisim.circuit.CircuitState)5 AttributeSet (com.cburch.logisim.data.AttributeSet)5 Selection (com.cburch.logisim.gui.main.Selection)5 Action (com.cburch.logisim.proj.Action)4 CircuitMutation (com.cburch.logisim.circuit.CircuitMutation)3 ComponentDrawContext (com.cburch.logisim.comp.ComponentDrawContext)3 Graphics (java.awt.Graphics)3 CanvasObject (com.cburch.draw.model.CanvasObject)2