]> git.mxchange.org Git - flightgear.git/commitdiff
#718: java client example not compiling
authorThorstenB <brehmt@gmail.com>
Tue, 27 Mar 2012 19:06:29 +0000 (21:06 +0200)
committerThorstenB <brehmt@gmail.com>
Tue, 27 Mar 2012 19:06:29 +0000 (21:06 +0200)
Util.java was added to the repo commenting "Half-finished utility class.".
No more progress since (10 years!), so just exclude the file from the
java build by changing its extension.

scripts/java/FGClient/src/org/flightgear/fgfsclient/Util._java_ [new file with mode: 0644]
scripts/java/FGClient/src/org/flightgear/fgfsclient/Util.java [deleted file]

diff --git a/scripts/java/FGClient/src/org/flightgear/fgfsclient/Util._java_ b/scripts/java/FGClient/src/org/flightgear/fgfsclient/Util._java_
new file mode 100644 (file)
index 0000000..684b762
--- /dev/null
@@ -0,0 +1,70 @@
+package org.flightgear.fgfsclient;
+
+import java.io.IOException;
+
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JTextField;
+
+
+public final class Util
+{
+
+    public static void forceConnection (JFrame frame, final FGFSConnection fgfs)
+    {
+       while (!fgfs.isConnected()) {
+           final JDialog dialog =
+               new JDialog(frame, "Connect to FlightGear", true);
+           dialog.getContentPane().setLayout(new GridLayout(3, 2));
+           dialog.getContentPane().add(new JLabel("Host:"));
+
+           final JTextField hostField = new JTextField(20);
+           hostField.setText(fgfs.getHost());
+           dialog.getContentPane().add(hostField);
+
+           dialog.getContentPane().add(new JLabel("Port:"));
+
+           final JTextField portField = new JTextField(5);
+           portField.setText(Integer.toString(fgfs.getPort()));
+           dialog.getContentPane().add(portField);
+
+           JButton connectButton = new JButton("Connect");
+           connectButton.addActionListener(new ActionListener() {
+               public void actionPerformed (ActionEvent ev)
+               {
+                   try {
+                       fgfs.open(hostField.getText(),
+                                 Integer.parseInt(portField.getText()));
+                   } catch (IOException ex) {
+                       JOptionPane.showMessageDialog(dialog, ex.getMessage(),
+                                                     "Alert", JOptionPane.ERROR_MESSAGE);
+                   }
+                   dialog.hide();
+               }
+           });
+           dialog.getContentPane().add(connectButton);
+           dialog.getRootPane().setDefaultButton(connectButton);
+
+           JButton quitButton = new JButton("Quit");
+           quitButton.addActionListener(new ActionListener() {
+               public void actionPerformed (ActionEvent ev)
+               {
+                   System.exit(0); // FIXME
+               }
+           });
+           dialog.getContentPane().add(quitButton);
+
+           dialog.pack();
+           dialog.show();
+           
+       }
+    }
+
+}
diff --git a/scripts/java/FGClient/src/org/flightgear/fgfsclient/Util.java b/scripts/java/FGClient/src/org/flightgear/fgfsclient/Util.java
deleted file mode 100644 (file)
index 684b762..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.flightgear.fgfsclient;
-
-import java.io.IOException;
-
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JFrame;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JTextField;
-
-
-public final class Util
-{
-
-    public static void forceConnection (JFrame frame, final FGFSConnection fgfs)
-    {
-       while (!fgfs.isConnected()) {
-           final JDialog dialog =
-               new JDialog(frame, "Connect to FlightGear", true);
-           dialog.getContentPane().setLayout(new GridLayout(3, 2));
-           dialog.getContentPane().add(new JLabel("Host:"));
-
-           final JTextField hostField = new JTextField(20);
-           hostField.setText(fgfs.getHost());
-           dialog.getContentPane().add(hostField);
-
-           dialog.getContentPane().add(new JLabel("Port:"));
-
-           final JTextField portField = new JTextField(5);
-           portField.setText(Integer.toString(fgfs.getPort()));
-           dialog.getContentPane().add(portField);
-
-           JButton connectButton = new JButton("Connect");
-           connectButton.addActionListener(new ActionListener() {
-               public void actionPerformed (ActionEvent ev)
-               {
-                   try {
-                       fgfs.open(hostField.getText(),
-                                 Integer.parseInt(portField.getText()));
-                   } catch (IOException ex) {
-                       JOptionPane.showMessageDialog(dialog, ex.getMessage(),
-                                                     "Alert", JOptionPane.ERROR_MESSAGE);
-                   }
-                   dialog.hide();
-               }
-           });
-           dialog.getContentPane().add(connectButton);
-           dialog.getRootPane().setDefaultButton(connectButton);
-
-           JButton quitButton = new JButton("Quit");
-           quitButton.addActionListener(new ActionListener() {
-               public void actionPerformed (ActionEvent ev)
-               {
-                   System.exit(0); // FIXME
-               }
-           });
-           dialog.getContentPane().add(quitButton);
-
-           dialog.pack();
-           dialog.show();
-           
-       }
-    }
-
-}