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/preferences/projection/ProjectionPreference.java

    r8444 r8510  
    250250    private static final String[] unitsValuesTr = new String[unitsValues.length];
    251251    static {
    252         for (int i=0; i<unitsValues.length; ++i) {
     252        for (int i = 0; i < unitsValues.length; ++i) {
    253253            unitsValuesTr[i] = tr(unitsValues[i]);
    254254        }
     
    315315        projPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    316316        projPanel.setLayout(new GridBagLayout());
    317         projPanel.add(new JLabel(tr("Projection method")), GBC.std().insets(5,5,0,5));
    318         projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
    319         projPanel.add(projectionCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
    320         projPanel.add(projectionCodeLabel = new JLabel(tr("Projection code")), GBC.std().insets(25,5,0,5));
    321         projPanel.add(projectionCodeGlue = GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
    322         projPanel.add(projectionCode, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
    323         projPanel.add(projectionNameLabel = new JLabel(tr("Projection name")), GBC.std().insets(25,5,0,5));
    324         projPanel.add(projectionNameGlue = GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
    325         projPanel.add(projectionName, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
    326         projPanel.add(new JLabel(tr("Bounds")), GBC.std().insets(25,5,0,5));
    327         projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
    328         projPanel.add(bounds, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
    329         projPanel.add(projSubPrefPanelWrapper, GBC.eol().fill(GBC.HORIZONTAL).insets(20,5,5,5));
     317        projPanel.add(new JLabel(tr("Projection method")), GBC.std().insets(5, 5, 0, 5));
     318        projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
     319        projPanel.add(projectionCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
     320        projPanel.add(projectionCodeLabel = new JLabel(tr("Projection code")), GBC.std().insets(25, 5, 0, 5));
     321        projPanel.add(projectionCodeGlue = GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
     322        projPanel.add(projectionCode, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
     323        projPanel.add(projectionNameLabel = new JLabel(tr("Projection name")), GBC.std().insets(25, 5, 0, 5));
     324        projPanel.add(projectionNameGlue = GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
     325        projPanel.add(projectionName, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
     326        projPanel.add(new JLabel(tr("Bounds")), GBC.std().insets(25, 5, 0, 5));
     327        projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
     328        projPanel.add(bounds, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
     329        projPanel.add(projSubPrefPanelWrapper, GBC.eol().fill(GBC.HORIZONTAL).insets(20, 5, 5, 5));
    330330
    331331        projectionCodeLabel.setLabelFor(projectionCode);
    332332        projectionNameLabel.setLabelFor(projectionName);
    333333
    334         projPanel.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0,5,0,10));
    335         projPanel.add(new JLabel(tr("Display coordinates as")), GBC.std().insets(5,5,0,5));
    336         projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
    337         projPanel.add(coordinatesCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
    338         projPanel.add(new JLabel(tr("System of measurement")), GBC.std().insets(5,5,0,5));
    339         projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
    340         projPanel.add(unitsCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
    341         projPanel.add(GBC.glue(1,1), GBC.std().fill(GBC.HORIZONTAL).weight(1.0, 1.0));
     334        projPanel.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0, 5, 0, 10));
     335        projPanel.add(new JLabel(tr("Display coordinates as")), GBC.std().insets(5, 5, 0, 5));
     336        projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
     337        projPanel.add(coordinatesCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
     338        projPanel.add(new JLabel(tr("System of measurement")), GBC.std().insets(5, 5, 0, 5));
     339        projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
     340        projPanel.add(unitsCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
     341        projPanel.add(GBC.glue(1, 1), GBC.std().fill(GBC.HORIZONTAL).weight(1.0, 1.0));
    342342
    343343        JScrollPane scrollpane = new JScrollPane(projPanel);
     
    378378        setProjection(id, prefs);
    379379
    380         if(PROP_COORDINATES.put(((CoordinateFormat)coordinatesCombo.getSelectedItem()).name())) {
    381             CoordinateFormat.setCoordinateFormat((CoordinateFormat)coordinatesCombo.getSelectedItem());
     380        if (PROP_COORDINATES.put(((CoordinateFormat) coordinatesCombo.getSelectedItem()).name())) {
     381            CoordinateFormat.setCoordinateFormat((CoordinateFormat) coordinatesCombo.getSelectedItem());
    382382        }
    383383
     
    422422        // Don't try to update if we're still starting up
    423423        int size = projPanel.getComponentCount();
    424         if(size < 1)
     424        if (size < 1)
    425425            return;
    426426
Note: See TracChangeset for help on using the changeset viewer.