}
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);