From 252fc1866253bbbe46a334f1fbc556bd1cb2ed30 Mon Sep 17 00:00:00 2001 From: Ludovic Apvrille <ludovic.apvrille@telecom-paristech.fr> Date: Wed, 10 Oct 2012 14:39:51 +0000 Subject: [PATCH] Resolved bug on printing the pc of CPUs on maping diagrams --- src/ui/MainGUI.java | 1 + src/ui/interactivesimulation/JFrameInteractiveSimulation.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/MainGUI.java b/src/ui/MainGUI.java index 5fb4c1e000..51dbc5a78e 100755 --- a/src/ui/MainGUI.java +++ b/src/ui/MainGUI.java @@ -6267,6 +6267,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener { LoadInfo li = new LoadInfo(); li.id = _id; li.load = _load; + li.energy = _energy; loadIDs.add(li); //TraceManager.addDev("Running id " + _id + " added load=" + _load); TDiagramPanel tdp = getCurrentTDiagramPanel(); diff --git a/src/ui/interactivesimulation/JFrameInteractiveSimulation.java b/src/ui/interactivesimulation/JFrameInteractiveSimulation.java index 2671def33a..e085b6ddef 100755 --- a/src/ui/interactivesimulation/JFrameInteractiveSimulation.java +++ b/src/ui/interactivesimulation/JFrameInteractiveSimulation.java @@ -1507,7 +1507,7 @@ public class JFrameInteractiveSimulation extends JFrame implements ActionListene nl = elt.getElementsByTagName("energy"); if ((nl != null) && (nl.getLength() > 0)) { node0 = nl.item(0); - //System.out.println("nl:" + nl + " value=" + node0.getNodeValue() + " content=" + node0.getTextContent()); + //System.out.println("energy NL? nl:" + nl + " value=" + node0.getNodeValue() + " content=" + node0.getTextContent()); usedEnergy = node0.getTextContent(); } @@ -2261,7 +2261,7 @@ public class JFrameInteractiveSimulation extends JFrame implements ActionListene //System.out.println("Searching for old row"); row = (Integer)(rowTable.get(i)).intValue(); cputm.fireTableCellUpdated(row, 2); - if (_usedEnergy != null) { + if (_usedEnergy == null) { mgui.addLoadInfo(i, getDouble(_utilization).doubleValue(), -1); } else { mgui.addLoadInfo(i, getDouble(_utilization).doubleValue(), getLong(_usedEnergy).longValue()); -- GitLab