shows node count in status line

This commit is contained in:
hneemann 2016-05-10 19:00:29 +02:00
parent 11be8f461b
commit 8d33fec4ae
4 changed files with 12 additions and 0 deletions

View File

@ -466,6 +466,13 @@ public class Model {
fireEvent(ModelEvent.MANUALCHANGE);
}
/**
* @return the number of nodes
*/
public int size() {
return nodes.size();
}
/**
* A simple storage bean for signals
*/

View File

@ -526,6 +526,8 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
model = modelDescription.createModel(true);
statusLabel.setText(Lang.get("msg_N_nodes", model.size()));
boolean runClock = false;
if (globalRunClock)
for (Clock c : model.getClocks())
@ -625,6 +627,7 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
circuitComponent.setCircuit(circ);
elementState.activate();
setFilename(filename, toPrefs);
statusLabel.setText(" ");
} catch (Exception e) {
circuitComponent.setCircuit(new Circuit());
new ErrorMessage(Lang.get("msg_errorReadingFile")).addCause(e).show(this);

View File

@ -192,6 +192,7 @@ msg_clockError=Fehler bei der Berechnung einer Takt\u00E4nderung
msg_frequency_N=Die maximale Frequenz ber\u00E4gt {0}Hz.
msg_annalyseErr=Fehler bei der Analyse der Schaltung
msg_errorDuringCalculation=Fehler w\u00E4hrend der Vereinfachung.
msg_N_nodes={0} aktive Elemente
stat_clocks={0} Halbzyklen

View File

@ -173,6 +173,7 @@ msg_errorReadingListing_N0=Error reading the listing {0}
msg_clockError=Error during a clock state change
msg_frequency_N=The maximum frequency is {0}Hz
msg_errorDuringCalculation=Error during simplification
msg_N_nodes={0} nodes
stat_clocks={0} half cycles