|
@@ -261,8 +261,8 @@ public class GUI implements CategoryListener {
|
|
|
"Reset Categories");
|
|
|
private final JMenu mnLanguage = new JMenu("Language");
|
|
|
private final String[] columnNamesMulti = { "Object", "Nr.", "Device",
|
|
|
- "Energy", "Flexibility active", "Quantity", "Activated" };
|
|
|
- private final String[] columnNamesSingle = { "Nr.", "Device", "Energy",
|
|
|
+ "Energy", "Power reactive", "Flexibility active", "Quantity", "Activated" };
|
|
|
+ private final String[] columnNamesSingle = { "Nr.", "Device", "Energy", "Power reactive",
|
|
|
"Flexibility active", "Quantity", "Activated" };
|
|
|
private final ArrayList<PropertyTable> tables = new ArrayList<>();
|
|
|
private final String[] comboBoxCat = { "Category", "Object", "Switch", "Battery" };
|
|
@@ -1436,24 +1436,26 @@ public class GUI implements CategoryListener {
|
|
|
}
|
|
|
// Energy Update
|
|
|
else if (selectedValueX == 3) {
|
|
|
- System.out.println("selectedValueX == 3");
|
|
|
- Float ftemp = Float
|
|
|
- .parseFloat(newStuff);
|
|
|
+ Float ftemp = Float.parseFloat(newStuff);
|
|
|
eleTemp.setEnergyPerElement(ftemp);
|
|
|
}
|
|
|
- // Flexibility
|
|
|
+ // ReactivePowerPerElement
|
|
|
else if (selectedValueX == 4) {
|
|
|
+ eleTemp.setReactivePowerPerElement(Float.parseFloat(newStuff));
|
|
|
+ }
|
|
|
+ // Flexibility
|
|
|
+ else if (selectedValueX == 5) {
|
|
|
Float ftemp = Float
|
|
|
.parseFloat(newStuff);
|
|
|
//TODO and here
|
|
|
}
|
|
|
// Amount of Elements update
|
|
|
- else if (selectedValueX == 5) {
|
|
|
+ else if (selectedValueX == 6) {
|
|
|
Integer iTemp = Integer
|
|
|
.parseInt(newStuff);
|
|
|
eleTemp.setAmount(iTemp);
|
|
|
}
|
|
|
- else if (selectedValueX == 6) {
|
|
|
+ else if (selectedValueX == 7) {
|
|
|
System.out.println("Test");
|
|
|
}
|
|
|
}
|
|
@@ -1518,8 +1520,11 @@ public class GUI implements CategoryListener {
|
|
|
Float ftemp = Float
|
|
|
.parseFloat(newStuff);
|
|
|
eleTemp.setEnergyPerElement(ftemp);
|
|
|
- } // Flexibility
|
|
|
+ } // Reactive power
|
|
|
else if (selectedValueX == 3) {
|
|
|
+ eleTemp.setReactivePowerPerElement(Float.parseFloat(newStuff));
|
|
|
+ } // Flexibility
|
|
|
+ else if (selectedValueX == 4) {
|
|
|
Float ftemp = Float
|
|
|
.parseFloat(newStuff);
|
|
|
//TODO ---
|
|
@@ -1531,7 +1536,7 @@ public class GUI implements CategoryListener {
|
|
|
// be computed anew
|
|
|
}
|
|
|
// Amount of Elements update
|
|
|
- else if (selectedValueX == 4) {
|
|
|
+ else if (selectedValueX == 5) {
|
|
|
Integer iTemp = Integer
|
|
|
.parseInt(newStuff);
|
|
|
eleTemp.setAmount(iTemp);
|
|
@@ -3095,13 +3100,15 @@ public class GUI implements CategoryListener {
|
|
|
private void updateElementTableAfterChange(HolonElement eleBTemp,
|
|
|
int selectedValueBY) {
|
|
|
// model.getSingleTable().setValueAt(false,
|
|
|
-// selectedValueBY, 6);
|
|
|
+// selectedValueBY, 7);
|
|
|
model.getSingleTable().setValueAt(eleBTemp.isActive(), selectedValueBY,
|
|
|
- 5);
|
|
|
+ 6);
|
|
|
model.getSingleTable().setValueAt(eleBTemp.getAmount(),
|
|
|
- selectedValueBY, 4);
|
|
|
+ selectedValueBY, 5);
|
|
|
model.getSingleTable().setValueAt(
|
|
|
controller.getSimManager().getActualFlexManager().isAFlexInUseOfHolonElement(eleBTemp),
|
|
|
+ selectedValueBY, 4);
|
|
|
+ model.getSingleTable().setValueAt(eleBTemp.getReactivePowerPerElement(),
|
|
|
selectedValueBY, 3);
|
|
|
model.getSingleTable().setValueAt(eleBTemp.getEnergyPerElement(),
|
|
|
selectedValueBY, 2);
|