Revision: 6704
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=6704&view=rev
Author: gerdwagner
Date: 2012-10-29 21:51:34 +0000 (Mon, 29 Oct 2012)
Log Message:
-----------
Detached Windows --> Made Dialogs appear above the right window
Modified Paths:
--------------
trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/datasetviewer/DataSetViewerEditableTablePanel.java
Modified: trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/datasetviewer/DataSetViewerEditableTablePanel.java
===================================================================
--- trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/datasetviewer/DataSetViewerEditableTablePanel.java 2012-10-28 14:44:05 UTC (rev 6703)
+++ trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/datasetviewer/DataSetViewerEditableTablePanel.java 2012-10-29 21:51:34 UTC (rev 6704)
@@ -19,6 +19,7 @@
*/
import net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.CellComponentFactory;
+import net.sourceforge.squirrel_sql.fw.gui.GUIUtils;
import net.sourceforge.squirrel_sql.fw.gui.SortableTableModel;
import net.sourceforge.squirrel_sql.fw.gui.TablePopupMenu;
import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
@@ -215,7 +216,7 @@
// user gives a response). This is critical since this function provides
// a return value to its caller that depends on the user input.
// i18n[baseDataSetViewerDestination.warning=Warning]
- int option = JOptionPane.showConfirmDialog(null, message, s_stringMgr.getString("baseDataSetViewerDestination.warning"),
+ int option = JOptionPane.showConfirmDialog(GUIUtils.getOwningFrame(getComponent()), message, s_stringMgr.getString("baseDataSetViewerDestination.warning"),
JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if ( option != JOptionPane.YES_OPTION)
{
@@ -235,7 +236,7 @@
// user gives a response). This is critical since this function provides
// a return value to its caller that depends on the user input.
// i18n[baseDataSetViewerDestination.warning2=Warning]
- int option = JOptionPane.showConfirmDialog(null, message, s_stringMgr.getString("baseDataSetViewerDestination.warning2"),
+ int option = JOptionPane.showConfirmDialog(GUIUtils.getOwningFrame(getComponent()), message, s_stringMgr.getString("baseDataSetViewerDestination.warning2"),
JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if ( option != JOptionPane.YES_OPTION)
{
@@ -256,7 +257,7 @@
if (message != null) {
// tell user that there was a problem
// i18n[baseDataSetViewerDestination.error=Error]
- JOptionPane.showMessageDialog(null, message, s_stringMgr.getString("baseDataSetViewerDestination.error"),
+ JOptionPane.showMessageDialog(GUIUtils.getOwningFrame(getComponent()), message, s_stringMgr.getString("baseDataSetViewerDestination.error"),
JOptionPane.ERROR_MESSAGE);
// tell caller that the underlying data was not updated
@@ -297,7 +298,7 @@
// The list of rows may be empty, in which case
// we tell user they should select something first
if (rows.length == 0) {
- JOptionPane.showMessageDialog(null,
+ JOptionPane.showMessageDialog(GUIUtils.getOwningFrame(getComponent()),
// i18n[dataSetViewerEditableTablePanel.selectionNeeded=You must select something in the table to delete.]
s_stringMgr.getString("dataSetViewerEditableTablePanel.selectionNeeded"));
return;
@@ -309,7 +310,7 @@
// Non-empty set of rows to delete. Make sure user wants to delete
int option = JOptionPane.showConfirmDialog(
- null,
+ GUIUtils.getOwningFrame(getComponent()),
msg,
// i18n[dataSetViewerEditableTablePanel.warning=Warning]
s_stringMgr.getString("dataSetViewerEditableTablePanel.warning"),
@@ -346,7 +347,7 @@
if (message != null)
{
// tell user that there was a problem
- JOptionPane.showMessageDialog(null,
+ JOptionPane.showMessageDialog(GUIUtils.getOwningFrame(getComponent()),
// i18n[dataSetViewerEditableTablePanel.noRowsDeleted={0}\nNo rows deleted from database.]
s_stringMgr.getString("dataSetViewerEditableTablePanel.noRowsDeleted", message),
// i18n[dataSetViewerEditableTablePanel.error=Error]
@@ -449,7 +450,7 @@
if (message != null) {
// there was a problem inserting into the DB
- JOptionPane.showMessageDialog(null,
+ JOptionPane.showMessageDialog(GUIUtils.getOwningFrame(getComponent()),
// i18n[dataSetViewereditableTablePanel.error2=Error]
message, s_stringMgr.getString("dataSetViewereditableTablePanel.error2"),
JOptionPane.ERROR_MESSAGE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|