|
@@ -11,6 +11,7 @@ import javax.swing.JOptionPane;
|
|
import javax.swing.JPanel;
|
|
import javax.swing.JPanel;
|
|
import javax.swing.JTabbedPane;
|
|
import javax.swing.JTabbedPane;
|
|
import javax.swing.JTextField;
|
|
import javax.swing.JTextField;
|
|
|
|
+import javax.swing.SwingConstants;
|
|
|
|
|
|
import de.tu_darmstadt.tk.SmartHomeNetworkSim.control.Controller;
|
|
import de.tu_darmstadt.tk.SmartHomeNetworkSim.control.Controller;
|
|
import de.tu_darmstadt.tk.SmartHomeNetworkSim.core.SmartDevice;
|
|
import de.tu_darmstadt.tk.SmartHomeNetworkSim.core.SmartDevice;
|
|
@@ -111,12 +112,13 @@ public class SmartDeviceCreationPopUp extends JDialog {
|
|
panelGeneral.setLayout(null);
|
|
panelGeneral.setLayout(null);
|
|
|
|
|
|
JLabel lblName = new JLabel("Name:");
|
|
JLabel lblName = new JLabel("Name:");
|
|
- lblName.setBounds(0, 3, 38, 16);
|
|
|
|
|
|
+ lblName.setBounds(10, 3, 230, 16);
|
|
lblName.setToolTipText("Change the name of the SmartDevice");
|
|
lblName.setToolTipText("Change the name of the SmartDevice");
|
|
|
|
+ lblName.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
panelGeneral.add(lblName);
|
|
panelGeneral.add(lblName);
|
|
|
|
|
|
tfName = new JTextField();
|
|
tfName = new JTextField();
|
|
- tfName.setBounds(370, 0, 226, 22);
|
|
|
|
|
|
+ tfName.setBounds(250, 0, 226, 22);
|
|
tfName.setToolTipText("Enter the SmartDevice name");
|
|
tfName.setToolTipText("Enter the SmartDevice name");
|
|
panelGeneral.add(tfName);
|
|
panelGeneral.add(tfName);
|
|
tfName.setColumns(20);
|
|
tfName.setColumns(20);
|
|
@@ -124,12 +126,13 @@ public class SmartDeviceCreationPopUp extends JDialog {
|
|
|
|
|
|
JLabel lblXposition = new JLabel(
|
|
JLabel lblXposition = new JLabel(
|
|
"x-position in [" + visualisationRadius + "," + (maxX - visualisationRadius) + "]:");
|
|
"x-position in [" + visualisationRadius + "," + (maxX - visualisationRadius) + "]:");
|
|
- lblXposition.setBounds(0, 30, 106, 16);
|
|
|
|
|
|
+ lblXposition.setBounds(10, 30, 230, 16);
|
|
lblXposition.setToolTipText("Set the x position, which should be an integer in the given interval.");
|
|
lblXposition.setToolTipText("Set the x position, which should be an integer in the given interval.");
|
|
|
|
+ lblXposition.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
panelGeneral.add(lblXposition);
|
|
panelGeneral.add(lblXposition);
|
|
|
|
|
|
tfXposition = new JTextField();
|
|
tfXposition = new JTextField();
|
|
- tfXposition.setBounds(370, 27, 116, 22);
|
|
|
|
|
|
+ tfXposition.setBounds(250, 27, 116, 22);
|
|
lblXposition.setToolTipText("Enter the x position, which should be an integer in the given interval.");
|
|
lblXposition.setToolTipText("Enter the x position, which should be an integer in the given interval.");
|
|
panelGeneral.add(tfXposition);
|
|
panelGeneral.add(tfXposition);
|
|
tfXposition.setColumns(10);
|
|
tfXposition.setColumns(10);
|
|
@@ -138,12 +141,13 @@ public class SmartDeviceCreationPopUp extends JDialog {
|
|
|
|
|
|
JLabel lblYposition = new JLabel(
|
|
JLabel lblYposition = new JLabel(
|
|
"y-position in [" + visualisationRadius + "," + (maxY - visualisationRadius) + "]:");
|
|
"y-position in [" + visualisationRadius + "," + (maxY - visualisationRadius) + "]:");
|
|
- lblYposition.setBounds(0, 57, 106, 16);
|
|
|
|
- lblXposition.setToolTipText("Set the y position, which should be an integer in the given interval.");
|
|
|
|
|
|
+ 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);
|
|
panelGeneral.add(lblYposition);
|
|
panelGeneral.add(lblYposition);
|
|
|
|
|
|
tfYposition = new JTextField();
|
|
tfYposition = new JTextField();
|
|
- tfYposition.setBounds(370, 54, 116, 22);
|
|
|
|
|
|
+ tfYposition.setBounds(250, 54, 116, 22);
|
|
tfYposition.setToolTipText("Set the y position, which should be an integer in the given interval.");
|
|
tfYposition.setToolTipText("Set the y position, which should be an integer in the given interval.");
|
|
panelGeneral.add(tfYposition);
|
|
panelGeneral.add(tfYposition);
|
|
tfYposition.setColumns(10);
|
|
tfYposition.setColumns(10);
|