|
@@ -41,9 +41,13 @@ public class UpdateController {
|
|
|
if (tempCps != null && tempCps.getClass() == HolonObject.class) {
|
|
|
if (table.getRowCount() != 0) {
|
|
|
table.removeRow(2);
|
|
|
+ Object[] tempEnergy = { Languages.getLanguage()[73], ((HolonObject) tempCps).getCurrentEnergy() };
|
|
|
+ table.insertRow(2, tempEnergy);
|
|
|
+ ((HolonObject) tempCps).updateTotalFlex();
|
|
|
+ table.removeRow(3);
|
|
|
+ Object[] tempFlex = { "Flexibility", ((HolonObject) tempCps).getTotalFlex() };
|
|
|
+ table.insertRow(3, tempFlex);
|
|
|
}
|
|
|
- Object[] tempEnergy = { Languages.getLanguage()[73], ((HolonObject) tempCps).getCurrentEnergy() };
|
|
|
- table.insertRow(2, tempEnergy);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -238,10 +242,13 @@ public class UpdateController {
|
|
|
if (obj instanceof HolonObject) {
|
|
|
refreshTableHolonElement(model.getMultiTable(), model.getSingleTable());
|
|
|
Object[] tempEnergy = { Languages.getLanguage()[73], ((HolonObject) obj).getCurrentEnergy() };
|
|
|
+ Object[] tempFlex = { "Flexibility", ((HolonObject) obj).getTotalFlex() };
|
|
|
model.getPropertyTable().addRow(tempEnergy);
|
|
|
+ model.getPropertyTable().addRow(tempFlex);
|
|
|
model.getPropertyTable().setCellEditable(0, 1, true);
|
|
|
model.getPropertyTable().setCellEditable(2, 1, false);
|
|
|
model.getPropertyTable().setCellEditable(3, 1, false);
|
|
|
+ model.getPropertyTable().setCellEditable(4, 1, false);
|
|
|
} // For HolonSwitches is showed the actual status (active
|
|
|
// or inactive)
|
|
|
else if (obj instanceof HolonSwitch) {
|