JAL-1517 source formatting
[jalview.git] / test / jalview / gui / JAL1353bugdemo.java
index 425a373..438a208 100644 (file)
@@ -54,7 +54,8 @@ public class JAL1353bugdemo
   public static void tearDownAfterClass() throws Exception
   {
   }
-  volatile boolean finish=false;
+
+  volatile boolean finish = false;
 
   @Test
   public void test()
@@ -62,85 +63,93 @@ public class JAL1353bugdemo
     Cache.initLogger();
     // final Desktop foo = new Desktop();
     final JFrame cfoo = new JFrame("Crash Java");
-    final JDesktopPane foo=new JDesktopPane();
-    foo.setPreferredSize(new Dimension(600,800));
+    final JDesktopPane foo = new JDesktopPane();
+    foo.setPreferredSize(new Dimension(600, 800));
     cfoo.setSize(600, 800);
     final JInternalFrame cont = new JInternalFrame("My Frame");
     JTextArea evt;
     cont.setPreferredSize(new Dimension(400, 300));
-    cont.add(evt=new JTextArea("Click here and drag text over this window to freeze java.\n\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\n"));
+    cont.add(evt = new JTextArea(
+            "Click here and drag text over this window to freeze java.\n\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\n"));
     cont.pack();
-    foo.add("A frame",cont);
+    foo.add("A frame", cont);
     foo.setVisible(true);
     foo.setEnabled(true);
     foo.doLayout();
     cfoo.add(foo);
     final JMenu jm = new JMenu("Do");
-    JMenuItem jmi=new JMenuItem("this");
+    JMenuItem jmi = new JMenuItem("this");
     jm.add(jmi);
     evt.addMouseListener(new MouseListener()
     {
-      
+
       @Override
       public void mouseReleased(MouseEvent e)
       {
       }
-      
+
       @Override
       public void mousePressed(MouseEvent e)
       {
         // TODO Auto-generated method stub
-        
+
       }
-      
+
       @Override
       public void mouseExited(MouseEvent e)
       {
         // TODO Auto-generated method stub
-        
+
       }
-      
+
       @Override
       public void mouseEntered(MouseEvent e)
       {
         // TODO Auto-generated method stub
-        
+
       }
-      
+
       @Override
       public void mouseClicked(MouseEvent e)
       {
-//        JFrame parent = new JFrame();
-//        parent.setBounds(foo.getBounds());
-//        JPanel oo = new JPanel();
-//        parent.add(oo);
-//        oo.setVisible(true);
-//        parent.setVisible(true);
-        EditNameDialog end =new EditNameDialog("Sequence Name", "Sequence Description","label 1", "Label 2", "Try and drag between the two text fields", foo);//);cont.getRootPane());
-        assert(end!=null);
-        finish=true;
+        // JFrame parent = new JFrame();
+        // parent.setBounds(foo.getBounds());
+        // JPanel oo = new JPanel();
+        // parent.add(oo);
+        // oo.setVisible(true);
+        // parent.setVisible(true);
+        EditNameDialog end = new EditNameDialog("Sequence Name",
+                "Sequence Description", "label 1", "Label 2",
+                "Try and drag between the two text fields", foo);// );cont.getRootPane());
+        assert (end != null);
+        finish = true;
       }
     });
     cont.setVisible(true);
 
     jmi.addActionListener(new ActionListener()
     {
-      
+
       @Override
       public void actionPerformed(ActionEvent arg0)
       {
-        EditNameDialog end =new EditNameDialog("Sequence Name", "Sequence Description","label 1", "Label 2", "Try and drag between the two text fields", cont);
-        assert(end!=null);
-        finish=true;
+        EditNameDialog end = new EditNameDialog("Sequence Name",
+                "Sequence Description", "label 1", "Label 2",
+                "Try and drag between the two text fields", cont);
+        assert (end != null);
+        finish = true;
       }
     });
     foo.setVisible(true);
     cfoo.setVisible(true);
     while (!finish)
     {
-      try {
+      try
+      {
         Thread.sleep(100);
-      } catch (InterruptedException x) {}
+      } catch (InterruptedException x)
+      {
+      }
     }
   }