Changeset 20956 in osm for applications/editors/josm


Ignore:
Timestamp:
2010-04-21T19:32:43+02:00 (15 years ago)
Author:
lambertus
Message:

josm terracer plugin: put focus on first input field when the dialog is started

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java

    r19658 r20956  
    2929import javax.swing.JTextArea;
    3030import javax.swing.JTextField;
     31import javax.swing.SwingUtilities;
    3132
    3233import org.openstreetmap.josm.Main;
     
    100101        this.setTitle(tr("Terrace a house"));
    101102        getJContentPane();
     103        SwingUtilities.invokeLater(new Runnable() { public void run() { lo.requestFocus(); } } );
    102104        this.pack();
    103105        this.setLocationRelativeTo(Main.parent);
     
    125127            jContentPane.add(getInputPanel(), jContentPane);
    126128            jContentPane.add(getButtonPanel(), jContentPane);
    127 
    128129        }
    129130        return jContentPane;
     
    143144            streetLabel = new JLabel();
    144145            streetLabel.setText(tr("Street"));
    145             hiLabel = new JLabel();
    146             hiLabel.setText(tr("Highest Number"));
    147146            loLabel = new JLabel();
    148147            loLabel.setText(tr("Lowest Number"));
    149148            loLabel.setPreferredSize(new Dimension(111, 16));
    150149            loLabel.setToolTipText(tr("Lowest housenumber of the terraced house"));
     150            hiLabel = new JLabel();
     151            hiLabel.setText(tr("Highest Number"));
    151152            final String txt = relationExists ? tr("add to existing associatedStreet relation") : tr("create an associatedStreet relation");
    152153            handleRelationCheckBox = new JCheckBox(txt, Main.pref.getBoolean(HANDLE_RELATION, true));
     
    199200            lo = new JTextField();
    200201            lo.setText("");
     202            lo.requestFocus();
    201203        }
    202204        return lo;
Note: See TracChangeset for help on using the changeset viewer.