Ignore:
Timestamp:
2014-01-03T04:51:04+01:00 (10 years ago)
Author:
Don-vip
Message:

fix some Sonar issues

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
9 edited

Legend:

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

    r6539 r6603  
    2424public class SourceButton extends JComponent {
    2525
    26     private final int layerHeight = 20;
    27     private final int leftPadding = 5;
    28     private final int topPadding = 5;
    29     private final int bottomPadding = 5;
    30 
     26    private static final int LAYER_HEIGHT = 20;
     27    private static final int LEFT_PADDING = 5;
     28    private static final int TOP_PADDING = 5;
     29    private static final int BOTTOM_PADDING = 5;
    3130
    3231    private TileSource[] sources;
     
    4746
    4847    public SourceButton(SlippyMapBBoxChooser slippyMapBBoxChooser, Collection<TileSource> sources) {
    49         super();
    5048        this.slippyMapBBoxChooser = slippyMapBBoxChooser;
    5149        setSources(sources);
     
    6866                        toggle();
    6967                    } else {
    70                         int result = (point.y - 5) / layerHeight;
     68                        int result = (point.y - 5) / LAYER_HEIGHT;
    7169                        if (result >= 0 && result < SourceButton.this.sources.length) {
    7270                            SourceButton.this.slippyMapBBoxChooser.toggleMapSource(SourceButton.this.sources[result]);
     
    7876                    toggle();
    7977                }
    80 
    8178            }
    8279        }
     
    105102
    106103                g.setColor(new Color(0, 0, 139, 179));
    107                 g.fillRoundRect(0, 0, barWidth + shrinkImage.getIconWidth(), sources.length * layerHeight + topPadding + bottomPadding, 10, 10);
     104                g.fillRoundRect(0, 0, barWidth + shrinkImage.getIconWidth(), sources.length * LAYER_HEIGHT + TOP_PADDING + BOTTOM_PADDING, 10, 10);
    108105                for (int i=0; i<sources.length; i++) {
    109106                    g.setColor(Color.WHITE);
    110                     g.fillOval(leftPadding, topPadding + i * layerHeight + 6, radioButtonSize, radioButtonSize);
    111                     g.drawString(sources[i].getName(), leftPadding + radioButtonSize + leftPadding, topPadding + i * layerHeight + g.getFontMetrics().getHeight());
     107                    g.fillOval(LEFT_PADDING, TOP_PADDING + i * LAYER_HEIGHT + 6, radioButtonSize, radioButtonSize);
     108                    g.drawString(sources[i].getName(), LEFT_PADDING + radioButtonSize + LEFT_PADDING, TOP_PADDING + i * LAYER_HEIGHT + g.getFontMetrics().getHeight());
    112109                    if (currentMap == i) {
    113110                        g.setColor(Color.BLACK);
    114                         g.fillOval(leftPadding + 1, topPadding + 7 + i * layerHeight, radioButtonSize - 2, radioButtonSize - 2);
     111                        g.fillOval(LEFT_PADDING + 1, TOP_PADDING + 7 + i * LAYER_HEIGHT, radioButtonSize - 2, radioButtonSize - 2);
    115112                    }
    116113                }
     
    155152            }
    156153            barWidth = textWidth + 50;
    157             shownDimension = new Dimension(barWidth + shrinkImage.getIconWidth(), sources.length * layerHeight + topPadding + bottomPadding);
     154            shownDimension = new Dimension(barWidth + shrinkImage.getIconWidth(), sources.length * LAYER_HEIGHT + TOP_PADDING + BOTTOM_PADDING);
    158155        }
    159156    }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java

    r6070 r6603  
    2020import javax.swing.AbstractAction;
    2121import javax.swing.DefaultListSelectionModel;
     22import javax.swing.ImageIcon;
    2223import javax.swing.JComponent;
    2324import javax.swing.JFrame;
     
    6162public class ChangesetCacheManager extends JFrame {
    6263
     64    /** The changeset download icon **/
     65    public static final ImageIcon DOWNLOAD_CONTENT_ICON = ImageProvider.get("dialogs/changeset", "downloadchangesetcontent");
     66    /** The changeset update icon **/
     67    public static final ImageIcon UPDATE_CONTENT_ICON   = ImageProvider.get("dialogs/changeset", "updatechangesetcontent");
     68
    6369    /** the unique instance of the cache manager  */
    6470    private static ChangesetCacheManager instance;
     
    160166
    161167        // -- add the details panel
    162         ChangesetDetailPanel pnlChangesetDetail;
    163         tp.add(pnlChangesetDetail = new ChangesetDetailPanel());
     168        ChangesetDetailPanel pnlChangesetDetail = new ChangesetDetailPanel();
     169        tp.add(pnlChangesetDetail);
    164170        model.addPropertyChangeListener(pnlChangesetDetail);
    165171
     
    284290    }
    285291
     292    /**
     293     * Constructs a new {@code ChangesetCacheManager}.
     294     */
    286295    public ChangesetCacheManager() {
    287296        build();
     
    483492        public DownloadSelectedChangesetContentAction() {
    484493            putValue(NAME, tr("Download changeset content"));
    485             putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset", "downloadchangesetcontent"));
     494            putValue(SMALL_ICON, DOWNLOAD_CONTENT_ICON);
    486495            putValue(SHORT_DESCRIPTION, tr("Download the content of the selected changesets from the server"));
    487496            updateEnabledState();
     
    627636    }
    628637
     638    /**
     639     * Runs the given changeset download task.
     640     * @param task The changeset download task to run
     641     */
    629642    public void runDownloadTask(final ChangesetDownloadTask task) {
    630643        Main.worker.submit(task);
    631         Runnable r = new Runnable() {
    632             @Override public void run() {
     644        Main.worker.submit(new Runnable() {
     645            @Override
     646            public void run() {
    633647                if (task.isCanceled() || task.isFailed()) return;
    634648                setSelectedChangesets(task.getDownloadedChangesets());
    635649            }
    636         };
    637         Main.worker.submit(r);
     650        });
    638651    }
    639652}
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java

    r6340 r6603  
    5959 *
    6060 */
    61 public class ChangesetContentPanel extends JPanel implements PropertyChangeListener{
     61public class ChangesetContentPanel extends JPanel implements PropertyChangeListener {
    6262
    6363    private ChangesetContentTableModel model;
    6464    private Changeset currentChangeset;
    6565
    66     private DonwloadChangesetContentAction actDownloadContentAction;
     66    private DownloadChangesetContentAction actDownloadContentAction;
    6767    private ShowHistoryAction actShowHistory;
    6868    private SelectInCurrentLayerAction actSelectInCurrentLayerAction;
    6969    private ZoomInCurrentLayerAction actZoomInCurrentLayerAction;
    7070
    71     private HeaderPanel pnlHeader;
     71    private final HeaderPanel pnlHeader = new HeaderPanel();
    7272
    7373    protected void buildModels() {
    7474        DefaultListSelectionModel selectionModel =new DefaultListSelectionModel();
    7575        model = new ChangesetContentTableModel(selectionModel);
    76         actDownloadContentAction = new DonwloadChangesetContentAction();
     76        actDownloadContentAction = new DownloadChangesetContentAction();
    7777        actDownloadContentAction.initProperties(currentChangeset);
    7878        actShowHistory = new ShowHistoryAction();
     
    126126    }
    127127
    128     protected void build() {
     128    protected final void build() {
    129129        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    130130        setLayout(new BorderLayout());
    131131        buildModels();
    132132
    133         add(pnlHeader = new HeaderPanel(), BorderLayout.NORTH);
     133        add(pnlHeader, BorderLayout.NORTH);
    134134        add(buildActionButtonPanel(), BorderLayout.WEST);
    135135        add(buildContentPanel(), BorderLayout.CENTER);
    136 
    137136    }
    138137
     
    173172        setCurrentChangeset(cs);
    174173    }
     174   
     175    private final void alertNoPrimitivesTo(Collection<HistoryOsmPrimitive> primitives, String title, String helpTopic) {
     176        HelpAwareOptionPane.showOptionDialog(
     177                ChangesetContentPanel.this,
     178                trn("<html>The selected object is not available in the current<br>"
     179                        + "edit layer ''{0}''.</html>",
     180                        "<html>None of the selected objects is available in the current<br>"
     181                        + "edit layer ''{0}''.</html>",
     182                        primitives.size(),
     183                        Main.main.getEditLayer().getName()
     184                ),
     185                title, JOptionPane.WARNING_MESSAGE, helpTopic
     186        );
     187    }
    175188
    176189    /**
     
    178191     *
    179192     */
    180     class DonwloadChangesetContentAction extends AbstractAction{
    181         public DonwloadChangesetContentAction() {
     193    class DownloadChangesetContentAction extends AbstractAction{
     194        public DownloadChangesetContentAction() {
    182195            putValue(NAME, tr("Download content"));
    183             putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","downloadchangesetcontent"));
     196            putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON);
    184197            putValue(SHORT_DESCRIPTION, tr("Download the changeset content from the OSM server"));
    185198        }
     
    201214            if (cs.getContent() == null) {
    202215                putValue(NAME, tr("Download content"));
    203                 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","downloadchangesetcontent"));
     216                putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON);
    204217                putValue(SHORT_DESCRIPTION, tr("Download the changeset content from the OSM server"));
    205218            } else {
    206219                putValue(NAME, tr("Update content"));
    207                 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","updatechangesetcontent"));
     220                putValue(SMALL_ICON, ChangesetCacheManager.UPDATE_CONTENT_ICON);
    208221                putValue(SHORT_DESCRIPTION, tr("Update the changeset content from the OSM server"));
    209222            }
     
    221234    }
    222235
    223     class ShowHistoryAction extends AbstractAction implements ListSelectionListener{
     236    class ShowHistoryAction extends AbstractAction implements ListSelectionListener {
     237       
     238        private final class ShowHistoryTask implements Runnable {
     239            private final Collection<HistoryOsmPrimitive> primitives;
     240
     241            private ShowHistoryTask(Collection<HistoryOsmPrimitive> primitives) {
     242                this.primitives = primitives;
     243            }
     244
     245            @Override
     246            public void run() {
     247                try {
     248                    for (HistoryOsmPrimitive p : primitives) {
     249                        final History h = HistoryDataSet.getInstance().getHistory(p.getPrimitiveId());
     250                        if (h == null) {
     251                            continue;
     252                        }
     253                        GuiHelper.runInEDT(new Runnable() {
     254                            @Override
     255                            public void run() {
     256                                HistoryBrowserDialogManager.getInstance().show(h);
     257                            }
     258                        });
     259                    }
     260                } catch (final Exception e) {
     261                    GuiHelper.runInEDT(new Runnable() {
     262                        @Override
     263                        public void run() {
     264                            BugReportExceptionHandler.handleException(e);
     265                        }
     266                    });
     267                }
     268            }
     269        }
     270
    224271        public ShowHistoryAction() {
    225272            putValue(NAME, tr("Show history"));
     
    250297            }
    251298
    252             Runnable r = new Runnable() {
    253                 @Override
    254                 public void run() {
    255                     try {
    256                         for (HistoryOsmPrimitive p : primitives) {
    257                             final History h = HistoryDataSet.getInstance().getHistory(p.getPrimitiveId());
    258                             if (h == null) {
    259                                 continue;
    260                             }
    261                             GuiHelper.runInEDT(new Runnable() {
    262                                 @Override public void run() {
    263                                     HistoryBrowserDialogManager.getInstance().show(h);
    264                                 }
    265                             });
    266                         }
    267                     } catch (final Exception e) {
    268                         GuiHelper.runInEDT(new Runnable() {
    269                             @Override
    270                             public void run() {
    271                                 BugReportExceptionHandler.handleException(e);
    272                             }
    273                         });
    274                     }
    275 
    276                 }
    277             };
    278             Main.worker.submit(r);
    279         }
    280 
    281         protected void updateEnabledState() {
     299            Main.worker.submit(new ShowHistoryTask(primitives));
     300        }
     301
     302        protected final void updateEnabledState() {
    282303            setEnabled(model.hasSelectedPrimitives());
    283304        }
     
    303324            putValue(SHORT_DESCRIPTION, tr("Select the corresponding primitives in the current data layer"));
    304325            updateEnabledState();
    305         }
    306 
    307         protected void alertNoPrimitivesToSelect(Collection<HistoryOsmPrimitive> primitives) {
    308             HelpAwareOptionPane.showOptionDialog(
    309                     ChangesetContentPanel.this,
    310                     trn("<html>The selected object is not available in the current<br>"
    311                             + "edit layer ''{0}''.</html>",
    312                             "<html>None of the selected objects is available in the current<br>"
    313                             + "edit layer ''{0}''.</html>",
    314                             primitives.size(),
    315                             Main.main.getEditLayer().getName()
    316                     ),
    317                     tr("Nothing to select"),
    318                     JOptionPane.WARNING_MESSAGE,
    319                     HelpUtil.ht("/Dialog/ChangesetCacheManager#NothingToSelectInLayer")
    320             );
    321326        }
    322327
     
    336341            }
    337342            if (target.isEmpty()) {
    338                 alertNoPrimitivesToSelect(selected);
     343                alertNoPrimitivesTo(selected, tr("Nothing to select"),
     344                        HelpUtil.ht("/Dialog/ChangesetCacheManager#NothingToSelectInLayer"));
    339345                return;
    340346            }
     
    342348        }
    343349
    344         public void updateEnabledState() {
     350        public final void updateEnabledState() {
    345351            if (Main.main == null || !Main.main.hasEditLayer()) {
    346352                setEnabled(false);
     
    368374            putValue(SHORT_DESCRIPTION, tr("Zoom to the corresponding objects in the current data layer"));
    369375            updateEnabledState();
    370         }
    371 
    372         protected void alertNoPrimitivesToZoomTo(Collection<HistoryOsmPrimitive> primitives) {
    373             HelpAwareOptionPane.showOptionDialog(
    374                     ChangesetContentPanel.this,
    375                     trn("<html>The selected object is not available in the current<br>"
    376                             + "edit layer ''{0}''.</html>",
    377                             "<html>None of the selected objects is available in the current<br>"
    378                             + "edit layer ''{0}''.</html>",
    379                             primitives.size(),
    380                             Main.main.getEditLayer().getName()
    381                     ),
    382                     tr("Nothing to zoom to"),
    383                     JOptionPane.WARNING_MESSAGE,
    384                     HelpUtil.ht("/Dialog/ChangesetCacheManager#NothingToZoomTo")
    385             );
    386376        }
    387377
     
    401391            }
    402392            if (target.isEmpty()) {
    403                 alertNoPrimitivesToZoomTo(selected);
     393                alertNoPrimitivesTo(selected, tr("Nothing to zoom to"),
     394                        HelpUtil.ht("/Dialog/ChangesetCacheManager#NothingToZoomTo"));
    404395                return;
    405396            }
     
    408399        }
    409400
    410         public void updateEnabledState() {
     401        public final void updateEnabledState() {
    411402            if (Main.main == null || !Main.main.hasEditLayer()) {
    412403                setEnabled(false);
     
    427418    }
    428419
    429     static private class HeaderPanel extends JPanel {
     420    private static class HeaderPanel extends JPanel {
    430421
    431422        private JMultilineLabel lblMessage;
    432423        private Changeset current;
    433424
    434         protected void build() {
     425        protected final void build() {
    435426            setLayout(new FlowLayout(FlowLayout.LEFT));
    436427            lblMessage = new JMultilineLabel(
     
    455446                putValue(NAME, tr("Download now"));
    456447                putValue(SHORT_DESCRIPTION, tr("Download the changeset content"));
    457                 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset", "downloadchangesetcontent"));
     448                putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON);
    458449            }
    459450
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java

    r6336 r6603  
    4242import org.openstreetmap.josm.tools.ImageProvider;
    4343
    44 
    4544/**
    4645 * This panel displays the properties of the currently selected changeset in the
     
    4847 *
    4948 */
    50 public class ChangesetDetailPanel extends JPanel implements PropertyChangeListener{
    51 
    52     private JosmTextField tfID;
    53     private JosmTextArea taComment;
    54     private JosmTextField tfOpen;
    55     private JosmTextField tfUser;
    56     private JosmTextField tfCreatedOn;
    57     private JosmTextField tfClosedOn;
    58     private DonwloadChangesetContentAction actDownloadChangesetContent;
    59     private UpdateChangesetAction actUpdateChangesets;
    60     private RemoveFromCacheAction actRemoveFromCache;
    61     private SelectInCurrentLayerAction actSelectInCurrentLayer;
    62     private ZoomInCurrentLayerAction actZoomInCurrentLayerAction;
     49public class ChangesetDetailPanel extends JPanel implements PropertyChangeListener {
     50
     51    private final JosmTextField tfID        = new JosmTextField(10);
     52    private final JosmTextArea  taComment   = new JosmTextArea(5,40);
     53    private final JosmTextField tfOpen      = new JosmTextField(10);
     54    private final JosmTextField tfUser      = new JosmTextField("");
     55    private final JosmTextField tfCreatedOn = new JosmTextField(20);
     56    private final JosmTextField tfClosedOn  = new JosmTextField(20);
     57
     58    private final DownloadChangesetContentAction actDownloadChangesetContent = new DownloadChangesetContentAction();
     59    private final UpdateChangesetAction          actUpdateChangesets         = new UpdateChangesetAction();
     60    private final RemoveFromCacheAction          actRemoveFromCache          = new RemoveFromCacheAction();
     61    private final SelectInCurrentLayerAction     actSelectInCurrentLayer     = new SelectInCurrentLayerAction();
     62    private final ZoomInCurrentLayerAction       actZoomInCurrentLayerAction = new ZoomInCurrentLayerAction();
    6363
    6464    private Changeset current = null;
     
    7171
    7272        // -- remove from cache action
    73         tb.add(actRemoveFromCache = new RemoveFromCacheAction());
     73        tb.add(actRemoveFromCache);
    7474        actRemoveFromCache.initProperties(current);
    7575
    7676        // -- changeset update
    77         tb.add(actUpdateChangesets = new UpdateChangesetAction());
     77        tb.add(actUpdateChangesets);
    7878        actUpdateChangesets.initProperties(current);
    7979
    8080        // -- changeset content download
    81         tb.add(actDownloadChangesetContent =new DonwloadChangesetContentAction());
     81        tb.add(actDownloadChangesetContent);
    8282        actDownloadChangesetContent.initProperties(current);
    8383
    84         tb.add(actSelectInCurrentLayer = new SelectInCurrentLayerAction());
     84        tb.add(actSelectInCurrentLayer);
    8585        MapView.addEditLayerChangeListener(actSelectInCurrentLayer);
    8686
    87         tb.add(actZoomInCurrentLayerAction = new ZoomInCurrentLayerAction());
     87        tb.add(actZoomInCurrentLayerAction);
    8888        MapView.addEditLayerChangeListener(actZoomInCurrentLayerAction);
    8989
     
    119119        gc.weightx = 0.0;
    120120        gc.gridx = 1;
    121         pnl.add(tfID = new JosmTextField(10), gc);
     121        pnl.add(tfID, gc);
    122122        tfID.setEditable(false);
    123123
     
    133133        gc.weighty = 1.0;
    134134        gc.gridx = 1;
    135         pnl.add(taComment= new JosmTextArea(5,40), gc);
     135        pnl.add(taComment, gc);
    136136        taComment.setEditable(false);
    137137
     
    146146        gc.fill = GridBagConstraints.HORIZONTAL;
    147147        gc.gridx = 1;
    148         pnl.add(tfOpen= new JosmTextField(10), gc);
     148        pnl.add(tfOpen, gc);
    149149        tfOpen.setEditable(false);
    150150
     
    159159        gc.weightx = 1.0;
    160160        gc.gridx = 1;
    161         pnl.add(tfUser= new JosmTextField(""), gc);
     161        pnl.add(tfUser, gc);
    162162        tfUser.setEditable(false);
    163163
     
    171171        gc.fill = GridBagConstraints.HORIZONTAL;
    172172        gc.gridx = 1;
    173         pnl.add(tfCreatedOn= new JosmTextField(20), gc);
     173        pnl.add(tfCreatedOn, gc);
    174174        tfCreatedOn.setEditable(false);
    175175
     
    183183        gc.fill = GridBagConstraints.HORIZONTAL;
    184184        gc.gridx = 1;
    185         pnl.add(tfClosedOn= new JosmTextField(20), gc);
     185        pnl.add(tfClosedOn, gc);
    186186        tfClosedOn.setEditable(false);
    187187
     
    189189    }
    190190
    191     protected void build() {
     191    protected final void build() {
    192192        setLayout(new BorderLayout());
    193193        setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
     
    259259        if (! evt.getPropertyName().equals(ChangesetCacheManagerModel.CHANGESET_IN_DETAIL_VIEW_PROP))
    260260            return;
    261         Changeset cs = (Changeset)evt.getNewValue();
    262         setCurrentChangeset(cs);
     261        setCurrentChangeset((Changeset)evt.getNewValue());
    263262    }
    264263
     
    289288     *
    290289     */
    291     class DonwloadChangesetContentAction extends AbstractAction{
    292         public DonwloadChangesetContentAction() {
     290    class DownloadChangesetContentAction extends AbstractAction {
     291        public DownloadChangesetContentAction() {
    293292            putValue(NAME, tr("Download content"));
    294             putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","downloadchangesetcontent"));
     293            putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON);
    295294            putValue(SHORT_DESCRIPTION, tr("Download the changeset content from the OSM server"));
    296295        }
     
    299298        public void actionPerformed(ActionEvent evt) {
    300299            if (current == null) return;
    301             ChangesetContentDownloadTask task = new ChangesetContentDownloadTask(ChangesetDetailPanel.this,current.getId());
     300            ChangesetContentDownloadTask task = new ChangesetContentDownloadTask(ChangesetDetailPanel.this, current.getId());
    302301            ChangesetCacheManager.getInstance().runDownloadTask(task);
    303302        }
     
    312311            if (cs.getContent() == null) {
    313312                putValue(NAME, tr("Download content"));
    314                 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","downloadchangesetcontent"));
     313                putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON);
    315314                putValue(SHORT_DESCRIPTION, tr("Download the changeset content from the OSM server"));
    316315            } else {
    317316                putValue(NAME, tr("Update content"));
    318                 putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset","updatechangesetcontent"));
     317                putValue(SMALL_ICON, ChangesetCacheManager.UPDATE_CONTENT_ICON);
    319318                putValue(SHORT_DESCRIPTION, tr("Update the changeset content from the OSM server"));
    320319            }
     
    329328        public UpdateChangesetAction() {
    330329            putValue(NAME, tr("Update changeset"));
    331             putValue(SMALL_ICON,ImageProvider.get("dialogs/changeset","updatechangeset"));
     330            putValue(SMALL_ICON, ChangesetCacheManager.UPDATE_CONTENT_ICON);
    332331            putValue(SHORT_DESCRIPTION, tr("Update the changeset from the OSM server"));
    333332        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java

    r6084 r6603  
    2020import org.openstreetmap.josm.gui.widgets.ChangesetIdTextField;
    2121import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator;
    22 import org.openstreetmap.josm.tools.ImageProvider;
    2322
    2423/**
     
    8079
    8180        public DownloadAction() {
    82             putValue(SMALL_ICON, ImageProvider.get("dialogs/changeset", "downloadchangesetcontent"));
     81            putValue(SMALL_ICON, ChangesetCacheManager.DOWNLOAD_CONTENT_ICON);
    8382            putValue(SHORT_DESCRIPTION, tr("Download the changeset with the specified id, including the changeset content"));
    8483            updateEnabledState();
  • trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java

    r6541 r6603  
    153153         * The list of default name tags from which a label candidate is derived.
    154154         */
    155         static public final String[] DEFAULT_NAME_TAGS = {
     155        public static final String[] DEFAULT_NAME_TAGS = {
    156156            "name:" + LanguageInfo.getJOSMLocaleCode(),
    157157            "name",
     
    167167         * @since 6541
    168168         */
    169         static public final String[] DEFAULT_NAME_COMPLEMENT_TAGS = {
     169        public static final String[] DEFAULT_NAME_COMPLEMENT_TAGS = {
    170170            "capacity"
    171171        };
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java

    r6578 r6603  
    1212import java.awt.event.MouseEvent;
    1313import java.util.ArrayList;
    14 import java.util.Collection;
    1514import java.util.List;
    1615import java.util.Map;
     
    120119            if (llEditor.getValue() == 1) {
    121120                List<List<String>> data = llEditor.getData();
    122                 @SuppressWarnings("unchecked")
    123                 Collection<Collection<String>> stgValue = (Collection<Collection<String>>) stg.getValue();
    124121                if (!llSetting.equalVal(data)) {
    125122                    e.setValue(new Preferences.ListListSetting(data));
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java

    r6529 r6603  
    5555import org.openstreetmap.josm.tools.ImageProvider;
    5656
     57/**
     58 * Preference settings for plugins.
     59 * @since 168
     60 */
    5761public final class PluginPreference extends DefaultTabPreferenceSetting {
    5862
     
    7175    }
    7276
     77    /**
     78     * Returns the download summary string to be shown.
     79     * @param task The plugin download task that has completed
     80     * @return the download summary string to be shown. Contains summary of success/failed plugins.
     81     */
    7382    public static String buildDownloadSummary(PluginDownloadTask task) {
    7483        Collection<PluginInformation> downloaded = task.getDownloadedPlugins();
     
    469478    }
    470479
    471     static private class PluginConfigurationSitesPanel extends JPanel {
     480    private static class PluginConfigurationSitesPanel extends JPanel {
    472481
    473482        private DefaultListModel model;
  • trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java

    r6553 r6603  
    3232    public final JButton deleteSrcButton = new JButton(tr("Delete"));
    3333
     34    /**
     35     * Constructs a new {@code EditableList}.
     36     * @param title The title displayed in input dialog
     37     */
    3438    public EditableList(String title) {
    3539        this.title = title;
     
    3741    }
    3842
    39     protected void build() {
     43    protected final void build() {
    4044
    41         //setLayout(new GridBagLayout());
    4245        setLayout(new BorderLayout());
    4346
Note: See TracChangeset for help on using the changeset viewer.