Ignore:
Timestamp:
2012-01-24T21:52:43+01:00 (12 years ago)
Author:
jttt
Message:

Use final were appropriate

File:
1 edited

Legend:

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

    r4319 r4869  
    22package org.openstreetmap.josm.gui.mappaint;
    33
    4 import java.awt.Color;
    54import static org.openstreetmap.josm.tools.Utils.equal;
    65
     6import java.awt.Color;
    77import java.awt.Rectangle;
     8
    89import org.openstreetmap.josm.data.osm.Node;
    910import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    1112import org.openstreetmap.josm.data.osm.visitor.paint.MapPainter;
    1213import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
    13 
    1414import org.openstreetmap.josm.tools.CheckParameterUtil;
    1515
     
    2121    public enum HorizontalTextAlignment { LEFT, CENTER, RIGHT }
    2222    public enum VerticalTextAlignment { ABOVE, TOP, CENTER, BOTTOM, BELOW }
    23    
    24     public static Rectangle ZERO_BOX = new Rectangle(0, 0, 0, 0);
    25    
     23
     24    public static final Rectangle ZERO_BOX = new Rectangle(0, 0, 0, 0);
     25
    2626    public TextElement text;
    2727    public Rectangle box;
     
    3939        this.vAlign = vAlign;
    4040    }
    41    
     41
    4242    public static BoxTextElemStyle create(Environment env, Rectangle box) {
    4343        initDefaultParameters();
     
    7373            vAlign = VerticalTextAlignment.BELOW;
    7474        }
    75        
     75
    7676        return new BoxTextElemStyle(c, text, box, hAlign, vAlign);
    7777    }
    78    
     78
    7979    public static final BoxTextElemStyle SIMPLE_NODE_TEXT_ELEMSTYLE;
    8080    static {
     
    108108    @Override
    109109    public boolean equals(Object obj) {
    110         if (!super.equals(obj)) {
     110        if (!super.equals(obj))
    111111            return false;
    112         }
    113         if (obj == null || getClass() != obj.getClass()) {
     112        if (obj == null || getClass() != obj.getClass())
    114113            return false;
    115         }
    116114        final BoxTextElemStyle other = (BoxTextElemStyle) obj;
    117115        return text.equals(other.text) &&
    118                 box.equals(other.box) && 
    119                 hAlign == other.hAlign && 
     116                box.equals(other.box) &&
     117                hAlign == other.hAlign &&
    120118                vAlign == other.vAlign;
    121119    }
Note: See TracChangeset for help on using the changeset viewer.