adds a help text to the measurement graph dialog, closes #409

This commit is contained in:
hneemann 2020-01-10 08:57:14 +01:00
parent 164862a836
commit 2d60e82fbf
4 changed files with 70 additions and 10 deletions

View File

@ -12,6 +12,7 @@ import de.neemann.digital.draw.graphics.*;
import de.neemann.digital.gui.SaveAsHelper; import de.neemann.digital.gui.SaveAsHelper;
import de.neemann.digital.gui.Settings; import de.neemann.digital.gui.Settings;
import de.neemann.digital.gui.components.OrderMerger; 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.gui.components.testing.ValueTableDialog;
import de.neemann.digital.lang.Lang; import de.neemann.digital.lang.Lang;
import de.neemann.gui.IconCreator; import de.neemann.gui.IconCreator;
@ -189,6 +190,19 @@ public class GraphDialog extends JDialog implements Observer {
view.addSeparator(); view.addSeparator();
view.add(showTable.createJMenuItem()); 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); setJMenuBar(bar);
pack(); pack();
setLocationRelativeTo(owner); setLocationRelativeTo(owner);

View File

@ -75,14 +75,16 @@ public class ShowStringDialog extends JDialog {
getContentPane().add(new JScrollPane(textComp)); getContentPane().add(new JScrollPane(textComp));
JPanel buttons = new JPanel(new FlowLayout(FlowLayout.RIGHT)); JPanel buttons = new JPanel(new FlowLayout(FlowLayout.RIGHT));
buttons.add(new ToolTipAction(Lang.get("btn_copyToClipboard")) { if (!html) {
@Override buttons.add(new ToolTipAction(Lang.get("btn_copyToClipboard")) {
public void actionPerformed(ActionEvent actionEvent) { @Override
StringSelection stringSelection = new StringSelection(str); public void actionPerformed(ActionEvent actionEvent) {
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); StringSelection stringSelection = new StringSelection(str);
clipboard.setContents(stringSelection, null); Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
} clipboard.setContents(stringSelection, null);
}.setToolTip(Lang.get("btn_copyToClipboard_tt")).createJButton()); }
}.setToolTip(Lang.get("btn_copyToClipboard_tt")).createJButton());
}
buttons.add(new ToolTipAction(Lang.get("ok")) { buttons.add(new ToolTipAction(Lang.get("ok")) {
@Override @Override
public void actionPerformed(ActionEvent actionEvent) { public void actionPerformed(ActionEvent actionEvent) {

View File

@ -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. andere Übergangsbedingung erfüllt ist.
</body></html>]]></string> </body></html>]]></string>
<string name="msg_graphHelpTitle">Der Messwertegraph</string>
<string name="msg_graphHelp"><![CDATA[
<html><body>
<h3>Was ist im Graphen zu sehen?</h3>
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.<br/>
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.<br/>
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.<br/>
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.<br/>
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.
</body></html>
]]></string>
<string name="tutorial">Tutorial</string> <string name="tutorial">Tutorial</string>
<string name="tutorial1">Im Folgenden führt Sie ein kurzes Tutorial zur ersten, <string name="tutorial1">Im Folgenden führt Sie ein kurzes Tutorial zur ersten,
einfachen Schaltung: einfachen Schaltung:
Beginnen Sie, indem Sie einen Eingang in die Schaltung einfügen. Beginnen Sie, indem Sie einen Eingang in die Schaltung einfügen.
Sie finden den Eingang im Menu Bauteile▸IO.</string> Sie finden den Eingang im Menu Bauteile▸IO.
</string>
<string name="tutorial2">Fügen Sie nun einen zweiten Eingang in die Schaltung ein. <string name="tutorial2">Fügen Sie nun einen zweiten Eingang in die Schaltung ein.
Sie können auch auf den Eingang in der Toolbar klicken. Sie können auch auf den Eingang in der Toolbar klicken.

View File

@ -2038,10 +2038,31 @@ Therefore, the signal 'D_out' is also available to check the value in this case.
transition condition is met. transition condition is met.
</body></html>]]></string> </body></html>]]></string>
<string name="msg_graphHelpTitle">The measurement graph</string>
<string name="msg_graphHelp"><![CDATA[
<html><body>
<h3>What can be seen in the graph?</h3>
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.<br/>
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.<br/>
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.<br/>
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.
</body></html>
]]></string>
<string name="tutorial">Tutorial</string> <string name="tutorial">Tutorial</string>
<string name="tutorial1">In the following a short tutorial leads you to the first, simple circuit: <string name="tutorial1">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.</string> First, insert an input into the circuit. You will find the input in the menu Components▸IO.
</string>
<string name="tutorial2">Now add a second input to the circuit. You can also click on the input <string name="tutorial2">Now add a second input to the circuit. You can also click on the input
in the toolbar. in the toolbar.