mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-17 00:44:40 -04:00
fixed wrong output ordering in screenshot
This commit is contained in:
parent
07f60f0ca9
commit
34ee212bf4
BIN
screenshot3.png
BIN
screenshot3.png
Binary file not shown.
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 89 KiB |
@ -515,7 +515,19 @@ public class TableDialog extends JDialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setModel(TruthTableTableModel model) {
|
/**
|
||||||
|
* @return the used table model
|
||||||
|
*/
|
||||||
|
public TruthTableTableModel getModel() {
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the table model
|
||||||
|
*
|
||||||
|
* @param model the model to use
|
||||||
|
*/
|
||||||
|
public void setModel(TruthTableTableModel model) {
|
||||||
this.model = model;
|
this.model = model;
|
||||||
model.addTableModelListener(new CalculationTableModelListener());
|
model.addTableModelListener(new CalculationTableModelListener());
|
||||||
table.setModel(model);
|
table.setModel(model);
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
*/
|
*/
|
||||||
package de.neemann.digital.docu;
|
package de.neemann.digital.docu;
|
||||||
|
|
||||||
|
import de.neemann.digital.analyse.TruthTable;
|
||||||
|
import de.neemann.digital.analyse.TruthTableTableModel;
|
||||||
import de.neemann.digital.core.element.Keys;
|
import de.neemann.digital.core.element.Keys;
|
||||||
import de.neemann.digital.fsm.gui.FSMFrame;
|
import de.neemann.digital.fsm.gui.FSMFrame;
|
||||||
import de.neemann.digital.gui.Main;
|
import de.neemann.digital.gui.Main;
|
||||||
@ -14,6 +16,7 @@ import de.neemann.digital.gui.components.expression.ExpressionDialog;
|
|||||||
import de.neemann.digital.gui.components.graphics.GraphicDialog;
|
import de.neemann.digital.gui.components.graphics.GraphicDialog;
|
||||||
import de.neemann.digital.gui.components.karnaugh.KarnaughMapDialog;
|
import de.neemann.digital.gui.components.karnaugh.KarnaughMapDialog;
|
||||||
import de.neemann.digital.gui.components.table.AllSolutionsDialog;
|
import de.neemann.digital.gui.components.table.AllSolutionsDialog;
|
||||||
|
import de.neemann.digital.gui.components.table.ReorderOutputs;
|
||||||
import de.neemann.digital.gui.components.table.TableDialog;
|
import de.neemann.digital.gui.components.table.TableDialog;
|
||||||
import de.neemann.digital.gui.components.testing.TestCaseDescriptionDialog;
|
import de.neemann.digital.gui.components.testing.TestCaseDescriptionDialog;
|
||||||
import de.neemann.digital.gui.components.testing.ValueTableDialog;
|
import de.neemann.digital.gui.components.testing.ValueTableDialog;
|
||||||
@ -147,14 +150,18 @@ public class ScreenShots {
|
|||||||
.press("DOWN", 1)
|
.press("DOWN", 1)
|
||||||
.press("ENTER")
|
.press("ENTER")
|
||||||
.delay(500)
|
.delay(500)
|
||||||
.add(new GuiTester.WindowCheck<>(Window.class, (guiTester, window) -> {
|
.add(closeAllSolutionsDialog())
|
||||||
if (window instanceof AllSolutionsDialog)
|
.delay(500)
|
||||||
window.dispose();
|
.add(new GuiTester.WindowCheck<>(TableDialog.class, (guiTester, tableDialog) -> {
|
||||||
else
|
TruthTable tt = tableDialog.getModel().getTable();
|
||||||
if (window instanceof TableDialog)
|
ReorderOutputs ro = new ReorderOutputs(tt);
|
||||||
((TableDialog)window).getAllSolutionsDialog().dispose();
|
ro.getItems().swap(3,4);
|
||||||
|
ro.getItems().swap(4,5);
|
||||||
|
tableDialog.setModel(new TruthTableTableModel(ro.reorder()));
|
||||||
}))
|
}))
|
||||||
.add(new GuiTester.WindowCheck<>(TableDialog.class))
|
.delay(500)
|
||||||
|
.add(closeAllSolutionsDialog())
|
||||||
|
.delay(500)
|
||||||
.press("F10")
|
.press("F10")
|
||||||
.press("RIGHT", 4)
|
.press("RIGHT", 4)
|
||||||
.press("DOWN", 2)
|
.press("DOWN", 2)
|
||||||
@ -162,7 +169,7 @@ public class ScreenShots {
|
|||||||
.delay(500)
|
.delay(500)
|
||||||
.add(new GuiTester.WindowCheck<>(Main.class,
|
.add(new GuiTester.WindowCheck<>(Main.class,
|
||||||
(gt, main) -> {
|
(gt, main) -> {
|
||||||
main.getCircuitComponent().translateCircuit(-300, 0);
|
main.getCircuitComponent().translateCircuit(-40, 0);
|
||||||
mainStatic = main;
|
mainStatic = main;
|
||||||
}))
|
}))
|
||||||
.delay(500)
|
.delay(500)
|
||||||
@ -189,6 +196,16 @@ public class ScreenShots {
|
|||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static GuiTester.WindowCheck<Window> closeAllSolutionsDialog() {
|
||||||
|
return new GuiTester.WindowCheck<>(Window.class, (guiTester, window) -> {
|
||||||
|
if (window instanceof AllSolutionsDialog)
|
||||||
|
window.dispose();
|
||||||
|
else
|
||||||
|
if (window instanceof TableDialog)
|
||||||
|
((TableDialog)window).getAllSolutionsDialog().dispose();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Set all settings as needed before start this method
|
// Set all settings as needed before start this method
|
||||||
private static void firstSteps() {
|
private static void firstSteps() {
|
||||||
ScreenShot.n = 0;
|
ScreenShot.n = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user