|
@@ -135,20 +135,20 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
|
for (AbstractCpsObject o : model.getSelectedCpsObjects()) {
|
|
|
if (o instanceof HolonObject) {
|
|
|
boolean found = false;
|
|
|
- if (control.getTrackingObj() != null) {
|
|
|
- for (HolonObject obj : control.getTrackingObj()) {
|
|
|
+ if (controller.getTrackingObj() != null) {
|
|
|
+ for (HolonObject obj : controller.getTrackingObj()) {
|
|
|
if (obj.getID() == o.getID()) {
|
|
|
found = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (!found) {
|
|
|
- control.addTrackingObj((HolonObject) o);
|
|
|
+ controller.addTrackingObj((HolonObject) o);
|
|
|
((HolonObject) o).updateTrackingInfo();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- System.out.println(control.getTrackingObj());
|
|
|
+ System.out.println(controller.getTrackingObj());
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -159,8 +159,8 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
|
for (AbstractCpsObject o : model.getSelectedCpsObjects()) {
|
|
|
if (o instanceof HolonObject) {
|
|
|
boolean found = false;
|
|
|
- if (control.getTrackingObj() != null) {
|
|
|
- for (HolonObject obj : control.getTrackingObj()) {
|
|
|
+ if (controller.getTrackingObj() != null) {
|
|
|
+ for (HolonObject obj : controller.getTrackingObj()) {
|
|
|
if (obj.getID() == o.getID()) {
|
|
|
found = true;
|
|
|
}
|
|
@@ -169,13 +169,13 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
|
if (found) {
|
|
|
// Removed from tracking array and tracking
|
|
|
// information reseted
|
|
|
- control.removeTrackingObj((HolonObject) o);
|
|
|
+ controller.removeTrackingObj((HolonObject) o);
|
|
|
((HolonObject) o).setTrackingProd(new float[100]);
|
|
|
((HolonObject) o).setTrackingCons(new float[100]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- System.out.println(control.getTrackingObj());
|
|
|
+ System.out.println(controller.getTrackingObj());
|
|
|
}
|
|
|
});
|
|
|
|