Selaa lähdekoodia

Merge branch 'master' of git@git.tk.informatik.tu-darmstadt.de:andreas.meyer-berg/SmartHomeNetworkSim.git

Andreas T. Meyer-Berg 5 vuotta sitten
vanhempi
commit
e0e9588169

+ 5 - 4
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/view/popups/NetworkTreePanel.java

@@ -130,6 +130,11 @@ public class NetworkTreePanel extends JScrollPane implements Observer {
 		this.controller = controller;
 		network = this.controller.getNetworkController();
 		networkTreeSettings = controller.getSettingsController().getNetworkTreeSettingsController();
+
+		//Adds + - as icons for expanding and collapsing the tree
+		UIManager.put("Tree.expandedIcon",  new ImageIcon(Utility.loadFile("images/treeMinus.gif")));
+		UIManager.put("Tree.collapsedIcon", new ImageIcon(Utility.loadFile("images/treePlus.gif")));
+		
 		tree = new JTree();
 		initializeRightClickMenu();
 
@@ -254,10 +259,6 @@ public class NetworkTreePanel extends JScrollPane implements Observer {
 			}
 		});
 		
-		//Adds + - as icons for expanding and collapsing the tree
-		UIManager.put("Tree.expandedIcon",  new ImageIcon(Utility.loadFile("images/treeMinus.gif")));
-		UIManager.put("Tree.collapsedIcon", new ImageIcon(Utility.loadFile("images/treePlus.gif")));
-		
 		update(null, null);
 	}
 

+ 2 - 2
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/view/popups/SmartDeviceCreationPopUp.java

@@ -126,7 +126,7 @@ public class SmartDeviceCreationPopUp extends JDialog {
 		tfName.setText(newDevice.getName());
 
 		JLabel lblXposition = new JLabel(
-				"x-position in [" + visualisationRadius + "," + (maxX - visualisationRadius) + "]:");
+				"x-position in [" + visualisationRadius + ", " + (maxX - visualisationRadius) + "]:");
 		lblXposition.setBounds(10, 30, 230, 16);
 		lblXposition.setToolTipText("Set the x position, which should be an integer in the given interval.");
 		lblXposition.setHorizontalAlignment(SwingConstants.RIGHT);
@@ -141,7 +141,7 @@ public class SmartDeviceCreationPopUp extends JDialog {
 		tfXposition.setInputVerifier(new IntegerInputValidator(visualisationRadius, maxX - visualisationRadius));
 
 		JLabel lblYposition = new JLabel(
-				"y-position in [" + visualisationRadius + "," + (maxY - visualisationRadius) + "]:");
+				"y-position in [" + visualisationRadius + ", " + (maxY - visualisationRadius) + "]:");
 		lblYposition.setBounds(10, 57, 230, 16);
 		lblYposition.setToolTipText("Set the y position, which should be an integer in the given interval.");
 		lblYposition.setHorizontalAlignment(SwingConstants.RIGHT);