Sfoglia il codice sorgente

Fixes several text visualizations in PopUps on Linux

- SimulationManager Buttons overlapping CheckBox Text
- Settings panel String being cut e.g. "Conn..."
Andreas T. Meyer-Berg 6 anni fa
parent
commit
a5dce93115

+ 9 - 9
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/view/popups/SettingsPopUp.java

@@ -65,14 +65,14 @@ public class SettingsPopUp extends JFrame implements Observer {
 		pVisualisation.setLayout(null);
 
 		JLabel lblVisualisationSize = new JLabel("Visualization Radius:");
-		lblVisualisationSize.setBounds(12, 13, 125, 16);
+		lblVisualisationSize.setBounds(10, 10, 150, 20);
 		lblVisualisationSize
 				.setToolTipText("<html>Radius of the SmartDevice Visualization, which is half of the Device width.</html>");
 		pVisualisation.add(lblVisualisationSize);
 
 		JLabel lblradiusInPixels = new JLabel("(Radius in pixels:)");
 		lblradiusInPixels.setHorizontalAlignment(SwingConstants.RIGHT);
-		lblradiusInPixels.setBounds(12, 43, 118, 16);
+		lblradiusInPixels.setBounds(10, 30, 150, 20);
 		pVisualisation.add(lblradiusInPixels);
 
 		sliderRadius = new JSlider();
@@ -81,7 +81,7 @@ public class SettingsPopUp extends JFrame implements Observer {
 		sliderRadius.setMajorTickSpacing(18);
 		sliderRadius.setMaximum(110);
 		sliderRadius.setMinimum(2);
-		sliderRadius.setBounds(135, 13, 280, 45);
+		sliderRadius.setBounds(160, 10, 280, 50);
 		pVisualisation.add(sliderRadius);
 		sliderRadius.addChangeListener(a -> {
 			config.setDeviceVisualizationRadius(sliderRadius.getValue());
@@ -90,7 +90,7 @@ public class SettingsPopUp extends JFrame implements Observer {
 
 		chckbxTerminatedConnections = new JCheckBox(
 				"Show terminated connections");
-		chckbxTerminatedConnections.setBounds(8, 67, 197, 25);
+		chckbxTerminatedConnections.setBounds(0, 70, 240, 25);
 		chckbxTerminatedConnections.addActionListener(a -> config
 				.setShowTerminatedConnections(chckbxTerminatedConnections
 						.isSelected()));
@@ -99,7 +99,7 @@ public class SettingsPopUp extends JFrame implements Observer {
 		pVisualisation.add(chckbxTerminatedConnections);
 
 		chckbxConnections = new JCheckBox("Show connections");
-		chckbxConnections.setBounds(237, 67, 182, 25);
+		chckbxConnections.setBounds(240, 70, 200, 25);
 		chckbxConnections.addActionListener(a -> config
 				.setShowConnections(chckbxConnections.isSelected()));
 		chckbxConnections
@@ -107,7 +107,7 @@ public class SettingsPopUp extends JFrame implements Observer {
 		pVisualisation.add(chckbxConnections);
 
 		chckbxLinks = new JCheckBox("Show links");
-		chckbxLinks.setBounds(237, 97, 178, 25);
+		chckbxLinks.setBounds(240, 100, 200, 25);
 		chckbxLinks.addActionListener(a -> config.setShowLinks(chckbxLinks
 				.isSelected()));
 		chckbxLinks
@@ -115,7 +115,7 @@ public class SettingsPopUp extends JFrame implements Observer {
 		pVisualisation.add(chckbxLinks);
 
 		chckbxLinkToolTips = new JCheckBox("Show link ToolTips");
-		chckbxLinkToolTips.setBounds(237, 127, 178, 25);
+		chckbxLinkToolTips.setBounds(240, 130, 200, 25);
 		chckbxLinkToolTips.addActionListener(a -> config
 				.setShowLinkToolTips(chckbxLinkToolTips.isSelected()));
 		chckbxLinkToolTips
@@ -123,7 +123,7 @@ public class SettingsPopUp extends JFrame implements Observer {
 		pVisualisation.add(chckbxLinkToolTips);
 
 		chckbxSmartdevices = new JCheckBox("Show SmartDevices");
-		chckbxSmartdevices.setBounds(8, 97, 197, 25);
+		chckbxSmartdevices.setBounds(0, 100, 240, 25);
 		chckbxSmartdevices.addActionListener(a -> config
 				.setShowSmartDevices(chckbxSmartdevices.isSelected()));
 		chckbxSmartdevices
@@ -131,7 +131,7 @@ public class SettingsPopUp extends JFrame implements Observer {
 		pVisualisation.add(chckbxSmartdevices);
 
 		chckbxDeviceNames = new JCheckBox("Show SmartDevice names");
-		chckbxDeviceNames.setBounds(8, 127, 197, 25);
+		chckbxDeviceNames.setBounds(0, 130, 240, 25);
 		chckbxDeviceNames.addActionListener(a -> config
 				.setShowSmartDeviceNames(chckbxDeviceNames.isSelected()));
 		chckbxDeviceNames

+ 3 - 3
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/view/popups/SimulationConfigurator.java

@@ -175,7 +175,7 @@ public class SimulationConfigurator extends JFrame implements Observer{
 		getContentPane().add(lblConfigureExports);
 		
 		JButton btnEditAlgorithms = new JButton("Edit Algorithms");
-		btnEditAlgorithms.setBounds(230, 100, 180, 20);
+		btnEditAlgorithms.setBounds(250, 100, 180, 20);
 		getContentPane().add(btnEditAlgorithms);
 		btnEditAlgorithms.addActionListener(a->{ 
 			new EditAlgorithmsPopUp(controller, that);
@@ -194,11 +194,11 @@ public class SimulationConfigurator extends JFrame implements Observer{
 		.setToolTipText("Export packets into a different file for each Link.");
 		
 		btnExportFile = new JButton("Choose Export File");
-		btnExportFile.setBounds(230, 130, 180, 20);
+		btnExportFile.setBounds(250, 130, 180, 20);
 		getContentPane().add(btnExportFile);
 		
 		lblExportFileName = new JLabel();
-		lblExportFileName.setBounds(430, 130, 300, 20);
+		lblExportFileName.setBounds(440, 130, 300, 20);
 		getContentPane().add(lblExportFileName);
 		
 		JSeparator botSeparator = new JSeparator(JSeparator.HORIZONTAL);