Author: mvw
Date: 2007-06-22 23:32:17-0700
New Revision: 12900
Modified:
trunk/src_new/org/argouml/uml/reveng/Import.java
trunk/src_new/org/argouml/uml/ui/ActionImportFromSources.java
Log:
Remove a dependency from org.argouml.uml.reveng to org.argouml.uml.ui.
Modified: trunk/src_new/org/argouml/uml/reveng/Import.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/reveng/Import.java?view=diff&rev=12900&p1=trunk/src_new/org/argouml/uml/reveng/Import.java&p2=trunk/src_new/org/argouml/uml/reveng/Import.java&r1=12899&r2=12900
==============================================================================
--- trunk/src_new/org/argouml/uml/reveng/Import.java (original)
+++ trunk/src_new/org/argouml/uml/reveng/Import.java 2007-06-22 23:32:17-0700
@@ -26,6 +26,7 @@
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;
@@ -67,7 +68,6 @@
import org.argouml.moduleloader.ModuleInterface;
import org.argouml.taskmgmt.ProgressEvent;
import org.argouml.taskmgmt.ProgressMonitor;
-import org.argouml.ui.ArgoFrame;
import org.argouml.util.SuffixFilter;
import org.argouml.util.UIUtils;
import org.tigris.gef.base.Globals;
@@ -128,6 +128,8 @@
private ImportStatusScreen iss;
private StringBuffer problems = new StringBuffer();
+
+ private Frame myFrame;
@@ -140,24 +142,27 @@
/**
* Creates dialog window with chooser and configuration panel.
+ *
+ * @param frame the ui frame to display dialogs on
*/
- public Import() {
+ public Import(Frame frame) {
super();
+ myFrame = frame;
JComponent chooser = getChooser();
dialog =
- new JDialog(ArgoFrame.getInstance(),
+ new JDialog(frame,
Translator.localize("action.import-sources"), true);
dialog.getContentPane().add(chooser, BorderLayout.CENTER);
dialog.getContentPane().add(getConfigPanel(this), BorderLayout.EAST);
dialog.pack();
int x =
- (ArgoFrame.getInstance().getSize().width
+ (frame.getSize().width
- dialog.getSize().width)
/ 2;
int y =
- (ArgoFrame.getInstance().getSize().height
+ (frame.getSize().height
- dialog.getSize().height)
/ 2;
dialog.setLocation(x > 0 ? x : 0, y > 0 ? y : 0);
@@ -656,7 +661,7 @@
* @param iconName
*/
public ImportStatusScreen(String title, String iconName) {
- super(ArgoFrame.getInstance(), true);
+ super(myFrame, true);
if (title != null) {
setTitle(title);
}
@@ -872,6 +877,13 @@
private static final long serialVersionUID = -9221358976863603143L;
}
+ /**
+ * @return Returns the Frame.
+ */
+ public Frame getFrame() {
+ return myFrame;
+ }
+
}
@@ -1069,7 +1081,7 @@
}
});
- chooser.showOpenDialog(ArgoFrame.getInstance());
+ chooser.showOpenDialog(importProcess.getFrame());
}
}
Modified: trunk/src_new/org/argouml/uml/ui/ActionImportFromSources.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/ActionImportFromSources.java?view=diff&rev=12900&p1=trunk/src_new/org/argouml/uml/ui/ActionImportFromSources.java&p2=trunk/src_new/org/argouml/uml/ui/ActionImportFromSources.java&r1=12899&r2=12900
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/ActionImportFromSources.java (original)
+++ trunk/src_new/org/argouml/uml/ui/ActionImportFromSources.java 2007-06-22 23:32:17-0700
@@ -31,6 +31,7 @@
import org.argouml.application.helpers.ResourceLoaderWrapper;
import org.argouml.i18n.Translator;
+import org.argouml.ui.ArgoFrame;
import org.argouml.uml.reveng.Import;
import org.tigris.gef.undo.UndoableAction;
@@ -63,7 +64,7 @@
*/
public void actionPerformed(ActionEvent event) {
super.actionPerformed(event);
- new Import();
+ new Import(ArgoFrame.getInstance());
}
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.