Changeset 1184 in josm for trunk/src/org


Ignore:
Timestamp:
2008-12-28T01:11:24+01:00 (16 years ago)
Author:
stoecker
Message:

save size of progressdialog. Close #1870

File:
1 edited

Legend:

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

    r1169 r1184  
    44import java.awt.Component;
    55import java.awt.GridBagLayout;
     6import java.awt.event.ComponentEvent;
     7import java.awt.event.ComponentListener;
    68
    79import javax.swing.BorderFactory;
     
    3739        setSize(Main.pref.getInteger("progressdialog.size",400),100);
    3840        setLocationRelativeTo(Main.parent);
     41        addComponentListener(new ComponentListener() {
     42            public void componentHidden(ComponentEvent e) {}
     43            public void componentMoved(ComponentEvent e) {}
     44            public void componentShown(ComponentEvent e) {}
     45            public void componentResized(ComponentEvent ev) {
     46               int w = getWidth();
     47               if(w > 200)
     48                   Main.pref.putInteger("progressdialog.size",w);
     49            }
     50        });
    3951    }
    4052}
Note: See TracChangeset for help on using the changeset viewer.