|
@@ -105,14 +105,14 @@ public class PortEditorPanel extends JPanel
|
|
|
String portNumberToolTip = "<html>Number of this port, should be a 16bit short [0 - 65335].<br> A Port describes the Endpoint of an Connection.</html>";
|
|
|
JLabel lblPortnumber = new JLabel("PortNumber:");
|
|
|
lblPortnumber.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
- lblPortnumber.setBounds(10, 10, 110, 20);
|
|
|
+ lblPortnumber.setBounds(10, 10, 140, 20);
|
|
|
lblPortnumber.setToolTipText(portNumberToolTip);
|
|
|
editPanel.add(lblPortnumber);
|
|
|
|
|
|
JScrollPane portsScrollPane = new JScrollPane(editPanel);
|
|
|
|
|
|
tfPortNumber = new JTextField();
|
|
|
- tfPortNumber.setBounds(130, 10, 130, 20);
|
|
|
+ tfPortNumber.setBounds(160, 10, 130, 20);
|
|
|
editPanel.add(tfPortNumber);
|
|
|
tfPortNumber.setColumns(10);
|
|
|
tfPortNumber.addFocusListener(this);
|
|
@@ -122,17 +122,17 @@ public class PortEditorPanel extends JPanel
|
|
|
|
|
|
JLabel lblProtocol = new JLabel("Protocol:");
|
|
|
lblProtocol.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
- lblProtocol.setBounds(10, 40, 110, 20);
|
|
|
+ lblProtocol.setBounds(10, 40, 140, 20);
|
|
|
lblProtocol.setToolTipText("Protocol which this Port participates in.");
|
|
|
editPanel.add(lblProtocol);
|
|
|
|
|
|
lblProtocolName = new JLabel("Protocol");
|
|
|
- lblProtocolName.setBounds(130, 40, 60, 20);
|
|
|
+ lblProtocolName.setBounds(160, 40, 60, 20);
|
|
|
lblProtocolName.setToolTipText("Name of the protocol, which is performed via this Port.");
|
|
|
editPanel.add(lblProtocolName);
|
|
|
|
|
|
JButton btnEditConnection = new JButton("Edit");
|
|
|
- btnEditConnection.setBounds(200, 40, 60, 20);
|
|
|
+ btnEditConnection.setBounds(230, 40, 60, 20);
|
|
|
btnEditConnection.setToolTipText("Edit the Connection & Protocol performed via this port.");
|
|
|
editPanel.add(btnEditConnection);
|
|
|
btnEditConnection.addActionListener(a->{
|
|
@@ -149,7 +149,7 @@ public class PortEditorPanel extends JPanel
|
|
|
JLabel lblStatus = new JLabel("Status:");
|
|
|
lblStatus.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
|
|
|
- lblStatus.setBounds(10, 70, 110, 20);
|
|
|
+ lblStatus.setBounds(10, 70, 140, 20);
|
|
|
lblStatus.setToolTipText(toolTipStatus);
|
|
|
editPanel.add(lblStatus);
|
|
|
|
|
@@ -158,7 +158,7 @@ public class PortEditorPanel extends JPanel
|
|
|
cmbStatus.addItem(Port.statusToString(Port.OPEN));
|
|
|
cmbStatus.addItem(Port.statusToString(Port.SENDING));
|
|
|
cmbStatus.addItem(Port.statusToString((short) 4));
|
|
|
- cmbStatus.setBounds(130, 70, 130, 20);
|
|
|
+ cmbStatus.setBounds(160, 70, 130, 20);
|
|
|
editPanel.add(cmbStatus);
|
|
|
cmbStatus.addFocusListener(this);
|
|
|
cmbStatus.addActionListener(this);
|
|
@@ -168,12 +168,12 @@ public class PortEditorPanel extends JPanel
|
|
|
String toolTipTrigger = "<html>Interval between to triggers of this port.<br> This port will sent a new outgoing packet every *triggerIntervall* milliseconds.<html>";
|
|
|
JLabel lblTriggerInterval = new JLabel("Trigger Interval:");
|
|
|
lblTriggerInterval.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
- lblTriggerInterval.setBounds(10, 100, 110, 20);
|
|
|
+ lblTriggerInterval.setBounds(10, 100, 140, 20);
|
|
|
lblTriggerInterval.setToolTipText(toolTipTrigger);
|
|
|
editPanel.add(lblTriggerInterval);
|
|
|
|
|
|
tfTriggerInterval = new JTextField();
|
|
|
- tfTriggerInterval.setBounds(130, 100, 130, 20);
|
|
|
+ tfTriggerInterval.setBounds(160, 100, 130, 20);
|
|
|
editPanel.add(tfTriggerInterval);
|
|
|
tfTriggerInterval.setColumns(10);
|
|
|
tfTriggerInterval.addFocusListener(this);
|
|
@@ -182,7 +182,7 @@ public class PortEditorPanel extends JPanel
|
|
|
tfTriggerInterval.setToolTipText(toolTipTrigger);
|
|
|
|
|
|
JLabel lblTriggerIntervalUnit = new JLabel("ms");
|
|
|
- lblTriggerIntervalUnit.setBounds(270, 100, 50, 20);
|
|
|
+ lblTriggerIntervalUnit.setBounds(3000, 100, 50, 20);
|
|
|
editPanel.add(lblTriggerIntervalUnit);
|
|
|
|
|
|
|
|
@@ -191,12 +191,12 @@ public class PortEditorPanel extends JPanel
|
|
|
|
|
|
JLabel lblResponseTime = new JLabel("Response Time:");
|
|
|
lblResponseTime.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
- lblResponseTime.setBounds(10, 130, 110, 20);
|
|
|
+ lblResponseTime.setBounds(10, 130, 140, 20);
|
|
|
lblResponseTime.setToolTipText(toolTipResponse);
|
|
|
editPanel.add(lblResponseTime);
|
|
|
|
|
|
tfResponseTime = new JTextField();
|
|
|
- tfResponseTime.setBounds(130, 130, 130, 20);
|
|
|
+ tfResponseTime.setBounds(160, 130, 130, 20);
|
|
|
editPanel.add(tfResponseTime);
|
|
|
tfResponseTime.setColumns(10);
|
|
|
tfResponseTime.addFocusListener(this);
|
|
@@ -205,7 +205,7 @@ public class PortEditorPanel extends JPanel
|
|
|
tfResponseTime.setToolTipText(toolTipResponse);
|
|
|
|
|
|
JLabel lblResponseTimeUnit = new JLabel("ms");
|
|
|
- lblResponseTimeUnit.setBounds(270, 130, 50, 20);
|
|
|
+ lblResponseTimeUnit.setBounds(300, 130, 50, 20);
|
|
|
editPanel.add(lblResponseTimeUnit);
|
|
|
|
|
|
String toolTipLastTrigger = "<html>Timestep in milliseconds, where this port sent its last packet.<br>"
|
|
@@ -213,12 +213,12 @@ public class PortEditorPanel extends JPanel
|
|
|
|
|
|
JLabel lblLasttrigger = new JLabel("LastTrigger:");
|
|
|
lblLasttrigger.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
- lblLasttrigger.setBounds(10, 160, 110, 20);
|
|
|
+ lblLasttrigger.setBounds(10, 160, 140, 20);
|
|
|
lblLasttrigger.setToolTipText(toolTipLastTrigger);
|
|
|
editPanel.add(lblLasttrigger);
|
|
|
|
|
|
tfLastTrigger = new JTextField();
|
|
|
- tfLastTrigger.setBounds(130, 160, 130, 20);
|
|
|
+ tfLastTrigger.setBounds(160, 160, 130, 20);
|
|
|
editPanel.add(tfLastTrigger);
|
|
|
tfLastTrigger.setColumns(10);
|
|
|
tfLastTrigger.addFocusListener(this);
|
|
@@ -227,25 +227,25 @@ public class PortEditorPanel extends JPanel
|
|
|
tfLastTrigger.setToolTipText(toolTipLastTrigger);
|
|
|
|
|
|
JLabel lblLastTriggerUnit = new JLabel("ms");
|
|
|
- lblLastTriggerUnit.setBounds(270, 160, 50, 20);
|
|
|
+ lblLastTriggerUnit.setBounds(300, 160, 50, 20);
|
|
|
editPanel.add(lblLastTriggerUnit);
|
|
|
|
|
|
String toolTipJitter = "<html>Jitter describes the differences between the minimum and maximum delay of a connection.<br>"
|
|
|
+ "In this takes the Port may send packets jitter/2 ms earlier or later</html>";
|
|
|
JLabel lblJitter = new JLabel("Jitter:");
|
|
|
lblJitter.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
- lblJitter.setBounds(10, 190, 110, 20);
|
|
|
+ lblJitter.setBounds(10, 190, 140, 20);
|
|
|
lblJitter.setToolTipText(toolTipJitter);
|
|
|
editPanel.add(lblJitter);
|
|
|
|
|
|
tfJitter = new JTextField();
|
|
|
- tfJitter.setBounds(130, 190, 130, 20);
|
|
|
+ tfJitter.setBounds(160, 190, 130, 20);
|
|
|
editPanel.add(tfJitter);
|
|
|
tfJitter.setColumns(10);
|
|
|
tfJitter.setToolTipText(toolTipJitter);
|
|
|
|
|
|
JLabel lblJitterUnit = new JLabel("ms");
|
|
|
- lblJitterUnit.setBounds(270, 190, 50, 20);
|
|
|
+ lblJitterUnit.setBounds(300, 190, 50, 20);
|
|
|
editPanel.add(lblJitterUnit);
|
|
|
tfJitter.addFocusListener(this);
|
|
|
tfJitter.addActionListener(this);
|
|
@@ -258,13 +258,13 @@ public class PortEditorPanel extends JPanel
|
|
|
|
|
|
* minimum sizes of the panels
|
|
|
*/
|
|
|
- Dimension minimumSize = new Dimension(60, 50);
|
|
|
+ Dimension minimumSize = new Dimension(150, 60);
|
|
|
listScrollPane.setMinimumSize(minimumSize);
|
|
|
listScrollPane.setMaximumSize(minimumSize);
|
|
|
portsScrollPane.setMinimumSize(minimumSize);
|
|
|
|
|
|
|
|
|
- splitPane.setPreferredSize(new Dimension(380, 220));
|
|
|
+ splitPane.setPreferredSize(new Dimension(500, 240));
|
|
|
if(!toEdit.getPorts().isEmpty())
|
|
|
updateLabel(toEdit.getPorts().get(list.getSelectedIndex()));
|
|
|
}
|
|
@@ -333,6 +333,7 @@ public class PortEditorPanel extends JPanel
|
|
|
frame.getContentPane().add(portEditorPanel.getSplitPane());
|
|
|
|
|
|
frame.pack();
|
|
|
+ frame.revalidate();
|
|
|
frame.setVisible(true);
|
|
|
}
|
|
|
|