Ignore:
Timestamp:
2015-05-11T13:34:53+02:00 (9 years ago)
Author:
Don-vip
Message:

squid:S00116 - Field names should comply with a naming convention

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

Legend:

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

    r8126 r8346  
    7373    private static NotificationManager INSTANCE = null;
    7474
    75     private final Color PANEL_SEMITRANSPARENT = new Color(224, 236, 249, 230);
    76     private final Color PANEL_OPAQUE = new Color(224, 236, 249);
     75    private static final Color PANEL_SEMITRANSPARENT = new Color(224, 236, 249, 230);
     76    private static final Color PANEL_OPAQUE = new Color(224, 236, 249);
    7777
    7878    public static synchronized NotificationManager getInstance() {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r8342 r8346  
    9595    public static final BooleanProperty PROP_DYNAMIC_BUTTONS = new BooleanProperty("dialog.dynamic.buttons", false);
    9696
    97     private final transient ParametrizedEnumProperty<ButtonHidingType> PROP_BUTTON_HIDING = new ParametrizedEnumProperty<ToggleDialog.ButtonHidingType>(
    98             ButtonHidingType.class, ButtonHidingType.DYNAMIC) {
     97    private final transient ParametrizedEnumProperty<ButtonHidingType> propButtonHiding =
     98            new ParametrizedEnumProperty<ToggleDialog.ButtonHidingType>(ButtonHidingType.class, ButtonHidingType.DYNAMIC) {
    9999        @Override
    100100        protected String getKey(String... params) {
     
    107107            } catch (IllegalArgumentException e) {
    108108                // Legacy settings
    109                 return Boolean.parseBoolean(s)?ButtonHidingType.DYNAMIC:ButtonHidingType.ALWAYS_SHOWN;
     109                return Boolean.parseBoolean(s) ? ButtonHidingType.DYNAMIC : ButtonHidingType.ALWAYS_SHOWN;
    110110            }
    111111        }
     
    241241        isDocked = Main.pref.getBoolean(preferencePrefix+".docked", true);
    242242        isCollapsed = Main.pref.getBoolean(preferencePrefix+".minimized", false);
    243         buttonHiding = PROP_BUTTON_HIDING.get();
     243        buttonHiding = propButtonHiding.get();
    244244
    245245        /** show the minimize button */
     
    490490        /** the label which displays the dialog's title **/
    491491        private final JLabel lblTitle;
    492         private final JComponent lblTitle_weak;
     492        private final JComponent lblTitleWeak;
    493493        /** the button which shows whether buttons are dynamic or not */
    494494        private final JButton buttonsHide;
     
    512512
    513513            // Cannot add the label directly since it would displace other elements on resize
    514             lblTitle_weak = new JComponent() {
     514            lblTitleWeak = new JComponent() {
    515515                @Override
    516516                public void paintComponent(Graphics g) {
     
    518518                }
    519519            };
    520             lblTitle_weak.setPreferredSize(new Dimension(Integer.MAX_VALUE,20));
    521             lblTitle_weak.setMinimumSize(new Dimension(0,20));
    522             add(lblTitle_weak, GBC.std().fill(GBC.HORIZONTAL));
     520            lblTitleWeak.setPreferredSize(new Dimension(Integer.MAX_VALUE,20));
     521            lblTitleWeak.setMinimumSize(new Dimension(0,20));
     522            add(lblTitleWeak, GBC.std().fill(GBC.HORIZONTAL));
    523523
    524524            buttonsHide = new JButton(ImageProvider.get("misc", buttonHiding != ButtonHidingType.ALWAYS_SHOWN
     
    597597        public void setTitle(String title) {
    598598            lblTitle.setText(title);
    599             lblTitle_weak.repaint();
     599            lblTitleWeak.repaint();
    600600        }
    601601
     
    767767    protected void setIsButtonHiding(ButtonHidingType val) {
    768768        buttonHiding = val;
    769         PROP_BUTTON_HIDING.put(val);
     769        propButtonHiding.put(val);
    770770        refreshHidingButtons();
    771771    }
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java

    r8345 r8346  
    3333 * @since 2019
    3434 */
    35 public class HistoryBrowserDialogManager implements MapView.LayerChangeListener {
     35public final class HistoryBrowserDialogManager implements MapView.LayerChangeListener {
     36
     37    private static final String WINDOW_GEOMETRY_PREF = HistoryBrowserDialogManager.class.getName() + ".geometry";
    3638
    3739    private static HistoryBrowserDialogManager instance;
     
    8991        return false;
    9092    }
    91 
    92     private final String WINDOW_GEOMETRY_PREF = getClass().getName() + ".geometry";
    9393
    9494    protected void placeOnScreen(HistoryBrowserDialog dialog) {
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java

    r8308 r8346  
    3030    private transient ActionListener filterAppliedListener;
    3131
    32     private final String PREF_DATE_0;
    33     private final String PREF_DATE_MIN;
    34     private final String PREF_DATE_MAX;
     32    private final String prefDate0;
     33    private final String prefDateMin;
     34    private final String prefDateMax;
    3535
    3636    /**
     
    4141    public DateFilterPanel(GpxLayer layer, String preferencePrefix, boolean enabled) {
    4242        super(new GridBagLayout());
    43         PREF_DATE_0 = preferencePrefix+".showzerotimestamp";
    44         PREF_DATE_MIN = preferencePrefix+".mintime";
    45         PREF_DATE_MAX = preferencePrefix+".maxtime";
     43        prefDate0 = preferencePrefix+".showzerotimestamp";
     44        prefDateMin = preferencePrefix+".mintime";
     45        prefDateMax = preferencePrefix+".maxtime";
    4646        this.layer = layer;
    4747
     
    101101     */
    102102    public void saveInPrefs() {
    103         Main.pref.putLong(PREF_DATE_MIN, dateFrom.getDate().getTime());
    104         Main.pref.putLong(PREF_DATE_MAX, dateTo.getDate().getTime());
    105         Main.pref.put(PREF_DATE_0, noTimestampCb.isSelected());
     103        Main.pref.putLong(prefDateMin, dateFrom.getDate().getTime());
     104        Main.pref.putLong(prefDateMax, dateTo.getDate().getTime());
     105        Main.pref.put(prefDate0, noTimestampCb.isSelected());
    106106    }
    107107
     
    111111     */
    112112    public void loadFromPrefs() {
    113         long t1 =Main.pref.getLong(PREF_DATE_MIN, 0);
     113        long t1 =Main.pref.getLong(prefDateMin, 0);
    114114        if (t1!=0) dateFrom.setDate(new Date(t1));
    115         long t2 =Main.pref.getLong(PREF_DATE_MAX, 0);
     115        long t2 =Main.pref.getLong(prefDateMax, 0);
    116116        if (t2!=0) dateTo.setDate(new Date(t2));
    117         noTimestampCb.setSelected(Main.pref.getBoolean(PREF_DATE_0, false));
     117        noTimestampCb.setSelected(Main.pref.getBoolean(prefDate0, false));
    118118    }
    119119
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java

    r8087 r8346  
    2323    public static final String[] REPEAT_IMAGE_KEYS = {REPEAT_IMAGE, REPEAT_IMAGE_WIDTH, REPEAT_IMAGE_HEIGHT, REPEAT_IMAGE_OPACITY, null, null};
    2424
    25     public float major_z_index;
    26     public float z_index;
    27     public float object_z_index;
     25    public float majorZIndex;
     26    public float zIndex;
     27    public float objectZIndex;
    2828    public boolean isModifier;  // false, if style can serve as main style for the
    2929    // primitive; true, if it is a highlight or modifier
    3030
    3131    public ElemStyle(float major_z_index, float z_index, float object_z_index, boolean isModifier) {
    32         this.major_z_index = major_z_index;
    33         this.z_index = z_index;
    34         this.object_z_index = object_z_index;
     32        this.majorZIndex = major_z_index;
     33        this.zIndex = z_index;
     34        this.objectZIndex = object_z_index;
    3535        this.isModifier = isModifier;
    3636    }
    3737
    3838    protected ElemStyle(Cascade c, float default_major_z_index) {
    39         major_z_index = c.get(MAJOR_Z_INDEX, default_major_z_index, Float.class);
    40         z_index = c.get(Z_INDEX, 0f, Float.class);
    41         object_z_index = c.get(OBJECT_Z_INDEX, 0f, Float.class);
     39        majorZIndex = c.get(MAJOR_Z_INDEX, default_major_z_index, Float.class);
     40        zIndex = c.get(Z_INDEX, 0f, Float.class);
     41        objectZIndex = c.get(OBJECT_Z_INDEX, 0f, Float.class);
    4242        isModifier = c.get(MODIFIER, false, Boolean.class);
    4343    }
     
    208208            return false;
    209209        ElemStyle s = (ElemStyle) o;
    210         return major_z_index == s.major_z_index &&
    211                 z_index == s.z_index &&
    212                 object_z_index == s.object_z_index &&
     210        return majorZIndex == s.majorZIndex &&
     211                zIndex == s.zIndex &&
     212                objectZIndex == s.objectZIndex &&
    213213                isModifier == s.isModifier;
    214214    }
     
    217217    public int hashCode() {
    218218        int hash = 5;
    219         hash = 41 * hash + Float.floatToIntBits(this.major_z_index);
    220         hash = 41 * hash + Float.floatToIntBits(this.z_index);
    221         hash = 41 * hash + Float.floatToIntBits(this.object_z_index);
     219        hash = 41 * hash + Float.floatToIntBits(this.majorZIndex);
     220        hash = 41 * hash + Float.floatToIntBits(this.zIndex);
     221        hash = 41 * hash + Float.floatToIntBits(this.objectZIndex);
    222222        hash = 41 * hash + (isModifier ? 1 : 0);
    223223        return hash;
     
    226226    @Override
    227227    public String toString() {
    228         return String.format("z_idx=[%s/%s/%s] ", major_z_index, z_index, object_z_index) + (isModifier ? "modifier " : "");
     228        return String.format("z_idx=[%s/%s/%s] ", majorZIndex, zIndex, objectZIndex) + (isModifier ? "modifier " : "");
    229229    }
    230230}
  • trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java

    r8087 r8346  
    4747
    4848        public final String prefix;
    49         public final float default_major_z_index;
     49        public final float defaultMajorZIndex;
    5050
    5151        LineType(String prefix, float default_major_z_index) {
    5252            this.prefix = prefix;
    53             this.default_major_z_index = default_major_z_index;
     53            this.defaultMajorZIndex = default_major_z_index;
    5454        }
    5555    }
     
    258258        }
    259259
    260         return new LineElemStyle(c, type.default_major_z_index, line, color, dashesLine, dashesBackground, offset, realWidth);
     260        return new LineElemStyle(c, type.defaultMajorZIndex, line, color, dashesLine, dashesBackground, offset, realWidth);
    261261    }
    262262
Note: See TracChangeset for help on using the changeset viewer.