if (act == ProjectEvent.ACTION_SET_TOOL) {
fireToolbarAppearanceChanged();
} else if (act == ProjectEvent.ACTION_SET_FILE) {
LogisimFile old = (LogisimFile) e.getOldData();
if (old != null) {
ToolbarData data = old.getOptions().getToolbarData();
data.removeToolbarListener(this);
data.removeToolAttributeListener(this);
}
LogisimFile file = (LogisimFile) e.getData();
if (file != null) {
ToolbarData data = file.getOptions().getToolbarData();
data.addToolbarListener(this);
data.addToolAttributeListener(this);
}
buildContents();
}
}