/***
 * Image/J Plugins
 * Copyright (C) 2002-2008 Jarek Sacha
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Latest release available at http://sourceforge.net/projects/ij-plugins/
 */
package net.sf.ij_plugins.grow;

import ij.plugin.PlugIn;

import javax.swing.*;


/**
 * Date: Feb 8, 2008
 * Time: 8:47:19 PM
 *
 * @author Jarek Sacha
 */
public final class RegionGrowingPlugIn implements PlugIn {

    private static final String TITLE = "Seeded Region Growing";

    private static RegionGrowingView view;
    private static JFrame frame;

    public void run(String arg) {
        if (view == null) {
            view = new RegionGrowingView();
            frame = new JFrame();
            frame.setTitle(TITLE);
            frame.getContentPane().add(view);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
        }

        frame.setVisible(true);
    }
}

@@ -928,24 +928,39 @@
 ns.grow;%0D%0A%0D%0A
+import ij.IJ;%0D%0A
 import ij.pl
@@ -1281,19 +1281,21 @@
 ic J
-Frame frame
+Dialog dialog
 ;%0D%0A%0D
@@ -1420,21 +1420,22 @@
     
-frame
+dialog
  = new J
 Fram
@@ -1434,50 +1434,45 @@
 ew J
-Frame();%0D%0A            frame.setTitle(TITLE
+Dialog(IJ.getInstance(), TITLE, false
 );%0D%0A
@@ -1483,21 +1483,22 @@
         
-frame
+dialog
 .getCont
@@ -1531,21 +1531,22 @@
         
-frame
+dialog
 .pack();
@@ -1555,29 +1555,30 @@
             
-frame
+dialog
 .setLocation
@@ -1604,29 +1604,30 @@
             
-frame
+dialog
 .setDefaultC
@@ -1689,13 +1689,14 @@
     
-frame
+dialog
 .set

Use dialog instead of frame so application icon can be used.