|
@@ -896,6 +896,17 @@ public class GUI<E> implements CategoryListener {
|
|
try {
|
|
try {
|
|
controller.loadFile(file.getAbsolutePath());
|
|
controller.loadFile(file.getAbsolutePath());
|
|
canvas.repaint();
|
|
canvas.repaint();
|
|
|
|
+ ArrayList<HolonElement> tempList = new ArrayList<>();
|
|
|
|
+ for (CpsObject cps : model.getObjectsOnCanvas()) {
|
|
|
|
+ if (cps instanceof HolonObject) {
|
|
|
|
+ for (HolonElement h : ((HolonObject)cps).getElements()) {
|
|
|
|
+ tempList.add(h);
|
|
|
|
+ unitGraph.repaintWithNewElement(tempList);
|
|
|
|
+ tempList.remove(0);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ unitGraph.empty();
|
|
tree.repaint();
|
|
tree.repaint();
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
// TODO Auto-generated catch block
|
|
// TODO Auto-generated catch block
|
|
@@ -941,7 +952,6 @@ public class GUI<E> implements CategoryListener {
|
|
public void stateChanged(ChangeEvent e) {
|
|
public void stateChanged(ChangeEvent e) {
|
|
int i = model.getCurIteration();
|
|
int i = model.getCurIteration();
|
|
controller.calculateStateForTimeStep(i);
|
|
controller.calculateStateForTimeStep(i);
|
|
- canvas.repaint();
|
|
|
|
unitGraph.repaint();
|
|
unitGraph.repaint();
|
|
}
|
|
}
|
|
});
|
|
});
|