From 2d60e82fbf071299768f1dd19a430bdccf47f09f Mon Sep 17 00:00:00 2001 From: hneemann Date: Fri, 10 Jan 2020 08:57:14 +0100 Subject: [PATCH] adds a help text to the measurement graph dialog, closes #409 --- .../gui/components/data/GraphDialog.java | 14 +++++++++++ .../components/table/ShowStringDialog.java | 18 +++++++------ src/main/resources/lang/lang_de.xml | 25 ++++++++++++++++++- src/main/resources/lang/lang_en.xml | 23 ++++++++++++++++- 4 files changed, 70 insertions(+), 10 deletions(-) diff --git a/src/main/java/de/neemann/digital/gui/components/data/GraphDialog.java b/src/main/java/de/neemann/digital/gui/components/data/GraphDialog.java index 953f72861..ae471215b 100644 --- a/src/main/java/de/neemann/digital/gui/components/data/GraphDialog.java +++ b/src/main/java/de/neemann/digital/gui/components/data/GraphDialog.java @@ -12,6 +12,7 @@ import de.neemann.digital.draw.graphics.*; import de.neemann.digital.gui.SaveAsHelper; import de.neemann.digital.gui.Settings; import de.neemann.digital.gui.components.OrderMerger; +import de.neemann.digital.gui.components.table.ShowStringDialog; import de.neemann.digital.gui.components.testing.ValueTableDialog; import de.neemann.digital.lang.Lang; import de.neemann.gui.IconCreator; @@ -189,6 +190,19 @@ public class GraphDialog extends JDialog implements Observer { view.addSeparator(); view.add(showTable.createJMenuItem()); + JMenu help = new JMenu(Lang.get("menu_help")); + bar.add(help); + help.add(new ToolTipAction(Lang.get("btn_help")) { + @Override + public void actionPerformed(ActionEvent e) { + new ShowStringDialog( + GraphDialog.this, + Lang.get("msg_graphHelpTitle"), + Lang.get("msg_graphHelp"), true) + .setVisible(true); + } + }.createJMenuItem()); + setJMenuBar(bar); pack(); setLocationRelativeTo(owner); diff --git a/src/main/java/de/neemann/digital/gui/components/table/ShowStringDialog.java b/src/main/java/de/neemann/digital/gui/components/table/ShowStringDialog.java index f59cd78b9..620015a0f 100644 --- a/src/main/java/de/neemann/digital/gui/components/table/ShowStringDialog.java +++ b/src/main/java/de/neemann/digital/gui/components/table/ShowStringDialog.java @@ -75,14 +75,16 @@ public class ShowStringDialog extends JDialog { getContentPane().add(new JScrollPane(textComp)); JPanel buttons = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - buttons.add(new ToolTipAction(Lang.get("btn_copyToClipboard")) { - @Override - public void actionPerformed(ActionEvent actionEvent) { - StringSelection stringSelection = new StringSelection(str); - Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); - clipboard.setContents(stringSelection, null); - } - }.setToolTip(Lang.get("btn_copyToClipboard_tt")).createJButton()); + if (!html) { + buttons.add(new ToolTipAction(Lang.get("btn_copyToClipboard")) { + @Override + public void actionPerformed(ActionEvent actionEvent) { + StringSelection stringSelection = new StringSelection(str); + Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); + clipboard.setContents(stringSelection, null); + } + }.setToolTip(Lang.get("btn_copyToClipboard_tt")).createJButton()); + } buttons.add(new ToolTipAction(Lang.get("ok")) { @Override public void actionPerformed(ActionEvent actionEvent) { diff --git a/src/main/resources/lang/lang_de.xml b/src/main/resources/lang/lang_de.xml index 70c9a5292..fe868de5f 100644 --- a/src/main/resources/lang/lang_de.xml +++ b/src/main/resources/lang/lang_de.xml @@ -2080,12 +2080,35 @@ Daher steht auch das Signal 'D_out' zur Verfügung, um in diesem Fall den Wert z andere Übergangsbedingung erfüllt ist. ]]> + Der Messwertegraph + +

Was ist im Graphen zu sehen?

+ Im Gegensatz zu einem realen Logikanalysator zeigt die X-Achse des Messwertegraphen nicht die Zeit an. + Angezeigt wird ein Zähler welcher die Zustandsänderungen in der Schaltung zählt. Immer wenn eine Änderung + in der Schaltung stattfindet, wird der Zähler erhöht und der neue Zustand wird angezeigt.
+ Man kann es sich auch wie einen klassischen Logikanalysator vorstellen, welcher zur Optimierung keine Daten + abspeichert, wenn sich nichts in der Schaltung verändert hat.
+ Das bedeutet jedoch auch, dass aus dem Graphen nicht abgelesen werden kann, ob zwischen zwei Änderungen in der + Schaltung viel oder wenig Zeit vergangen ist.
+ Dieses Verhalten entsteht durch die Art der Simulation: Die Simulation der Schaltung kennt keine Zeit. + Es wird eine Veränderung an der Schaltung durchgeführt, und die Änderung des Schaltungszustandes wird berechnet, + bis sich die Schaltung wieder stabiliert hat. Dann erfolgt die nächste Änderung, deren Auswirkung ebenfalls + berechnet wird usw.. Diese Änderungen werden gezählt und der Zählerstand wird an der X-Achse des Graphen + angezeigt.
+ Das bedeutet unter anderem, dass man eine Schaltung nicht übertakten kann, da die Auswirkungen der fallenden + Flanke des Taktes erst berechnet werden, wenn sich die Schaltung nach der vorherigen steigenden Flanke wieder + stabilisiert hat. + + ]]>
+ Tutorial Im Folgenden führt Sie ein kurzes Tutorial zur ersten, einfachen Schaltung: Beginnen Sie, indem Sie einen Eingang in die Schaltung einfügen. - Sie finden den Eingang im Menu Bauteile▸IO. + Sie finden den Eingang im Menu Bauteile▸IO. + Fügen Sie nun einen zweiten Eingang in die Schaltung ein. Sie können auch auf den Eingang in der Toolbar klicken. diff --git a/src/main/resources/lang/lang_en.xml b/src/main/resources/lang/lang_en.xml index 763116b4c..ef7fedd4a 100644 --- a/src/main/resources/lang/lang_en.xml +++ b/src/main/resources/lang/lang_en.xml @@ -2038,10 +2038,31 @@ Therefore, the signal 'D_out' is also available to check the value in this case. transition condition is met. ]]> + The measurement graph + +

What can be seen in the graph?

+ Unlike a real logic analyzer, the X-axis of the measurement graph does not show time. + A counter is displayed which counts the changes of state in the circuit. + Whenever there is a change in the circuit, the counter is incremented and the new state is displayed.
+ You can also think of it as a classic logic analyzer, which does not save any data for optimization + if nothing has changed in the circuit. + However, this also means that it is not possible to read from the graph whether a lot or little time has + passed between two changes in the circuit.
+ This behavior is caused by the nature of the simulation: The simulation of the circuit does not know the + concept of time. A change is made to the circuit, and the change in the circuit state is calculated, until + the circuit has stabilized again. Then the next change is made, the effect of which is also is calculated + and so on. These changes are counted and the counter value is displayed on the X-axis of the graph.
+ Among other things, this means that a circuit cannot be overclocked, since the effects of the falling edge + of the clock are not calculated until the circuit has stabilized after the previous rising edge. + + ]]>
+ Tutorial In the following a short tutorial leads you to the first, simple circuit: - First, insert an input into the circuit. You will find the input in the menu Components▸IO. + First, insert an input into the circuit. You will find the input in the menu Components▸IO. + Now add a second input to the circuit. You can also click on the input in the toolbar.