Changeset 16075 in josm


Ignore:
Timestamp:
2020-03-08T12:37:01+01:00 (4 years ago)
Author:
simon04
Message:

fix #18885 - AdvancedChangesetQueryPanel: select checkbox/radio-button when clicking its label

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java

    r12846 r16075  
    1616
    1717import org.openstreetmap.josm.gui.util.GuiHelper;
    18 import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    1918import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
    2019import org.openstreetmap.josm.io.ChangesetQuery;
    2120import org.openstreetmap.josm.spi.preferences.Config;
     21import org.openstreetmap.josm.tools.GBC;
    2222
    2323/**
     
    2727public class AdvancedChangesetQueryPanel extends JPanel {
    2828
    29     private final JCheckBox cbUserRestriction = new JCheckBox();
    30     private final JCheckBox cbOpenAndCloseRestrictions = new JCheckBox();
    31     private final JCheckBox cbTimeRestrictions = new JCheckBox();
    32     private final JCheckBox cbBoundingBoxRestriction = new JCheckBox();
     29    private final JCheckBox cbUserRestriction = new JCheckBox(tr("Select changesets owned by specific users"));
     30    private final JCheckBox cbOpenAndCloseRestrictions = new JCheckBox(tr("Select changesets depending on whether they are open or closed"));
     31    private final JCheckBox cbTimeRestrictions = new JCheckBox(tr("Select changesets based on the date/time they have been created or closed"));
     32    private final JCheckBox cbBoundingBoxRestriction = new JCheckBox(tr("Select only changesets related to a specific bounding box"));
    3333    private final UserRestrictionPanel pnlUserRestriction = new UserRestrictionPanel();
    3434    private final OpenAndCloseStateRestrictionPanel pnlOpenAndCloseRestriction = new OpenAndCloseStateRestrictionPanel();
     
    4747        JPanel pnl = new VerticallyScrollablePanel(new GridBagLayout());
    4848        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    49         GridBagConstraints gc = new GridBagConstraints();
     49        GridBagConstraints gc = GBC.eol().fill(GridBagConstraints.HORIZONTAL);
    5050
    5151        // -- select changesets by a specific user
    5252        //
    53         gc.anchor = GridBagConstraints.NORTHWEST;
    54         gc.weightx = 0.0;
    55         gc.fill = GridBagConstraints.HORIZONTAL;
    5653        pnl.add(cbUserRestriction, gc);
    5754        cbUserRestriction.addItemListener(stateChangeHandler);
    58 
    59         gc.gridx = 1;
    60         gc.weightx = 1.0;
    61         pnl.add(new JMultilineLabel(tr("Select changesets owned by specific users")), gc);
    62 
    63         gc.gridy = 1;
    64         gc.gridx = 1;
    65         gc.weightx = 1.0;
    6655        pnl.add(pnlUserRestriction, gc);
    6756
    6857        // -- restricting the query to open and closed changesets
    6958        //
    70         gc.gridy = 2;
    71         gc.gridx = 0;
    72         gc.anchor = GridBagConstraints.NORTHWEST;
    73         gc.weightx = 0.0;
    74         gc.fill = GridBagConstraints.HORIZONTAL;
    7559        pnl.add(cbOpenAndCloseRestrictions, gc);
    7660        cbOpenAndCloseRestrictions.addItemListener(stateChangeHandler);
    77 
    78         gc.gridx = 1;
    79         gc.weightx = 1.0;
    80         pnl.add(new JMultilineLabel(tr("Select changesets depending on whether they are open or closed")), gc);
    81 
    82         gc.gridy = 3;
    83         gc.gridx = 1;
    84         gc.weightx = 1.0;
    8561        pnl.add(pnlOpenAndCloseRestriction, gc);
    8662
    8763        // -- restricting the query to a specific time
    8864        //
    89         gc.gridy = 4;
    90         gc.gridx = 0;
    91         gc.anchor = GridBagConstraints.NORTHWEST;
    92         gc.weightx = 0.0;
    93         gc.fill = GridBagConstraints.HORIZONTAL;
    9465        pnl.add(cbTimeRestrictions, gc);
    9566        cbTimeRestrictions.addItemListener(stateChangeHandler);
    96 
    97         gc.gridx = 1;
    98         gc.weightx = 1.0;
    99         pnl.add(new JMultilineLabel(tr("Select changesets based on the date/time they have been created or closed")), gc);
    100 
    101         gc.gridy = 5;
    102         gc.gridx = 1;
    103         gc.weightx = 1.0;
    10467        pnl.add(pnlTimeRestriction, gc);
    10568
     
    10770        // -- restricting the query to a specific bounding box
    10871        //
    109         gc.gridy = 6;
    110         gc.gridx = 0;
    111         gc.anchor = GridBagConstraints.NORTHWEST;
    112         gc.weightx = 0.0;
    113         gc.fill = GridBagConstraints.HORIZONTAL;
    11472        pnl.add(cbBoundingBoxRestriction, gc);
    11573        cbBoundingBoxRestriction.addItemListener(stateChangeHandler);
    116 
    117         gc.gridx = 1;
    118         gc.weightx = 1.0;
    119         pnl.add(new JMultilineLabel(tr("Select only changesets related to a specific bounding box")), gc);
    120 
    121         gc.gridy = 7;
    122         gc.gridx = 1;
    123         gc.weightx = 1.0;
    12474        pnl.add(pnlBoundingBoxRestriction, gc);
    12575
    126 
    127         gc.gridy = 8;
    128         gc.gridx = 0;
    129         gc.gridwidth = 2;
    130         gc.fill = GridBagConstraints.BOTH;
    131         gc.weightx = 1.0;
    132         gc.weighty = 1.0;
    13376        pnl.add(new JPanel(), gc);
    13477
     
    231174    class RestrictionGroupStateChangeHandler implements ItemListener {
    232175        protected void userRestrictionStateChanged() {
    233             if (pnlUserRestriction == null)
    234                 return;
    235176            pnlUserRestriction.setVisible(cbUserRestriction.isSelected());
    236177        }
    237178
    238179        protected void openCloseRestrictionStateChanged() {
    239             if (pnlOpenAndCloseRestriction == null)
    240                 return;
    241180            pnlOpenAndCloseRestriction.setVisible(cbOpenAndCloseRestrictions.isSelected());
    242181        }
    243182
    244183        protected void timeRestrictionsStateChanged() {
    245             if (pnlTimeRestriction == null)
    246                 return;
    247184            pnlTimeRestriction.setVisible(cbTimeRestrictions.isSelected());
    248185        }
    249186
    250187        protected void boundingBoxRestrictionChanged() {
    251             if (pnlBoundingBoxRestriction == null)
    252                 return;
    253188            pnlBoundingBoxRestriction.setVisible(cbBoundingBoxRestriction.isSelected());
    254189        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java

    r14214 r16075  
    1010import java.awt.event.ItemEvent;
    1111import java.awt.event.ItemListener;
    12 import java.awt.event.MouseAdapter;
    13 import java.awt.event.MouseEvent;
    1412import java.util.EnumMap;
    1513import java.util.Map;
     
    2624import org.openstreetmap.josm.gui.MapView;
    2725import org.openstreetmap.josm.gui.widgets.HtmlPanel;
    28 import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    2926import org.openstreetmap.josm.io.ChangesetQuery;
    3027import org.openstreetmap.josm.spi.preferences.Config;
     28import org.openstreetmap.josm.tools.GBC;
    3129import org.openstreetmap.josm.tools.Logging;
    3230
     
    4745
    4846    private transient Map<BasicQuery, JRadioButton> rbQueries;
    49     private transient Map<BasicQuery, JMultilineLabel> lblQueries;
    5047    private JCheckBox cbMyChangesetsOnly;
    5148
     
    5552        ButtonGroup bgQueries = new ButtonGroup();
    5653        rbQueries = new EnumMap<>(BasicQuery.class);
    57         lblQueries = new EnumMap<>(BasicQuery.class);
    5854        SelectQueryHandler selectedQueryHandler = new SelectQueryHandler();
    5955        for (BasicQuery q: BasicQuery.values()) {
     
    6258            rbQueries.put(q, rb);
    6359            bgQueries.add(rb);
    64             JMultilineLabel lbl = new JMultilineLabel("");
    65             lbl.addMouseListener(new MouseAdapter() {
    66                 @Override
    67                 public void mouseClicked(MouseEvent e) {
    68                     if (rb.isEnabled()) {
    69                         rb.setSelected(true);
    70                     }
    71                 }
    72             });
    73             lblQueries.put(q, lbl);
    74         }
    75 
    76         GridBagConstraints gc = new GridBagConstraints();
     60        }
     61
     62        GridBagConstraints gc = GBC.eop().fill(GridBagConstraints.HORIZONTAL);
    7763        // -- most recent changes
    78         gc.fill = GridBagConstraints.NONE;
    79         gc.anchor = GridBagConstraints.NORTHWEST;
    80         gc.insets = new Insets(0, 0, 5, 3);
    8164        pnl.add(rbQueries.get(BasicQuery.MOST_RECENT_CHANGESETS), gc);
    8265
    83         gc.gridx = 1;
    84         gc.fill = GridBagConstraints.HORIZONTAL;
    85         gc.weightx = 1.0;
    86         pnl.add(lblQueries.get(BasicQuery.MOST_RECENT_CHANGESETS), gc);
    87 
    8866        // -- most recent changes
    89         gc.gridx = 0;
    90         gc.gridy = 1;
    91         gc.fill = GridBagConstraints.NONE;
    92         gc.weightx = 0.0;
    9367        pnl.add(rbQueries.get(BasicQuery.MY_OPEN_CHANGESETS), gc);
    9468
    95         gc.gridx = 1;
    96         gc.fill = GridBagConstraints.HORIZONTAL;
    97         gc.weightx = 1.0;
    98         pnl.add(lblQueries.get(BasicQuery.MY_OPEN_CHANGESETS), gc);
    99 
    10069        // -- changesets in map view
    101         gc.gridx = 0;
    102         gc.gridy = 2;
    103         gc.fill = GridBagConstraints.NONE;
    104         gc.weightx = 0.0;
    10570        pnl.add(rbQueries.get(BasicQuery.CHANGESETS_IN_MAP_VIEW), gc);
    10671
    107         gc.gridx = 1;
    108         gc.fill = GridBagConstraints.HORIZONTAL;
    109         gc.weightx = 1.0;
    110         pnl.add(lblQueries.get(BasicQuery.CHANGESETS_IN_MAP_VIEW), gc);
    111 
    11272        // -- checkbox my changesets only
    113         gc.gridx = 0;
    114         gc.gridy = 3;
    11573        gc.gridwidth = 2;
    11674        gc.insets = new Insets(5, 0, 3, 3);
    117         gc.fill = GridBagConstraints.HORIZONTAL;
    118         gc.weightx = 1.0;
    11975        cbMyChangesetsOnly = new JCheckBox(tr("Download my changesets only"));
    12076        pnl.add(cbMyChangesetsOnly, gc);
     
    12379
    12480        // grab remaining space
    125         gc.gridx = 0;
    126         gc.gridy = 4;
    127         gc.gridwidth = 2;
    128         gc.insets = new Insets(5, 0, 3, 3);
    129         gc.fill = GridBagConstraints.BOTH;
    130         gc.weightx = 1.0;
    131         gc.weighty = 1.0;
    132         pnl.add(new JPanel(), gc);
     81        pnl.add(new JPanel(), GBC.eol().insets(5, 0, 3, 3).fill());
    13382
    13483        return pnl;
     
    163112     */
    164113    public void init() {
    165         JMultilineLabel lbl = lblQueries.get(BasicQuery.MOST_RECENT_CHANGESETS);
     114        JRadioButton lbl = rbQueries.get(BasicQuery.MOST_RECENT_CHANGESETS);
    166115        lbl.setText(tr("<html>Download the latest changesets</html>"));
    167116
    168117        // query for open changesets only possible if we have a current user which is at least
    169118        // partially identified
    170         lbl = lblQueries.get(BasicQuery.MY_OPEN_CHANGESETS);
     119        lbl = rbQueries.get(BasicQuery.MY_OPEN_CHANGESETS);
    171120        if (UserIdentityManager.getInstance().isAnonymous()) {
    172121            rbQueries.get(BasicQuery.MY_OPEN_CHANGESETS).setEnabled(false);
     
    179128
    180129        // query for changesets in the current map view only if there *is* a current map view
    181         lbl = lblQueries.get(BasicQuery.CHANGESETS_IN_MAP_VIEW);
     130        lbl = rbQueries.get(BasicQuery.CHANGESETS_IN_MAP_VIEW);
    182131        if (!MainApplication.isDisplayingMapView()) {
    183132            rbQueries.get(BasicQuery.CHANGESETS_IN_MAP_VIEW).setEnabled(false);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java

    r15714 r16075  
    154154                    WindowGeometry.centerInWindow(
    155155                            getParent(),
    156                             new Dimension(400, 400)
     156                            new Dimension(600, 400)
    157157                    )
    158158            ).applySafe(this);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/OpenAndCloseStateRestrictionPanel.java

    r12846 r16075  
    1313import javax.swing.JRadioButton;
    1414
    15 import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    1615import org.openstreetmap.josm.io.ChangesetQuery;
    1716import org.openstreetmap.josm.spi.preferences.Config;
     17import org.openstreetmap.josm.tools.GBC;
    1818
    1919/**
     
    2727    private static final String PREF_QUERY_TYPE = PREF_ROOT + ".query-type";
    2828
    29     private final JRadioButton rbOpenOnly = new JRadioButton();
    30     private final JRadioButton rbClosedOnly = new JRadioButton();
    31     private final JRadioButton rbBoth = new JRadioButton();
     29    private final JRadioButton rbOpenOnly = new JRadioButton(tr("Query open changesets only"));
     30    private final JRadioButton rbClosedOnly = new JRadioButton(tr("Query closed changesets only"));
     31    private final JRadioButton rbBoth = new JRadioButton(tr("Query both open and closed changesets"));
    3232
    3333    /**
     
    4747                )
    4848        ));
    49         GridBagConstraints gc = new GridBagConstraints();
    50         gc.anchor = GridBagConstraints.NORTHWEST;
    51         gc.fill = GridBagConstraints.HORIZONTAL;
    52         gc.weightx = 0.0;
     49        GridBagConstraints gc = GBC.eol().fill(GridBagConstraints.HORIZONTAL);
    5350        add(rbOpenOnly, gc);
    54 
    55         gc.gridx = 1;
    56         gc.weightx = 1.0;
    57         add(new JMultilineLabel(tr("Query open changesets only")), gc);
    58 
    59         gc.gridy = 1;
    60         gc.gridx = 0;
    61         gc.weightx = 0.0;
    6251        add(rbClosedOnly, gc);
    63 
    64         gc.gridx = 1;
    65         gc.weightx = 1.0;
    66         add(new JMultilineLabel(tr("Query closed changesets only")), gc);
    67 
    68         gc.gridy = 2;
    69         gc.gridx = 0;
    70         gc.weightx = 0.0;
    7152        add(rbBoth, gc);
    72 
    73         gc.gridx = 1;
    74         gc.weightx = 1.0;
    75         add(new JMultilineLabel(tr("Query both open and closed changesets")), gc);
    7653
    7754        ButtonGroup bgRestrictions = new ButtonGroup();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/TimeRestrictionPanel.java

    r12846 r16075  
    2424import org.openstreetmap.josm.gui.HelpAwareOptionPane;
    2525import org.openstreetmap.josm.gui.help.HelpUtil;
    26 import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    2726import org.openstreetmap.josm.gui.widgets.JosmTextField;
    2827import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator;
    2928import org.openstreetmap.josm.io.ChangesetQuery;
    3029import org.openstreetmap.josm.spi.preferences.Config;
     30import org.openstreetmap.josm.tools.GBC;
    3131
    3232/**
     
    3636public class TimeRestrictionPanel extends JPanel implements RestrictionPanel {
    3737
    38     private final JRadioButton rbClosedAfter = new JRadioButton();
    39     private final JRadioButton rbClosedAfterAndCreatedBefore = new JRadioButton();
     38    private final JRadioButton rbClosedAfter = new JRadioButton(
     39            tr("Only changesets closed after the following date/time"));
     40    private final JRadioButton rbClosedAfterAndCreatedBefore = new JRadioButton(
     41            tr("Only changesets closed after and created before a specific date/time"));
    4042    private final JosmTextField tfClosedAfterDate1 = new JosmTextField();
    4143    private transient DateValidator valClosedAfterDate1;
     
    163165        // -- changesets closed after a specific date/time
    164166        //
    165         GridBagConstraints gc = new GridBagConstraints();
    166         gc.anchor = GridBagConstraints.NORTHWEST;
    167         gc.gridx = 0;
    168         gc.fill = GridBagConstraints.HORIZONTAL;
    169         gc.weightx = 0.0;
     167        GridBagConstraints gc = GBC.eol().fill(GridBagConstraints.HORIZONTAL);
    170168        add(rbClosedAfter, gc);
    171 
    172         gc.gridx = 1;
    173         gc.fill = GridBagConstraints.HORIZONTAL;
    174         gc.weightx = 1.0;
    175         add(new JMultilineLabel(tr("Only changesets closed after the following date/time")), gc);
    176 
    177         gc.gridx = 1;
    178         gc.gridy = 1;
    179         gc.fill = GridBagConstraints.HORIZONTAL;
    180         gc.weightx = 1.0;
    181169        add(buildClosedAfterInputPanel(), gc);
    182170
    183171        // -- changesets closed after a specific date/time and created before a specific date time
    184172        //
    185         gc = new GridBagConstraints();
    186         gc.anchor = GridBagConstraints.NORTHWEST;
    187         gc.gridy = 2;
    188         gc.gridx = 0;
    189         gc.fill = GridBagConstraints.HORIZONTAL;
    190         gc.weightx = 0.0;
    191173        add(rbClosedAfterAndCreatedBefore, gc);
    192 
    193         gc.gridx = 1;
    194         gc.fill = GridBagConstraints.HORIZONTAL;
    195         gc.weightx = 1.0;
    196         add(new JMultilineLabel(tr("Only changesets closed after and created before a specific date/time")), gc);
    197 
    198         gc.gridx = 1;
    199         gc.gridy = 3;
    200         gc.fill = GridBagConstraints.HORIZONTAL;
    201         gc.weightx = 1.0;
    202174        add(buildClosedAfterAndCreatedBeforeInputPanel(), gc);
    203175
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UserRestrictionPanel.java

    r12846 r16075  
    77import java.awt.GridBagConstraints;
    88import java.awt.GridBagLayout;
    9 import java.awt.Insets;
    109import java.awt.event.ItemEvent;
    1110import java.awt.event.ItemListener;
     
    2221import org.openstreetmap.josm.gui.help.HelpUtil;
    2322import org.openstreetmap.josm.gui.preferences.server.UserNameValidator;
    24 import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    2523import org.openstreetmap.josm.gui.widgets.JosmTextField;
    2624import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator;
     
    2826import org.openstreetmap.josm.spi.preferences.Config;
    2927import org.openstreetmap.josm.tools.CheckParameterUtil;
     28import org.openstreetmap.josm.tools.GBC;
    3029
    3130/**
     
    3837
    3938    private final ButtonGroup bgUserRestrictions = new ButtonGroup();
    40     private final JRadioButton rbRestrictToMyself = new JRadioButton();
    41     private final JRadioButton rbRestrictToUid = new JRadioButton();
    42     private final JRadioButton rbRestrictToUserName = new JRadioButton();
     39    private final JRadioButton rbRestrictToMyself = new JRadioButton(); // text is set in #startUserInput
     40    private final JRadioButton rbRestrictToUid = new JRadioButton(tr("Only changesets owned by the user with the following user ID"));
     41    private final JRadioButton rbRestrictToUserName = new JRadioButton(tr("Only changesets owned by the user with the following user name"));
    4342    private final JosmTextField tfUid = new JosmTextField(10);
    4443    private transient UidInputFieldValidator valUid;
    4544    private final JosmTextField tfUserName = new JosmTextField(10);
    4645    private transient UserNameValidator valUserName;
    47     private final JMultilineLabel lblRestrictedToMyself = new JMultilineLabel(tr("Only changesets owned by myself"));
    4846
    4947    /**
     
    5654    protected JPanel buildUidInputPanel() {
    5755        JPanel pnl = new JPanel(new GridBagLayout());
    58         GridBagConstraints gc = new GridBagConstraints();
    59         gc.fill = GridBagConstraints.HORIZONTAL;
    60         gc.weightx = 0.0;
    61         gc.insets = new Insets(0, 0, 0, 3);
    62         pnl.add(new JLabel(tr("User ID:")), gc);
    63 
    64         gc.gridx = 1;
    65         pnl.add(tfUid, gc);
     56        pnl.add(new JLabel(tr("User ID:")), GBC.std());
     57
     58        pnl.add(tfUid, GBC.eol().fill(GridBagConstraints.HORIZONTAL));
    6659        SelectAllOnFocusGainedDecorator.decorate(tfUid);
    6760        valUid = UidInputFieldValidator.decorate(tfUid);
    6861
    69         // grab remaining space
    70         gc.gridx = 2;
    71         gc.weightx = 1.0;
    72         pnl.add(new JPanel(), gc);
    7362        return pnl;
    7463    }
     
    7665    protected JPanel buildUserNameInputPanel() {
    7766        JPanel pnl = new JPanel(new GridBagLayout());
    78         GridBagConstraints gc = new GridBagConstraints();
    79         gc.fill = GridBagConstraints.HORIZONTAL;
    80         gc.weightx = 0.0;
    81         gc.insets = new Insets(0, 0, 0, 3);
    82         pnl.add(new JLabel(tr("User name:")), gc);
    83 
    84         gc.gridx = 1;
    85         pnl.add(tfUserName, gc);
     67        pnl.add(new JLabel(tr("User name:")), GBC.std());
     68
     69        pnl.add(tfUserName, GBC.eol().fill(GridBagConstraints.HORIZONTAL));
    8670        SelectAllOnFocusGainedDecorator.decorate(tfUserName);
    8771        valUserName = new UserNameValidator(tfUserName);
    8872
    89         // grab remaining space
    90         gc.gridx = 2;
    91         gc.weightx = 1.0;
    92         pnl.add(new JPanel(), gc);
    9373        return pnl;
    9474    }
     
    10585
    10686        ItemListener userRestrictionChangeHandler = new UserRestrictionChangedHandler();
    107         GridBagConstraints gc = new GridBagConstraints();
    108         gc.anchor = GridBagConstraints.NORTHWEST;
    109         gc.gridx = 0;
    110         gc.fill = GridBagConstraints.HORIZONTAL;
    111         gc.weightx = 0.0;
     87        GridBagConstraints gc = GBC.eol().fill(GridBagConstraints.HORIZONTAL);
     88
    11289        add(rbRestrictToMyself, gc);
    11390        rbRestrictToMyself.addItemListener(userRestrictionChangeHandler);
    11491
    115         gc.gridx = 1;
    116         gc.fill = GridBagConstraints.HORIZONTAL;
    117         gc.weightx = 1.0;
    118         add(lblRestrictedToMyself, gc);
    119 
    120         gc.gridx = 0;
    121         gc.gridy = 1;
    122         gc.fill = GridBagConstraints.HORIZONTAL;
    123         gc.weightx = 0.0;
    12492        add(rbRestrictToUid, gc);
    12593        rbRestrictToUid.addItemListener(userRestrictionChangeHandler);
    126 
    127         gc.gridx = 1;
    128         gc.fill = GridBagConstraints.HORIZONTAL;
    129         gc.weightx = 1.0;
    130         add(new JMultilineLabel(tr("Only changesets owned by the user with the following user ID")), gc);
    131 
    132         gc.gridx = 1;
    133         gc.gridy = 2;
    134         gc.fill = GridBagConstraints.HORIZONTAL;
    135         gc.weightx = 1.0;
    13694        add(buildUidInputPanel(), gc);
    13795
    138         gc.gridx = 0;
    139         gc.gridy = 3;
    140         gc.fill = GridBagConstraints.HORIZONTAL;
    141         gc.weightx = 0.0;
    14296        add(rbRestrictToUserName, gc);
    14397        rbRestrictToUserName.addItemListener(userRestrictionChangeHandler);
    14498
    145         gc.gridx = 1;
    146         gc.fill = GridBagConstraints.HORIZONTAL;
    147         gc.weightx = 1.0;
    148         add(new JMultilineLabel(tr("Only changesets owned by the user with the following user name")), gc);
    149 
    150         gc.gridx = 1;
    151         gc.gridy = 4;
    152         gc.fill = GridBagConstraints.HORIZONTAL;
    153         gc.weightx = 1.0;
    15499        add(buildUserNameInputPanel(), gc);
    155100
     
    164109    public void startUserInput() {
    165110        if (UserIdentityManager.getInstance().isAnonymous()) {
    166             lblRestrictedToMyself.setText(tr("Only changesets owned by myself (disabled. JOSM is currently run by an anonymous user)"));
     111            rbRestrictToMyself.setText(tr("Only changesets owned by myself (disabled. JOSM is currently run by an anonymous user)"));
    167112            rbRestrictToMyself.setEnabled(false);
    168113            if (rbRestrictToMyself.isSelected()) {
     
    170115            }
    171116        } else {
    172             lblRestrictedToMyself.setText(tr("Only changesets owned by myself"));
     117            rbRestrictToMyself.setText(tr("Only changesets owned by myself"));
    173118            rbRestrictToMyself.setEnabled(true);
    174119            rbRestrictToMyself.setSelected(true);
Note: See TracChangeset for help on using the changeset viewer.