r1781 - isis-fish/trunk/src/test/java/fr/ifremer/isisfish/entity
Author: chatellier Date: 2009-02-03 16:44:23 +0000 (Tue, 03 Feb 2009) New Revision: 1781 Modified: isis-fish/trunk/src/test/java/fr/ifremer/isisfish/entity/PopulationSeasonInfoTest.java Log: Cette fois c'est la bonne ;) Modified: isis-fish/trunk/src/test/java/fr/ifremer/isisfish/entity/PopulationSeasonInfoTest.java =================================================================== --- isis-fish/trunk/src/test/java/fr/ifremer/isisfish/entity/PopulationSeasonInfoTest.java 2009-02-03 16:38:30 UTC (rev 1780) +++ isis-fish/trunk/src/test/java/fr/ifremer/isisfish/entity/PopulationSeasonInfoTest.java 2009-02-03 16:44:23 UTC (rev 1781) @@ -103,37 +103,38 @@ final MatrixPanelEditor panel = new MatrixPanelEditor(false, 800, 300); panel.setMatrix(mat); - final JDialog dialog = new JDialog(); - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - try { - JOptionPane.showMessageDialog(dialog, panel,_("Spacialized visualisation"), JOptionPane.INFORMATION_MESSAGE); - } catch (HeadlessException he) { - if(log.isErrorEnabled()) { - log.error("No X11 display available", he); + try { + final JDialog dialog = new JDialog(); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + + JOptionPane.showMessageDialog(dialog, panel,_("Spacialized visualisation"), JOptionPane.INFORMATION_MESSAGE); + + } + }); + + Thread t = new Thread(new Runnable() { + public void run() { + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + // do nothing } + dialog.dispose(); } + }); + t.start(); + + // it would really be nice to wait the thread, otherwise the test + // means nothing!!! + t.join(); + } catch (HeadlessException he) { + if(log.isErrorEnabled()) { + log.error("No X11 display available", he); } - }); - Thread t = new Thread(new Runnable() { - public void run() { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - // do nothing - } - dialog.dispose(); - } - }); - t.start(); + } - // it would really be nice to wait the thread, otherwise the test - // means nothing!!! - t.join(); - - - System.out.println("end"); } @@ -180,35 +181,37 @@ box.add(panel); box.add(bigpanel); - final JDialog dialog = new JDialog(); - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - try { - JOptionPane.showMessageDialog(dialog, box, _("Spacialized visualisation"), JOptionPane.INFORMATION_MESSAGE); - } catch (HeadlessException he) { - if(log.isErrorEnabled()) { - log.error("No X11 display available", he); + try { + final JDialog dialog = new JDialog(); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + + JOptionPane.showMessageDialog(dialog, box, _("Spacialized visualisation"), JOptionPane.INFORMATION_MESSAGE); + + } + }); + + Thread t = new Thread(new Runnable() { + public void run() { + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + // do nothing } + dialog.dispose(); } + }); + t.start(); + + // it would really be nice to wait the thread, otherwise the test + // means nothing!!! + t.join(); + } catch (HeadlessException he) { + if(log.isErrorEnabled()) { + log.error("No X11 display available", he); } - }); - - Thread t = new Thread(new Runnable() { - public void run() { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - // do nothing - } - dialog.dispose(); - } - }); - t.start(); - - // it would really be nice to wait the thread, otherwise the test - // means nothing!!! - t.join(); + } System.out.println("end"); }
participants (1)
-
chatellierï¼ users.labs.libre-entreprise.org