Merge commit '42b2e5ca519766e37ce6941ba4faecc9691cc403' into upstream
[debian/openrocket] / core / src / net / sf / openrocket / gui / main / SimulationPanel.java
index 719e1cf6a6a3cd3d00cd4e1c7eae45ae19566067..b12b85617a5f27339689a8fb8ec4e45dfb14422b 100644 (file)
@@ -135,7 +135,7 @@ public class SimulationPanel extends JPanel {
                                
                                long t = System.currentTimeMillis();
                                new SimulationRunDialog(SwingUtilities.getWindowAncestor(
-                                                       SimulationPanel.this), sims).setVisible(true);
+                                                       SimulationPanel.this), document, sims).setVisible(true);
                                log.info("Running simulations took " + (System.currentTimeMillis() - t) + " ms");
                                fireMaintainSelection();
                        }
@@ -514,7 +514,7 @@ public class SimulationPanel extends JPanel {
        }
        
        private void openDialog(final Simulation sim, int position) {
-               new SimulationEditDialog(SwingUtilities.getWindowAncestor(this), sim, position)
+               new SimulationEditDialog(SwingUtilities.getWindowAncestor(this), document, sim, position)
                                .setVisible(true);
                fireMaintainSelection();
        }
@@ -571,42 +571,38 @@ public class SimulationPanel extends JPanel {
                        tip = "<html><b>" + sim.getName() + "</b><br>";
                        switch (sim.getStatus()) {
                        case UPTODATE:
-                               //// <i>Up to date</i><br>
-                               tip += "<i>Up to date</i><br>";
+                               tip += trans.get ("simpanel.ttip.uptodate") + "<br>";
                                break;
                        
                        case LOADED:
-                               //// <i>Data loaded from a file</i><br>
-                               tip += "<i>Data loaded from a file</i><br>";
+                               tip += trans.get ("simpanel.ttip.loaded") + "<br>";
                                break;
                        
                        case OUTDATED:
-                               tip += "<i><font color=\"red\">Data is out of date</font></i><br>";
-                               tip += "Click <i><b>Run simulations</b></i> to simulate.<br>";
+                               tip += trans.get ("simpanel.ttip.outdated") + "<br>";
                                break;
                        
                        case EXTERNAL:
-                               tip += "<i>Imported data</i><br>";
+                               tip += trans.get ("simpanel.ttip.external") + "<br>";
                                return tip;
                                
                        case NOT_SIMULATED:
-                               tip += "<i>Not simulated yet</i><br>";
-                               tip += "Click <i><b>Run simulations</b></i> to simulate.";
+                               tip += trans.get ("simpanel.ttip.notSimulated");
                                return tip;
                        }
                        
                        if (data == null) {
-                               tip += "No simulation data available.";
+                               tip += trans.get ("simpanel.ttip.noData");
                                return tip;
                        }
                        WarningSet warnings = data.getWarningSet();
                        
                        if (warnings.isEmpty()) {
-                               tip += "<font color=\"gray\">No warnings.</font>";
+                               tip += trans.get ("simpanel.ttip.noWarnings");
                                return tip;
                        }
                        
-                       tip += "<font color=\"red\">Warnings:</font>";
+                       tip += trans.get ("simpanel.ttip.warnings");
                        for (Warning w : warnings) {
                                tip += "<br>" + w.toString();
                        }