use of de.neemann.digital.builder.Gal16v8.Gal16v8JEDECExporter in project Digital by hneemann.
the class TableDialog method createCreateMenu.
private JMenu createCreateMenu() {
JMenu createMenu = new JMenu(Lang.get("menu_table_create"));
createMenu.add(new ToolTipAction(Lang.get("menu_table_createCircuit")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCircuit(ExpressionModifier.IDENTITY);
}
}.setToolTip(Lang.get("menu_table_createCircuit_tt")).setAccelerator("F2").enableAcceleratorIn(table).createJMenuItem());
createMenu.add(new ToolTipAction(Lang.get("menu_table_createCircuitJK")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCircuit(true, ExpressionModifier.IDENTITY);
}
}.setToolTip(Lang.get("menu_table_createCircuitJK_tt")).createJMenuItem());
createMenu.add(new ToolTipAction(Lang.get("menu_table_createTwo")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCircuit(new TwoInputs());
}
}.setToolTip(Lang.get("menu_table_createTwo_tt")).createJMenuItem());
createMenu.add(new ToolTipAction(Lang.get("menu_table_createNAnd")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCircuit(new NAnd());
}
}.setToolTip(Lang.get("menu_table_createNAnd_tt")).createJMenuItem());
if (Main.isExperimentalMode()) {
createMenu.add(new ToolTipAction(Lang.get("menu_table_createNAndTwo")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCircuit(new TwoInputs(), new NAnd());
}
}.setToolTip(Lang.get("menu_table_createNAndTwo_tt")).createJMenuItem());
createMenu.add(new ToolTipAction(Lang.get("menu_table_createNOr")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCircuit(new NOr());
}
}.setToolTip(Lang.get("menu_table_createNOr_tt")).createJMenuItem());
createMenu.add(new ToolTipAction(Lang.get("menu_table_createNOrTwo")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCircuit(new TwoInputs(), new NOr());
}
}.setToolTip(Lang.get("menu_table_createNOrTwo_tt")).createJMenuItem());
}
JMenu hardware = new JMenu(Lang.get("menu_table_create_hardware"));
register(hardware, new GenerateCUPL(CuplExporter::new, "GAL16v8/CUPL"));
register(hardware, new GenerateFile("jed", () -> new ExpressionToFileExporter(new Gal16v8JEDECExporter()), "GAL16v8/JEDEC", Lang.get("menu_table_create_jedec_tt")));
register(hardware, new GenerateCUPL(Gal22v10CuplExporter::new, "GAL22v10/CUPL"));
register(hardware, new GenerateFile("jed", () -> new ExpressionToFileExporter(new Gal22v10JEDECExporter()), "GAL22v10/JEDEC", Lang.get("menu_table_create_jedec_tt")));
for (ATFDevice atfDev : ATFDevice.values()) {
register(hardware, new GenerateCUPL(atfDev::getCuplExporter, "ATF150x/" + atfDev.getMenuName() + "/CUPL"));
register(hardware, new GenerateFile("tt2", () -> atfDev.createExpressionToFileExporter(TableDialog.this, getProjectName()), "ATF150x/" + atfDev.getMenuName() + "/TT2, JEDEC", Lang.get("menu_table_createTT2_tt")));
}
createMenu.add(hardware);
return createMenu;
}
Aggregations