Ignore:
Timestamp:
2015-08-01T21:26:26+02:00 (9 years ago)
Author:
donvip
Message:

[jmapviewer] fix checkstyle issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapPolygonImpl.java

    r30223 r31429  
    2525        this(null, null, points);
    2626    }
     27
    2728    public MapPolygonImpl(List<? extends ICoordinate> points) {
    2829        this(null, null, points);
    2930    }
     31
    3032    public MapPolygonImpl(String name, List<? extends ICoordinate> points) {
    3133        this(null, name, points);
    3234    }
     35
    3336    public MapPolygonImpl(String name, ICoordinate ... points) {
    3437        this(null, name, points);
    3538    }
     39
    3640    public MapPolygonImpl(Layer layer, List<? extends ICoordinate> points) {
    3741        this(layer, null, points);
    3842    }
     43
    3944    public MapPolygonImpl(Layer layer, String name, List<? extends ICoordinate> points) {
    4045        this(layer, name, points, getDefaultStyle());
    4146    }
     47
    4248    public MapPolygonImpl(Layer layer, String name, ICoordinate ... points) {
    4349        this(layer, name, Arrays.asList(points), getDefaultStyle());
    4450    }
     51
    4552    public MapPolygonImpl(Layer layer, String name, List<? extends ICoordinate> points, Style style) {
    4653        super(layer, name, style);
     
    7683        // Draw
    7784        g.drawPolygon(polygon);
    78         if (g instanceof Graphics2D && getBackColor()!=null) {
     85        if (g instanceof Graphics2D && getBackColor() != null) {
    7986            Graphics2D g2 = (Graphics2D) g;
    8087            Composite oldComposite = g2.getComposite();
     
    9198        Rectangle rec = polygon.getBounds();
    9299        Point corner = rec.getLocation();
    93         Point p= new Point(corner.x+(rec.width/2), corner.y+(rec.height/2));
    94         if(getLayer()==null||getLayer().isVisibleTexts()) paintText(g, p);
     100        Point p = new Point(corner.x+(rec.width/2), corner.y+(rec.height/2));
     101        if (getLayer() == null || getLayer().isVisibleTexts()) paintText(g, p);
    95102    }
    96103
    97     public static Style getDefaultStyle(){
    98         return new Style(Color.BLUE, new Color(100,100,100,50), new BasicStroke(2), getDefaultFont());
     104    public static Style getDefaultStyle() {
     105        return new Style(Color.BLUE, new Color(100, 100, 100, 50), new BasicStroke(2), getDefaultFont());
    99106    }
    100107
Note: See TracChangeset for help on using the changeset viewer.