|
@@ -267,6 +267,11 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
|
cps.getPosition().y - (controller.getScale() / 20),
|
|
|
controller.getScale() + ((controller.getScale() / 20) * 2),
|
|
|
controller.getScale() + ((controller.getScale() / 20) * 2));
|
|
|
+ if(showedInformation[1]){
|
|
|
+ g2.setColor(Color.BLACK);
|
|
|
+ float totalEnergy = ((HolonObject) cps).getCurrentEnergyAtTimeStep(model.getCurIteration());
|
|
|
+ g2.drawString(Float.toString(totalEnergy), cps.getPosition().x, cps.getPosition().y - 10);
|
|
|
+ }
|
|
|
} else if (cps instanceof HolonObject) {
|
|
|
g2.setColor(((HolonObject) cps).getColor());
|
|
|
|