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


Ignore:
Timestamp:
2009-08-23T23:00:18+02:00 (15 years ago)
Author:
Gubaer
Message:

fixing ToggleDialog - now uses a JDialog instead of a JFrame. Should make setAlwaysOnTop() obsolete.

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java

    r1987 r1992  
    11package org.openstreetmap.josm.gui;
    2 
    3 import static org.openstreetmap.josm.tools.I18n.tr;
    42
    53import java.awt.Component;
     
    2119import javax.swing.KeyStroke;
    2220
    23 import org.openstreetmap.josm.Main;
    2421import org.openstreetmap.josm.tools.GBC;
    2522import org.openstreetmap.josm.tools.ImageProvider;
     
    4441     */
    4542    public ExtendedDialog(Component parent, String title, Component content, String[] buttonTexts, String[] buttonIcons) {
    46         super(JOptionPane.getFrameForComponent(parent), title, true);
     43        super(JOptionPane.getFrameForComponent(parent), title, true /* modal */);
    4744        this.parent = parent;
    4845        bTexts = buttonTexts;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r1987 r1992  
    2323import javax.swing.Box;
    2424import javax.swing.JButton;
     25import javax.swing.JDialog;
    2526import javax.swing.JFrame;
    2627import javax.swing.JLabel;
     28import javax.swing.JOptionPane;
    2729import javax.swing.JPanel;
    2830import javax.swing.ImageIcon;
     
    162164        stickyActionListener = new ActionListener(){
    163165            public void actionPerformed(ActionEvent e) {
    164                 final JFrame f = new JFrame(name);
     166                final JDialog f = new JDialog(JOptionPane.getFrameForComponent(Main.parent),false /* not modal*/);
    165167                parent.remove(ToggleDialog.this);
    166168                f.getContentPane().add(ToggleDialog.this);
Note: See TracChangeset for help on using the changeset viewer.