Ignore:
Timestamp:
2015-06-20T23:42:21+02:00 (9 years ago)
Author:
Don-vip
Message:

checkstyle: enable relevant whitespace checks and fix them

File:
1 edited

Legend:

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

    r8461 r8510  
    6060        ItemListener stateChangeHandler = new RestrictionGroupStateChangeHandler();
    6161        JPanel pnl  = new VerticallyScrollablePanel();
    62         pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
     62        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    6363        pnl.setLayout(new GridBagLayout());
    6464        GridBagConstraints gc = new GridBagConstraints();
     
    7474        gc.gridx = 1;
    7575        gc.weightx = 1.0;
    76         pnl.add(new JMultilineLabel(tr("Select changesets owned by specific users")),gc);
     76        pnl.add(new JMultilineLabel(tr("Select changesets owned by specific users")), gc);
    7777
    7878        gc.gridy = 1;
     
    9393        gc.gridx = 1;
    9494        gc.weightx = 1.0;
    95         pnl.add(new JMultilineLabel(tr("Select changesets depending on whether they are open or closed")),gc);
     95        pnl.add(new JMultilineLabel(tr("Select changesets depending on whether they are open or closed")), gc);
    9696
    9797        gc.gridy = 3;
     
    112112        gc.gridx = 1;
    113113        gc.weightx = 1.0;
    114         pnl.add(new JMultilineLabel(tr("Select changesets based on the date/time they have been created or closed")),gc);
     114        pnl.add(new JMultilineLabel(tr("Select changesets based on the date/time they have been created or closed")), gc);
    115115
    116116        gc.gridy = 5;
     
    132132        gc.gridx = 1;
    133133        gc.weightx = 1.0;
    134         pnl.add(new JMultilineLabel(tr("Select only changesets related to a specific bounding box")),gc);
     134        pnl.add(new JMultilineLabel(tr("Select only changesets related to a specific bounding box")), gc);
    135135
    136136        gc.gridy = 7;
     
    143143        gc.gridx = 0;
    144144        gc.gridwidth = 2;
    145         gc.fill  =GridBagConstraints.BOTH;
     145        gc.fill = GridBagConstraints.BOTH;
    146146        gc.weightx = 1.0;
    147147        gc.weighty = 1.0;
     
    289289            setLayout(new GridBagLayout());
    290290            setBorder(BorderFactory.createCompoundBorder(
    291                     BorderFactory.createEmptyBorder(3,3,3,3),
     291                    BorderFactory.createEmptyBorder(3, 3, 3, 3),
    292292                    BorderFactory.createCompoundBorder(
    293293                            BorderFactory.createLineBorder(Color.GRAY),
    294                             BorderFactory.createEmptyBorder(5,5,5,5)
     294                            BorderFactory.createEmptyBorder(5, 5, 5, 5)
    295295                    )
    296296            ));
     
    389389            gc.fill = GridBagConstraints.HORIZONTAL;
    390390            gc.weightx = 0.0;
    391             gc.insets = new Insets(0,0,0,3);
     391            gc.insets = new Insets(0, 0, 0, 3);
    392392            pnl.add(new JLabel(tr("User ID:")), gc);
    393393
    394394            gc.gridx = 1;
    395             pnl.add(tfUid = new JosmTextField(10),gc);
     395            pnl.add(tfUid = new JosmTextField(10), gc);
    396396            SelectAllOnFocusGainedDecorator.decorate(tfUid);
    397397            valUid = UidInputFieldValidator.decorate(tfUid);
     
    409409            gc.fill = GridBagConstraints.HORIZONTAL;
    410410            gc.weightx = 0.0;
    411             gc.insets = new Insets(0,0,0,3);
     411            gc.insets = new Insets(0, 0, 0, 3);
    412412            pnl.add(new JLabel(tr("User name:")), gc);
    413413
    414414            gc.gridx = 1;
    415             pnl.add(tfUserName = new JosmTextField(10),gc);
     415            pnl.add(tfUserName = new JosmTextField(10), gc);
    416416            SelectAllOnFocusGainedDecorator.decorate(tfUserName);
    417417            valUserName = UserNameInputValidator.decorate(tfUserName);
     
    427427            setLayout(new GridBagLayout());
    428428            setBorder(BorderFactory.createCompoundBorder(
    429                     BorderFactory.createEmptyBorder(3,3,3,3),
     429                    BorderFactory.createEmptyBorder(3, 3, 3, 3),
    430430                    BorderFactory.createCompoundBorder(
    431431                            BorderFactory.createLineBorder(Color.GRAY),
    432                             BorderFactory.createEmptyBorder(5,5,5,5)
     432                            BorderFactory.createEmptyBorder(5, 5, 5, 5)
    433433                    )
    434434            ));
     
    438438            gc.anchor = GridBagConstraints.NORTHWEST;
    439439            gc.gridx = 0;
    440             gc.fill= GridBagConstraints.HORIZONTAL;
     440            gc.fill = GridBagConstraints.HORIZONTAL;
    441441            gc.weightx = 0.0;
    442442            add(rbRestrictToMyself = new JRadioButton(), gc);
     
    450450            gc.gridx = 0;
    451451            gc.gridy = 1;
    452             gc.fill= GridBagConstraints.HORIZONTAL;
     452            gc.fill = GridBagConstraints.HORIZONTAL;
    453453            gc.weightx = 0.0;
    454454            add(rbRestrictToUid = new JRadioButton(), gc);
     
    458458            gc.fill =  GridBagConstraints.HORIZONTAL;
    459459            gc.weightx = 1.0;
    460             add(new JMultilineLabel(tr("Only changesets owned by the user with the following user ID")),gc);
     460            add(new JMultilineLabel(tr("Only changesets owned by the user with the following user ID")), gc);
    461461
    462462            gc.gridx = 1;
     
    464464            gc.fill =  GridBagConstraints.HORIZONTAL;
    465465            gc.weightx = 1.0;
    466             add(buildUidInputPanel(),gc);
     466            add(buildUidInputPanel(), gc);
    467467
    468468            gc.gridx = 0;
    469469            gc.gridy = 3;
    470             gc.fill= GridBagConstraints.HORIZONTAL;
     470            gc.fill = GridBagConstraints.HORIZONTAL;
    471471            gc.weightx = 0.0;
    472472            add(rbRestrictToUserName = new JRadioButton(), gc);
     
    474474
    475475            gc.gridx = 1;
    476             gc.fill =  GridBagConstraints.HORIZONTAL;
    477             gc.weightx = 1.0;
    478             add(new JMultilineLabel(tr("Only changesets owned by the user with the following user name")),gc);
     476            gc.fill = GridBagConstraints.HORIZONTAL;
     477            gc.weightx = 1.0;
     478            add(new JMultilineLabel(tr("Only changesets owned by the user with the following user name")), gc);
    479479
    480480            gc.gridx = 1;
    481481            gc.gridy = 4;
    482             gc.fill =  GridBagConstraints.HORIZONTAL;
    483             gc.weightx = 1.0;
    484             add(buildUserNameInputPanel(),gc);
     482            gc.fill = GridBagConstraints.HORIZONTAL;
     483            gc.weightx = 1.0;
     484            add(buildUserNameInputPanel(), gc);
    485485
    486486            bgUserRestrictions = new ButtonGroup();
     
    541541        }
    542542
    543 
    544543        public boolean isValidChangesetQuery() {
    545544            if (rbRestrictToUid.isSelected())
     
    656655            gc.fill = GridBagConstraints.HORIZONTAL;
    657656            gc.weightx = 0.0;
    658             gc.insets = new Insets(0,0,0,3);
     657            gc.insets = new Insets(0, 0, 0, 3);
    659658            pnl.add(new JLabel(tr("Date: ")), gc);
    660659
    661660            gc.gridx = 1;
    662661            gc.weightx = 0.7;
    663             pnl.add(tfClosedAfterDate1 = new JosmTextField(),gc);
     662            pnl.add(tfClosedAfterDate1 = new JosmTextField(), gc);
    664663            SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterDate1);
    665664            valClosedAfterDate1 = DateValidator.decorate(tfClosedAfterDate1);
     
    668667            gc.gridx = 2;
    669668            gc.weightx = 0.0;
    670             pnl.add(new JLabel(tr("Time:")),gc);
     669            pnl.add(new JLabel(tr("Time:")), gc);
    671670
    672671            gc.gridx = 3;
    673672            gc.weightx = 0.3;
    674             pnl.add(tfClosedAfterTime1 = new JosmTextField(),gc);
     673            pnl.add(tfClosedAfterTime1 = new JosmTextField(), gc);
    675674            SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterTime1);
    676675            valClosedAfterTime1 = TimeValidator.decorate(tfClosedAfterTime1);
     
    684683            gc.fill = GridBagConstraints.HORIZONTAL;
    685684            gc.weightx = 0.0;
    686             gc.insets = new Insets(0,0,0,3);
     685            gc.insets = new Insets(0, 0, 0, 3);
    687686            pnl.add(new JLabel(tr("Closed after - ")), gc);
    688687
     
    690689            gc.fill = GridBagConstraints.HORIZONTAL;
    691690            gc.weightx = 0.0;
    692             gc.insets = new Insets(0,0,0,3);
     691            gc.insets = new Insets(0, 0, 0, 3);
    693692            pnl.add(new JLabel(tr("Date:")), gc);
    694693
    695694            gc.gridx = 2;
    696695            gc.weightx = 0.7;
    697             pnl.add(tfClosedAfterDate2 = new JosmTextField(),gc);
     696            pnl.add(tfClosedAfterDate2 = new JosmTextField(), gc);
    698697            SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterDate2);
    699698            valClosedAfterDate2 = DateValidator.decorate(tfClosedAfterDate2);
     
    701700            gc.gridx = 3;
    702701            gc.weightx = 0.0;
    703             pnl.add(new JLabel(tr("Time:")),gc);
     702            pnl.add(new JLabel(tr("Time:")), gc);
    704703
    705704            gc.gridx = 4;
    706705            gc.weightx = 0.3;
    707             pnl.add(tfClosedAfterTime2 = new JosmTextField(),gc);
     706            pnl.add(tfClosedAfterTime2 = new JosmTextField(), gc);
    708707            SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterTime2);
    709708            valClosedAfterTime2 = TimeValidator.decorate(tfClosedAfterTime2);
     
    714713            gc.fill = GridBagConstraints.HORIZONTAL;
    715714            gc.weightx = 0.0;
    716             gc.insets = new Insets(0,0,0,3);
     715            gc.insets = new Insets(0, 0, 0, 3);
    717716            pnl.add(new JLabel(tr("Created before - ")), gc);
    718717
     
    720719            gc.fill = GridBagConstraints.HORIZONTAL;
    721720            gc.weightx = 0.0;
    722             gc.insets = new Insets(0,0,0,3);
     721            gc.insets = new Insets(0, 0, 0, 3);
    723722            pnl.add(new JLabel(tr("Date:")), gc);
    724723
    725724            gc.gridx = 2;
    726725            gc.weightx = 0.7;
    727             pnl.add(tfCreatedBeforeDate = new JosmTextField(),gc);
     726            pnl.add(tfCreatedBeforeDate = new JosmTextField(), gc);
    728727            SelectAllOnFocusGainedDecorator.decorate(tfCreatedBeforeDate);
    729728            valCreatedBeforeDate = DateValidator.decorate(tfCreatedBeforeDate);
     
    732731            gc.gridx = 3;
    733732            gc.weightx = 0.0;
    734             pnl.add(new JLabel(tr("Time:")),gc);
     733            pnl.add(new JLabel(tr("Time:")), gc);
    735734
    736735            gc.gridx = 4;
    737736            gc.weightx = 0.3;
    738             pnl.add(tfCreatedBeforeTime = new JosmTextField(),gc);
     737            pnl.add(tfCreatedBeforeTime = new JosmTextField(), gc);
    739738            SelectAllOnFocusGainedDecorator.decorate(tfCreatedBeforeTime);
    740739            valCreatedBeforeTime = TimeValidator.decorate(tfCreatedBeforeTime);
     
    747746            setLayout(new GridBagLayout());
    748747            setBorder(BorderFactory.createCompoundBorder(
    749                     BorderFactory.createEmptyBorder(3,3,3,3),
     748                    BorderFactory.createEmptyBorder(3, 3, 3, 3),
    750749                    BorderFactory.createCompoundBorder(
    751750                            BorderFactory.createLineBorder(Color.GRAY),
    752                             BorderFactory.createEmptyBorder(5,5,5,5)
     751                            BorderFactory.createEmptyBorder(5, 5, 5, 5)
    753752                    )
    754753            ));
     
    759758            gc.anchor = GridBagConstraints.NORTHWEST;
    760759            gc.gridx = 0;
    761             gc.fill= GridBagConstraints.HORIZONTAL;
     760            gc.fill = GridBagConstraints.HORIZONTAL;
    762761            gc.weightx = 0.0;
    763762            add(rbClosedAfter = new JRadioButton(), gc);
    764763
    765764            gc.gridx = 1;
    766             gc.fill =  GridBagConstraints.HORIZONTAL;
     765            gc.fill = GridBagConstraints.HORIZONTAL;
    767766            gc.weightx = 1.0;
    768767            add(new JMultilineLabel(tr("Only changesets closed after the following date/time")), gc);
     
    770769            gc.gridx = 1;
    771770            gc.gridy = 1;
    772             gc.fill =  GridBagConstraints.HORIZONTAL;
    773             gc.weightx = 1.0;
    774             add(buildClosedAfterInputPanel(),gc);
     771            gc.fill = GridBagConstraints.HORIZONTAL;
     772            gc.weightx = 1.0;
     773            add(buildClosedAfterInputPanel(), gc);
    775774
    776775            // -- changesets closed after a specific date/time and created before a specific date time
     
    780779            gc.gridy = 2;
    781780            gc.gridx = 0;
    782             gc.fill= GridBagConstraints.HORIZONTAL;
     781            gc.fill = GridBagConstraints.HORIZONTAL;
    783782            gc.weightx = 0.0;
    784783            add(rbClosedAfterAndCreatedBefore = new JRadioButton(), gc);
    785784
    786785            gc.gridx = 1;
    787             gc.fill =  GridBagConstraints.HORIZONTAL;
     786            gc.fill = GridBagConstraints.HORIZONTAL;
    788787            gc.weightx = 1.0;
    789788            add(new JMultilineLabel(tr("Only changesets closed after and created before a specific date/time")), gc);
     
    791790            gc.gridx = 1;
    792791            gc.gridy = 3;
    793             gc.fill =  GridBagConstraints.HORIZONTAL;
    794             gc.weightx = 1.0;
    795             add(buildClosedAfterAndCreatedBeforeInputPanel(),gc);
     792            gc.fill = GridBagConstraints.HORIZONTAL;
     793            gc.weightx = 1.0;
     794            add(buildClosedAfterAndCreatedBeforeInputPanel(), gc);
    796795
    797796            ButtonGroup bg = new ButtonGroup();
     
    876875        }
    877876
    878 
    879877        public void rememberSettings() {
    880878            String prefRoot = "changeset-query.advanced.time-restrictions";
     
    930928        public BBoxRestrictionPanel() {
    931929            setBorder(BorderFactory.createCompoundBorder(
    932                     BorderFactory.createEmptyBorder(3,3,3,3),
     930                    BorderFactory.createEmptyBorder(3, 3, 3, 3),
    933931                    BorderFactory.createCompoundBorder(
    934932                            BorderFactory.createLineBorder(Color.GRAY),
    935                             BorderFactory.createEmptyBorder(5,5,5,5)
     933                            BorderFactory.createEmptyBorder(5, 5, 5, 5)
    936934                    )
    937935            ));
     
    994992                    return;
    995993                }
    996             } catch(NumberFormatException e) {
     994            } catch (NumberFormatException e) {
    997995                feedbackInvalid(tr("The current value is not a valid user ID. Please enter an integer value > 0"));
    998996                return;
     
    10081006                if (uid > 0) return uid;
    10091007                return 0;
    1010             } catch(NumberFormatException e) {
     1008            } catch (NumberFormatException e) {
    10111009                return 0;
    10121010            }
     
    11631161                try {
    11641162                    return DateFormat.getTimeInstance(style, Locale.getDefault()).parse(getComponent().getText());
    1165                 } catch(ParseException e) {
     1163                } catch (ParseException e) {
    11661164                    continue;
    11671165                }
Note: See TracChangeset for help on using the changeset viewer.