Ignore:
Timestamp:
2017-07-30T00:22:46+02:00 (7 years ago)
Author:
Don-vip
Message:

PMD - VariableNamingConventions

Location:
trunk/src/org/openstreetmap/josm/gui/io
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java

    r11893 r12537  
    3838 */
    3939class LayerNameAndFilePathTableCell extends JPanel implements TableCellRenderer, TableCellEditor {
    40     private static final Color colorError = new Color(255, 197, 197);
     40    private static final Color COLOR_ERROR = new Color(255, 197, 197);
    4141    private static final String ELLIPSIS = '…' + File.separator;
    4242
     
    4646    private final JButton btnFileChooser = new JButton(new LaunchFileChooserAction());
    4747
    48     private static final GBC defaultCellStyle = GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 0);
     48    private static final GBC DEFAULT_CELL_STYLE = GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 0);
    4949
    5050    private final transient CellEditorSupport cellEditorSupport = new CellEditorSupport(this);
     
    137137        lblLayerName.setIcon(info.getLayer().getIcon());
    138138        lblLayerName.setText(info.getName());
    139         add(lblLayerName, defaultCellStyle);
     139        add(lblLayerName, DEFAULT_CELL_STYLE);
    140140        return tr("The bold text is the name of the layer.");
    141141    }
     
    164164        }
    165165
    166         lblFilename.setBackground(error ? colorError : getBackground());
    167         btnFileChooser.setBackground(error ? colorError : getBackground());
    168 
    169         add(lblFilename, defaultCellStyle);
     166        lblFilename.setBackground(error ? COLOR_ERROR : getBackground());
     167        btnFileChooser.setBackground(error ? COLOR_ERROR : getBackground());
     168
     169        add(lblFilename, DEFAULT_CELL_STYLE);
    170170        return tr("Click cell to change the file path.") + "<br/>" + tooltip;
    171171    }
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTableColumnModel.java

    r12452 r12537  
    2727        private final JLabel needsUpload = new JLabel(tr("should be uploaded"));
    2828        private final JLabel needsSave = new JLabel(tr("should be saved"));
    29         private static final GBC defaultCellStyle = GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 0);
     29        private static final GBC DEFAULT_CELL_STYLE = GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 0);
    3030
    3131        /**
     
    4848                String htmlInfoName = Utils.escapeReservedCharactersHTML(info.getName());
    4949                if (info.getLayer().requiresUploadToServer() && !info.getLayer().isUploadDiscouraged()) {
    50                     panel.add(needsUpload, defaultCellStyle);
     50                    panel.add(needsUpload, DEFAULT_CELL_STYLE);
    5151                    sb.append(tr("Layer ''{0}'' has modifications which should be uploaded to the server.", htmlInfoName));
    5252
    5353                } else {
    5454                    if (info.isUploadable()) {
    55                         panel.add(pnlEmpty, defaultCellStyle);
     55                        panel.add(pnlEmpty, DEFAULT_CELL_STYLE);
    5656                    }
    5757                    if (info.getLayer().requiresUploadToServer()) {
     
    6464
    6565                if (info.getLayer().requiresSaveToFile()) {
    66                     panel.add(needsSave, defaultCellStyle);
     66                    panel.add(needsSave, DEFAULT_CELL_STYLE);
    6767                    sb.append(tr("Layer ''{0}'' has modifications which should be saved to its associated file ''{1}''.",
    6868                            htmlInfoName, info.getFile().toString()));
    6969                } else {
    7070                    if (info.isSavable()) {
    71                         panel.add(pnlEmpty, defaultCellStyle);
     71                        panel.add(pnlEmpty, DEFAULT_CELL_STYLE);
    7272                    }
    7373                    sb.append(tr("Layer ''{0}'' has no modifications to be saved.", htmlInfoName));
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r12531 r12537  
    7575
    7676    /** list of custom components that can be added by plugins at JOSM startup */
    77     private static final Collection<Component> customComponents = new ArrayList<>();
     77    private static final Collection<Component> CUSTOM_COMPONENTS = new ArrayList<>();
    7878
    7979    /** the "created_by" changeset OSM key */
     
    136136
    137137        // Custom components
    138         for (Component c : customComponents) {
     138        for (Component c : CUSTOM_COMPONENTS) {
    139139            pnl.add(c, GBC.eol().fill(GBC.HORIZONTAL));
    140140        }
     
    406406    public static boolean addCustomComponent(Component c) {
    407407        if (c != null) {
    408             return customComponents.add(c);
     408            return CUSTOM_COMPONENTS.add(c);
    409409        }
    410410        return false;
Note: See TracChangeset for help on using the changeset viewer.