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