Package com.cburch.logisim.proj

Examples of com.cburch.logisim.proj.Project


                computeTitle();
            }
        }

        private void enableSave() {
            Project proj = getProject();
            boolean ok = proj.isFileDirty();
            getRootPane().putClientProperty("windowModified", Boolean.valueOf(ok));
        }
View Full Code Here


        proj.addLibraryListener(this);
    }

    @Override
    public void computeEnabled() {
        Project proj = frame.getProject();
        Selection sel = proj == null ? null : proj.getSelection();
        boolean selEmpty = (sel == null ? true : sel.isEmpty());
        boolean canChange = proj != null && proj.getLogisimFile().contains(proj.getCurrentCircuit());

        boolean selectAvailable = false;
        for (Library lib : proj.getLogisimFile().getLibraries()) {
            if (lib instanceof Base) {
                selectAvailable = true;
            }

        }
View Full Code Here

        setEnabled(LogisimMenuBar.REMOVE_CONTROL, false);
    }

    @Override
    public void cut() {
        Project proj = frame.getProject();
        Selection sel = frame.getCanvas().getSelection();
        proj.doAction(SelectionActions.cut(sel));
    }
View Full Code Here

        proj.doAction(SelectionActions.cut(sel));
    }

    @Override
    public void copy() {
        Project proj = frame.getProject();
        Selection sel = frame.getCanvas().getSelection();
        proj.doAction(SelectionActions.copy(sel));
    }
View Full Code Here

        proj.doAction(SelectionActions.copy(sel));
    }

    @Override
    public void paste() {
        Project proj = frame.getProject();
        Selection sel = frame.getCanvas().getSelection();
        selectSelectTool(proj);
        Action action = SelectionActions.pasteMaybe(proj, sel);
        if (action != null) {
            proj.doAction(action);
        }
    }
View Full Code Here

        }
    }

    @Override
    public void delete() {
        Project proj = frame.getProject();
        Selection sel = frame.getCanvas().getSelection();
        proj.doAction(SelectionActions.clear(sel));
    }
View Full Code Here

        proj.doAction(SelectionActions.clear(sel));
    }

    @Override
    public void duplicate() {
        Project proj = frame.getProject();
        Selection sel = frame.getCanvas().getSelection();
        proj.doAction(SelectionActions.duplicate(sel));
    }
View Full Code Here

        proj.doAction(SelectionActions.duplicate(sel));
    }

    @Override
    public void selectAll() {
        Project proj = frame.getProject();
        Selection sel = frame.getCanvas().getSelection();
        selectSelectTool(proj);
        Circuit circ = proj.getCurrentCircuit();
        sel.addAll(circ.getWires());
        sel.addAll(circ.getNonWires());
        proj.repaintCanvas();
    }
View Full Code Here

        }

        @Override
        public void actionPerformed(ActionEvent event) {
            Object src = event.getSource();
            Project proj = frame.getProject();
            if (src == LogisimMenuBar.EXPORT_IMAGE) {
                ExportImage.doExport(proj);
            } else if (src == LogisimMenuBar.PRINT) {
                Print.doPrint(proj);
            }
View Full Code Here

    }

    class ProjectMenuListener implements ProjectListener, LibraryListener,
                ActionListener, PropertyChangeListener, CanvasModelListener {
        void register() {
            Project proj = frame.getProject();
            if (proj == null) {
                return;
            }

            proj.addProjectListener(this);
            proj.addLibraryListener(this);
            frame.addPropertyChangeListener(Frame.EDITOR_VIEW, this);
            frame.addPropertyChangeListener(Frame.EXPLORER_VIEW, this);
            Circuit circ = proj.getCurrentCircuit();
            if (circ != null) {
                circ.getAppearance().addCanvasModelListener(this);
            }

            menubar.addActionListener(LogisimMenuBar.ADD_CIRCUIT, this);
View Full Code Here

TOP

Related Classes of com.cburch.logisim.proj.Project

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.