Changeset 1861 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2009-07-27T18:50:48+02:00 (15 years ago)
Author:
Gubaer
Message:

added diagnostic messages for #3109 - window order generally messed up?

Location:
trunk/src/org/openstreetmap/josm
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java

    r1847 r1861  
    6565        final JDialog dlg = optionPane.createDialog(Main.parent, tr("Rename layer"));
    6666        dlg.setModal(true);
    67         dlg.setAlwaysOnTop(true);
     67        try {
     68            dlg.setAlwaysOnTop(true);
     69        } catch(SecurityException ex) {
     70            System.out.println(tr("Warning: failed to put a dialog always on top. Exception was: {0}", ex.toString()));
     71        }
    6872        dlg.toFront();
    6973        dlg.setVisible(true);
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r1856 r1861  
    11package org.openstreetmap.josm.gui;
     2
     3import static org.openstreetmap.josm.tools.I18n.tr;
    24
    35import java.awt.Component;
     
    6567        bTexts = buttonTexts;
    6668        setupDialog(lbl, buttonIcons);
    67         setAlwaysOnTop(true);
     69        try {
     70            setAlwaysOnTop(true);
     71        } catch(SecurityException e) {
     72            System.out.println(tr("Warning: failed to put extended dialog always on top. Exception was: {0}", e.toString()));
     73        }
    6874        setVisible(true);
    6975    }
  • trunk/src/org/openstreetmap/josm/gui/OptionPaneUtil.java

    r1838 r1861  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.awt.Component;
     
    3840     */
    3941    static protected void prepareDialog(JDialog dialog) {
    40         dialog.setAlwaysOnTop(true);
     42        try {
     43            dialog.setAlwaysOnTop(true);
     44        } catch(SecurityException e) {
     45            System.out.println(tr("Warning: failed to put option pane dialog always on top. Exception was: {0}", e.toString()));
     46        }
    4147        dialog.setModal(true);
    4248        dialog.toFront();
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java

    r1856 r1861  
    11// License: GPL. Copyright 2007 by Immanuel Scholz and others
    22package org.openstreetmap.josm.gui;
     3
     4import static org.openstreetmap.josm.tools.I18n.tr;
    35
    46import java.awt.Dialog;
     
    5658        // and all the other windows (relation editors, detached dialogs, etc.)
    5759        //
    58         setAlwaysOnTop(true);
     60        try {
     61            setAlwaysOnTop(true);
     62        } catch(SecurityException e) {
     63            System.out.println(tr("Warning: failed to put ''please wait dialog'' always on top. Exception was: {0}", e.toString()));
     64        }
    5965    }
    6066
  • trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java

    r1843 r1861  
    200200        };
    201201        final JDialog dlg = optionPane.createDialog(Main.parent, tr("Change values?"));
    202         dlg.setAlwaysOnTop(true);
     202        try {
     203            dlg.setAlwaysOnTop(true);
     204        } catch(SecurityException e) {
     205            System.out.println(tr("Warning: failed to put properties dialog always on top. Exception was: {0}", e.toString()));
     206        }
    203207        dlg.toFront();
    204208
     
    343347        };
    344348        JDialog dialog = pane.createDialog(Main.parent, tr("Change values?"));
    345         dialog.setAlwaysOnTop(true);
     349        try {
     350            dialog.setAlwaysOnTop(true);
     351        } catch(SecurityException e) {
     352            System.out.println(tr("Warning: failed to put dialog always on top. Exception was: {0}", e.toString()));
     353        }
    346354        dialog.toFront();
    347355        dialog.setVisible(true);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r1750 r1861  
    163163            public void actionPerformed(ActionEvent e) {
    164164                final JFrame f = new JFrame(name);
    165                 try {f.setAlwaysOnTop(true);} catch (SecurityException e1) {}
     165                try {f.setAlwaysOnTop(true);}
     166                catch (SecurityException e1) {
     167                    System.out.println(tr("Warning: failed to put toggle dialog always on top. Exception was: {0}", e1.toString()));
     168                }
    166169                parent.remove(ToggleDialog.this);
    167170                f.getContentPane().add(ToggleDialog.this);
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java

    r1709 r1861  
    6969    public HistoryBrowserDialog(History history) {
    7070        super(JOptionPane.getFrameForComponent(Main.parent), false);
    71         setAlwaysOnTop(true);
     71        try {
     72            setAlwaysOnTop(true);
     73        } catch(SecurityException e) {
     74            System.out.println(tr("Warning: failed to put history browser always on top. Exception was: {0}", e.toString()));
     75        }
    7276        build();
    7377        setHistory(history);
Note: See TracChangeset for help on using the changeset viewer.