diff options
author | Ben Burwell <ben.burwell@trifecta.com> | 2016-11-19 17:39:05 -0500 |
---|---|---|
committer | Ben Burwell <ben.burwell@trifecta.com> | 2016-11-19 17:39:05 -0500 |
commit | 9441ed331af3aa6b3ef45bf165e40faad18bc7fd (patch) | |
tree | e4f9155ccce81e3cb2145a41a68dacff6671950a /src/com/benburwell/planes/gui/TCPConnectionOptionDialog.java | |
parent | 4a7ae2831563622ebb4a1d893764afd0e0e0dfbe (diff) |
Use gradle
Diffstat (limited to 'src/com/benburwell/planes/gui/TCPConnectionOptionDialog.java')
-rw-r--r-- | src/com/benburwell/planes/gui/TCPConnectionOptionDialog.java | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/com/benburwell/planes/gui/TCPConnectionOptionDialog.java b/src/com/benburwell/planes/gui/TCPConnectionOptionDialog.java deleted file mode 100644 index 609a70a..0000000 --- a/src/com/benburwell/planes/gui/TCPConnectionOptionDialog.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.benburwell.planes.gui; - -import javax.swing.*; - -/** - * Created by ben on 11/17/16. - */ -public class TCPConnectionOptionDialog implements ViewComponent { - public static final String DEFAULT_HOSTNAME = "10.0.0.111"; - public static final int DEFAULT_TCP_PORT = 30003; - - private JPanel dialog = new JPanel(); - private JTextField hostField = new JTextField(10); - private JTextField portField = new JTextField(5); - private JLabel descriptionLabel = new JLabel("Add a network data source that provides data in the SBS-1 format"); - - @Override - public JComponent getComponent() { - // set properties - hostField.setText(DEFAULT_HOSTNAME); - hostField.setToolTipText("Hostname or IP address"); - - portField.setText(String.valueOf(DEFAULT_TCP_PORT)); - portField.setToolTipText("Port number"); - - // create layout - dialog.add(descriptionLabel); - dialog.add(hostField); - dialog.add(portField); - - return dialog; - } - - public String getHost() { - return this.hostField.getText(); - } - - public int getPort() { - try { - return Integer.valueOf(this.portField.getText()); - } catch (NumberFormatException e) { - return DEFAULT_TCP_PORT; - } - } -} |