|
@@ -155,13 +155,11 @@ public class GUI implements CategoryListener {
|
|
|
canvas.setBackground(Color.WHITE);
|
|
|
canvas.setPreferredSize(new Dimension(10000, 10000));
|
|
|
JScrollPane canvasSP = new JScrollPane(canvas);
|
|
|
- canvasSP.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
|
|
|
- canvasSP.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
|
|
|
-
|
|
|
- tabbedPane.addTab("Modeling", null, canvasSP, null);
|
|
|
+
|
|
|
+ tabbedPane.addTab("Modeling", new ImageIcon(new ImageIcon(this.getClass().getResource("/Images/home.png")).getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH)), canvasSP, "Model a CPS");
|
|
|
|
|
|
|
|
|
- tabbedPane.addTab("Simulation", null, scrollPane_2, null);
|
|
|
+ tabbedPane.addTab("Simulation", new ImageIcon(new ImageIcon(this.getClass().getResource("/Images/Dummy_House.png")).getImage().getScaledInstance(30, 30, Image.SCALE_SMOOTH)), scrollPane_2, "Simulate the CPS");
|
|
|
dtrpnHereWillBe.setText("Here will be the Simulation");
|
|
|
|
|
|
scrollPane_2.setViewportView(dtrpnHereWillBe);
|
|
@@ -234,7 +232,6 @@ public class GUI implements CategoryListener {
|
|
|
try {
|
|
|
if (dragging) {
|
|
|
CpsObject h = null;
|
|
|
- System.out.println(tempCps.getClass().toString());
|
|
|
if(tempCps.getClass() == HolonObject.class) {h = new HolonObject(tempCps);}
|
|
|
if(tempCps.getClass() == HolonSwitch.class) {h = new HolonSwitch(tempCps);}
|
|
|
if(tempCps.getClass() == HolonTransformer.class) {h = new HolonTransformer(tempCps);}
|