|
@@ -290,10 +290,12 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
((HolonObject) o).updateTrackingInfo();
|
|
((HolonObject) o).updateTrackingInfo();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- controller.addTextToConsole("Tracking: ", Color.BLACK, 12, false, false, false);
|
|
|
|
- controller.addTextToConsole("" + o.getName(), Color.BLUE, 12, true, false, false);
|
|
|
|
- controller.addTextToConsole(", ID:", Color.BLACK, 12, false, false, false);
|
|
|
|
- controller.addTextToConsole("" + o.getId(), Color.RED, 12, true, false, true);
|
|
|
|
|
|
+ if (model.getShowConsoleLog()) {
|
|
|
|
+ controller.addTextToConsole("Tracking: ", Color.BLACK, 12, false, false, false);
|
|
|
|
+ controller.addTextToConsole("" + o.getName(), Color.BLUE, 12, true, false, false);
|
|
|
|
+ controller.addTextToConsole(", ID:", Color.BLACK, 12, false, false, false);
|
|
|
|
+ controller.addTextToConsole("" + o.getId(), Color.RED, 12, true, false, true);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -321,10 +323,12 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
((HolonObject) o).setTrackingProd(new float[100]);
|
|
((HolonObject) o).setTrackingProd(new float[100]);
|
|
((HolonObject) o).setTrackingCons(new float[100]);
|
|
((HolonObject) o).setTrackingCons(new float[100]);
|
|
}
|
|
}
|
|
- controller.addTextToConsole("Untracking: ", Color.BLACK, 12, false, false, false);
|
|
|
|
- controller.addTextToConsole("" + o.getName(), Color.BLUE, 12, true, false, false);
|
|
|
|
- controller.addTextToConsole(", ID:", Color.BLACK, 12, false, false, false);
|
|
|
|
- controller.addTextToConsole("" + o.getId(), Color.RED, 12, true, false, true);
|
|
|
|
|
|
+ if (model.getShowConsoleLog()) {
|
|
|
|
+ controller.addTextToConsole("Untracking: ", Color.BLACK, 12, false, false, false);
|
|
|
|
+ controller.addTextToConsole("" + o.getName(), Color.BLUE, 12, true, false, false);
|
|
|
|
+ controller.addTextToConsole(", ID:", Color.BLACK, 12, false, false, false);
|
|
|
|
+ controller.addTextToConsole("" + o.getId(), Color.RED, 12, true, false, true);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -358,7 +362,7 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
tabbedPane = (JTabbedPane) tempSplit.getLeftComponent();
|
|
tabbedPane = (JTabbedPane) tempSplit.getLeftComponent();
|
|
tabbedPane2 = null;
|
|
tabbedPane2 = null;
|
|
}
|
|
}
|
|
- //Look if the uppernode is open in a Tab
|
|
|
|
|
|
+ // Look if the uppernode is open in a Tab
|
|
for (int i = 4; i < tabbedPane.getTabCount(); i++) {
|
|
for (int i = 4; i < tabbedPane.getTabCount(); i++) {
|
|
if (tabbedPane.getComponentAt(i) == null) {
|
|
if (tabbedPane.getComponentAt(i) == null) {
|
|
} else if (((UpperNodeCanvas) ((JScrollPane) tabbedPane.getComponentAt(i)).getViewport()
|
|
} else if (((UpperNodeCanvas) ((JScrollPane) tabbedPane.getComponentAt(i)).getViewport()
|
|
@@ -373,8 +377,8 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
if (tabbedPane2 != null
|
|
if (tabbedPane2 != null
|
|
&& ((UpperNodeCanvas) ((JScrollPane) tabbedPane2.getSelectedComponent())
|
|
&& ((UpperNodeCanvas) ((JScrollPane) tabbedPane2.getSelectedComponent())
|
|
.getViewport().getComponent(0)).upperNode.getId() == cps.getId()) {
|
|
.getViewport().getComponent(0)).upperNode.getId() == cps.getId()) {
|
|
- ((ButtonTabComponent) tabbedPane
|
|
|
|
- .getTabComponentAt(tabbedPane2.getSelectedIndex())).removeTabs();
|
|
|
|
|
|
+ ((ButtonTabComponent) tabbedPane.getTabComponentAt(tabbedPane2.getSelectedIndex()))
|
|
|
|
+ .removeTabs();
|
|
}
|
|
}
|
|
} catch (Exception e2) {
|
|
} catch (Exception e2) {
|
|
}
|
|
}
|
|
@@ -457,7 +461,7 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- //SubNet Coloring
|
|
|
|
|
|
+ // SubNet Coloring
|
|
int i = 0;
|
|
int i = 0;
|
|
for (SubNet s : controller.getSimManager().getSubNets()) {
|
|
for (SubNet s : controller.getSimManager().getSubNets()) {
|
|
|
|
|
|
@@ -723,10 +727,12 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
cy = cps.getPosition().y - controller.getScaleDiv2();
|
|
cy = cps.getPosition().y - controller.getScaleDiv2();
|
|
if (x - controller.getScale() <= cx && y - controller.getScale() <= cy && x >= cx && y >= cy) {
|
|
if (x - controller.getScale() <= cx && y - controller.getScale() <= cy && x >= cx && y >= cy) {
|
|
tempCps = cps;
|
|
tempCps = cps;
|
|
- controller.addTextToConsole("Selected: ", Color.BLACK, 12, false, false, false);
|
|
|
|
- controller.addTextToConsole("" + cps.getName(), Color.BLUE, 12, true, false, false);
|
|
|
|
- controller.addTextToConsole(", ID:", Color.BLACK, 12, false, false, false);
|
|
|
|
- controller.addTextToConsole("" + cps.getId(), Color.RED, 12, true, false, true);
|
|
|
|
|
|
+ if (model.getShowConsoleLog()) {
|
|
|
|
+ controller.addTextToConsole("Selected: ", Color.BLACK, 12, false, false, false);
|
|
|
|
+ controller.addTextToConsole("" + cps.getName(), Color.BLUE, 12, true, false, false);
|
|
|
|
+ controller.addTextToConsole(", ID:", Color.BLACK, 12, false, false, false);
|
|
|
|
+ controller.addTextToConsole("" + cps.getId(), Color.RED, 12, true, false, true);
|
|
|
|
+ }
|
|
dragging = true;
|
|
dragging = true;
|
|
if (e.isControlDown() && tempCps != null) {
|
|
if (e.isControlDown() && tempCps != null) {
|
|
if (model.getSelectedCpsObjects().contains(tempCps)) {
|
|
if (model.getSelectedCpsObjects().contains(tempCps)) {
|