svn commit: r14878 - trunk/src/argouml-app/src/org/argouml/uml/reveng: . java ui

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2008-06-06 13:27:34-0700
New Revision: 14878

Modified:
   trunk/src/argouml-app/src/org/argouml/uml/reveng/ExtendedImportInterface.java
   trunk/src/argouml-app/src/org/argouml/uml/reveng/Import.java
   trunk/src/argouml-app/src/org/argouml/uml/reveng/java/JavaImport.java
   trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java

Log:
remove java.awt.Component dependency

Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/ExtendedImportInterface.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/ExtendedImportInterface.java?view=diff&rev=14878&p1=trunk/src/argouml-app/src/org/argouml/uml/reveng/ExtendedImportInterface.java&p2=trunk/src/argouml-app/src/org/argouml/uml/reveng/ExtendedImportInterface.java&r1=14877&r2=14878
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/ExtendedImportInterface.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/ExtendedImportInterface.java	2008-06-06 13:27:34-0700
@@ -24,8 +24,6 @@
 
 package org.argouml.uml.reveng;
 
-import java.awt.Component;
-
 /**
  * An extended interface which identifies an ArgoUML plug-in which imports 
  * source language modules and creates UML model elements in our model.
@@ -46,8 +44,7 @@
      * extended import module functionality (e.g. displaying a classpath
      * dialog for JavaImport).
      * 
-     * @param component the visual component this is called from
      * @param importCmd the import command to invoke the import
      */
-    void invokeImport(Component component, ImportCommandInterface importCmd);
+    void invokeImport(ImportCommandInterface importCmd);
 }

Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/Import.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/Import.java?view=diff&rev=14878&p1=trunk/src/argouml-app/src/org/argouml/uml/reveng/Import.java&p2=trunk/src/argouml-app/src/org/argouml/uml/reveng/Import.java&r1=14877&r2=14878
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/Import.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/Import.java	2008-06-06 13:27:34-0700
@@ -25,40 +25,29 @@
 package org.argouml.uml.reveng;
 
 import java.awt.BorderLayout;
-import java.awt.Dimension;
 import java.awt.Frame;
-import java.awt.GridLayout;
-import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;
-import java.net.URL;
 import java.util.StringTokenizer;
 
 import javax.swing.ButtonGroup;
-import javax.swing.DefaultListModel;
-import javax.swing.JButton;
 import javax.swing.JCheckBox;
 import javax.swing.JComboBox;
 import javax.swing.JComponent;
 import javax.swing.JDialog;
 import javax.swing.JFileChooser;
 import javax.swing.JLabel;
-import javax.swing.JList;
 import javax.swing.JPanel;
 import javax.swing.JRadioButton;
-import javax.swing.JScrollPane;
 import javax.swing.JTabbedPane;
-import javax.swing.JTextArea;
 import javax.swing.JTextField;
 import javax.swing.filechooser.FileSystemView;
 
-import org.apache.log4j.Logger;
 import org.argouml.application.api.Argo;
 import org.argouml.configuration.Configuration;
 import org.argouml.i18n.Translator;
 import org.argouml.moduleloader.ModuleInterface;
-import org.argouml.uml.reveng.java.JavaImport;
 import org.argouml.uml.reveng.ui.ImportStatusScreen;
 import org.argouml.util.SuffixFilter;
 import org.argouml.util.UIUtils;
@@ -607,8 +596,7 @@
             if (theImport.getCurrentModule() instanceof ExtendedImportInterface) {
                 ExtendedImportInterface eii = (ExtendedImportInterface) theImport
                         .getCurrentModule();
-                eii.invokeImport(theImport.getFrame(), new ImportCommand(
-                        theImport));
+                eii.invokeImport(new ImportCommand(theImport));
             } else {
                 theImport.doFile();
             }

Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/java/JavaImport.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/java/JavaImport.java?view=diff&rev=14878&p1=trunk/src/argouml-app/src/org/argouml/uml/reveng/java/JavaImport.java&p2=trunk/src/argouml-app/src/org/argouml/uml/reveng/java/JavaImport.java&r1=14877&r2=14878
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/java/JavaImport.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/java/JavaImport.java	2008-06-06 13:27:34-0700
@@ -24,7 +24,6 @@
 
 package org.argouml.uml.reveng.java;
 
-import java.awt.Component;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
@@ -235,11 +234,10 @@
     }
 
     /**
-     * @see org.argouml.uml.reveng.ExtendedImportInterface#invokeImport(java.awt.Component, org.argouml.uml.reveng.ImportCommandInterface)
+     * @see org.argouml.uml.reveng.ExtendedImportInterface#invokeImport(org.argouml.uml.reveng.ImportCommandInterface)
      */
-    public void invokeImport(Component component,
-            ImportCommandInterface importCmd) {
-        new ImportClasspathDialog(component, importCmd);
+    public void invokeImport(ImportCommandInterface importCmd) {
+        new ImportClasspathDialog(importCmd);
     }
 
     /*

Modified: trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java?view=diff&rev=14878&p1=trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java&p2=trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java&r1=14877&r2=14878
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/reveng/ui/ImportClasspathDialog.java	2008-06-06 13:27:34-0700
@@ -1,8 +1,8 @@
 package org.argouml.uml.reveng.ui;
 
 import java.awt.BorderLayout;
-import java.awt.Component;
 import java.awt.Dimension;
+import java.awt.Frame;
 import java.awt.GridLayout;
 import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
@@ -47,22 +47,19 @@
     private JButton removeFile;
 
     private JButton ok;
-    
-    private Component parent;
 
     private ImportCommandInterface importCmd;
 
     /**
      * Construct a dialog to allow the user to set up the classpath for the
-     * import.
+     * import.<p>
+     * @param impCmd 
      */
-    public ImportClasspathDialog(Component comp,
-            ImportCommandInterface impCmd) {
+    public ImportClasspathDialog(ImportCommandInterface impCmd) {
 
         super();
         importClasspathDialog = this;
         setTitle(Translator.localize("dialog.import.classpath.title"));
-        parent = comp;
         importCmd = impCmd;
 
         Dimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();
@@ -224,7 +221,7 @@
                 }
             });
 
-            chooser.showOpenDialog(parent);
+            chooser.showOpenDialog(new Frame());
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.