enabled some experimental features

This commit is contained in:
hneemann 2016-07-16 13:32:35 +02:00
parent a56071049e
commit cc96b45c49
3 changed files with 48 additions and 51 deletions

View File

@ -294,14 +294,12 @@ public class TableDialog extends JDialog {
createCircuit(ExpressionModifier.IDENTITY);
}
}.setToolTip(Lang.get("menu_table_createCircuit_tt")).createJMenuItem());
if (Main.enableExperimental()) {
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_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
@ -341,44 +339,43 @@ public class TableDialog extends JDialog {
}
if (Main.enableExperimental()) {
JMenu hardware = new JMenu(Lang.get("menu_table_create_hardware"));
JMenu gal16v8 = new JMenu("GAL16v8");
gal16v8.add(new ToolTipAction(Lang.get("menu_table_createCUPL")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCUPL(new Gal16v8CuplExporter());
}
}.setToolTip(Lang.get("menu_table_createCUPL_tt")).createJMenuItem());
gal16v8.add(new ToolTipAction(Lang.get("menu_table_create_jedec")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
Gal16v8JEDECExporter jedecExporter = new Gal16v8JEDECExporter();
createHardware(jedecExporter, filename);
new ShowStringDialog(parent, Lang.get("win_pinMapDialog"), jedecExporter.getPinMapping().toString()).setVisible(true);
}
}.setToolTip(Lang.get("menu_table_create_jedec_tt")).createJMenuItem());
hardware.add(gal16v8);
JMenu hardware = new JMenu(Lang.get("menu_table_create_hardware"));
JMenu gal16v8 = new JMenu("GAL16v8");
gal16v8.add(new ToolTipAction(Lang.get("menu_table_createCUPL")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCUPL(new Gal16v8CuplExporter());
}
}.setToolTip(Lang.get("menu_table_createCUPL_tt")).createJMenuItem());
gal16v8.add(new ToolTipAction(Lang.get("menu_table_create_jedec")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
Gal16v8JEDECExporter jedecExporter = new Gal16v8JEDECExporter();
createHardware(jedecExporter, filename);
new ShowStringDialog(parent, Lang.get("win_pinMapDialog"), jedecExporter.getPinMapping().toString()).setVisible(true);
}
}.setToolTip(Lang.get("menu_table_create_jedec_tt")).createJMenuItem());
hardware.add(gal16v8);
JMenu gal22v10 = new JMenu("GAL22v10");
gal22v10.add(new ToolTipAction(Lang.get("menu_table_createCUPL")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCUPL(new Gal22v10CuplExporter());
}
}.setToolTip(Lang.get("menu_table_createCUPL_tt")).createJMenuItem());
gal22v10.add(new ToolTipAction(Lang.get("menu_table_create_jedec")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
Gal22v10JEDECExporter jedecExporter = new Gal22v10JEDECExporter();
createHardware(jedecExporter, filename);
new ShowStringDialog(parent, Lang.get("win_pinMapDialog"), jedecExporter.getPinMapping().toString()).setVisible(true);
}
}.setToolTip(Lang.get("menu_table_create_jedec_tt")).createJMenuItem());
hardware.add(gal22v10);
JMenu gal22v10 = new JMenu("GAL22v10");
gal22v10.add(new ToolTipAction(Lang.get("menu_table_createCUPL")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
createCUPL(new Gal22v10CuplExporter());
}
}.setToolTip(Lang.get("menu_table_createCUPL_tt")).createJMenuItem());
gal22v10.add(new ToolTipAction(Lang.get("menu_table_create_jedec")) {
@Override
public void actionPerformed(ActionEvent actionEvent) {
Gal22v10JEDECExporter jedecExporter = new Gal22v10JEDECExporter();
createHardware(jedecExporter, filename);
new ShowStringDialog(parent, Lang.get("win_pinMapDialog"), jedecExporter.getPinMapping().toString()).setVisible(true);
}
}.setToolTip(Lang.get("menu_table_create_jedec_tt")).createJMenuItem());
hardware.add(gal22v10);
createMenu.add(hardware);
createMenu.add(hardware);
}
return createMenu;
}
@ -507,7 +504,7 @@ public class TableDialog extends JDialog {
};
if (createJK.isSelected())
expressionListener=new ExpressionListenerJK(expressionListener);
expressionListener = new ExpressionListenerJK(expressionListener);
new ExpressionCreator(model.getTable()).create(expressionListener);
@ -529,7 +526,7 @@ public class TableDialog extends JDialog {
.append("\\\\\n");
if (createJK.isSelected())
expressionListener=new ExpressionListenerJK(expressionListener);
expressionListener = new ExpressionListenerJK(expressionListener);
sb.append("\\begin{eqnarray*}\n");
new ExpressionCreator(model.getTable()).create(expressionListener);

View File

@ -309,7 +309,7 @@ Zur Analyse können Sie die Schaltung im Gatterschrittmodus ausführen.</string>
<string name="menu_table_createCUPL_tt">Erzeugt eine CUPL Quelldatei welche die Schaltung beschreibt.</string>
<string name="menu_table_createCircuit">Schaltung</string>
<string name="menu_table_createCircuit_tt">Erzeugt eine Schaltung, welche der Wahrheitstabelle entspricht.</string>
<string name="menu_table_createCircuitJK">Schaltung JK</string>
<string name="menu_table_createCircuitJK">Schaltung mit JK Flipflops</string>
<string name="menu_table_createCircuitJK_tt">Erzeugt eine Schaltung, welche der Wahrheitstabelle entspricht, Verwendet JK-Flipflops.</string>
<string name="menu_table_createNAnd">Schaltung mit NAnd-Gattern</string>
<string name="menu_table_createNAndTwo">Schaltung mit NAnd-Gattern mit zwei Eingängen</string>

View File

@ -116,7 +116,7 @@ The terminal opens its own window.</string>
<string name="elem_Keyboard_pin_sel">If high the output D is active and one keystroke is outputed.</string>
<string name="elem_Keyboard_pin_D">The last pressed key, or null if no key is typed.</string>
<string name="error">Error</string>
<string name="err_DFlipflopWithoutALabel">D-Flipflop has no label set</string>
<string name="err_DFlipflopWithoutALabel">D-flip-flop has no label set</string>
<string name="err_N_isNotInputOrOutput">Pin {0} in element {1} is not a input or output</string>
<string name="err_aSingleClockNecessary">A single clock is necessary.</string>
<string name="err_analyseNoInputs">The circuit has no Inputs</string>
@ -132,7 +132,7 @@ The terminal opens its own window.</string>
<string name="err_duplicatePinLabel">Pin {0} in element {1} exists twice</string>
<string name="err_element_N_notFound">Element {0} not found</string>
<string name="err_exact_N0_valuesNecessaryNot_N1">Exact {0} variables necessary, not {1}</string>
<string name="err_ffNeedsToBeConnectedToClock">Flipflop needs to be connected to the clock.</string>
<string name="err_ffNeedsToBeConnectedToClock">Flip-flop needs to be connected to the clock.</string>
<string name="err_invalidFileFormat">Invalid file format</string>
<string name="err_isAlreadyInitialized">Logic is already initialized</string>
<string name="err_labelNotConnectedToNet_N">A tunnel {0} is not connected!</string>
@ -309,8 +309,8 @@ To analyse you can run the circuit in single gate step mode.</string>
<string name="menu_table_createCUPL_tt">Creates a CUPL source file containing the define circuit.</string>
<string name="menu_table_createCircuit">Circuit</string>
<string name="menu_table_createCircuit_tt">Creates a circuit which reproduces the truth table.</string>
<string name="menu_table_createCircuitJK">Circuit JK</string>
<string name="menu_table_createCircuitJK_tt">Creates a circuit which reproduces the truth table. Uses JK flipflops.</string>
<string name="menu_table_createCircuitJK">Circuit with JK flip-flops</string>
<string name="menu_table_createCircuitJK_tt">Creates a circuit which reproduces the truth table. Uses JK flip-flops.</string>
<string name="menu_table_createNAnd">Circuit with NAnd gates</string>
<string name="menu_table_createNAndTwo">Circuit with NAnd gates with two inputs</string>
<string name="menu_table_createNAndTwo_tt">Use only NAnd gates with two inputs.</string>