Ignore:
Timestamp:
2016-09-03T16:43:42+02:00 (9 years ago)
Author:
donvip
Message:

checkstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/jicons/src/jicons/Jicons.java

    r32906 r32907  
    1 /* Copyright 2014 Malcolm Herring
    2  *
    3  * This is free software: you can redistribute it and/or modify
    4  * it under the terms of the GNU General Public License as published by
    5  * the Free Software Foundation, version 3 of the License.
    6  *
    7  * For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.
    8  */
    9 
     1// License: GPL. For details, see LICENSE file.
    102package jicons;
    113
     4import java.awt.Color;
     5import java.awt.Dimension;
     6import java.awt.Graphics2D;
     7import java.awt.Rectangle;
     8import java.awt.geom.Point2D;
     9import java.awt.image.BufferedImage;
    1210import java.io.BufferedReader;
    1311import java.io.File;
     
    1715import java.io.OutputStreamWriter;
    1816import java.io.Writer;
    19 import java.awt.Color;
    20 import java.awt.Dimension;
    21 import java.awt.Graphics2D;
    22 import java.awt.Rectangle;
    23 import java.awt.geom.Point2D;
    24 import java.awt.image.BufferedImage;
    2517
    2618import javax.imageio.ImageIO;
    2719
     20import org.apache.batik.dom.GenericDOMImplementation;
    2821import org.apache.batik.svggen.SVGGraphics2D;
    2922import org.apache.batik.svggen.SVGGraphics2DIOException;
    30 import org.apache.batik.dom.GenericDOMImplementation;
     23import org.w3c.dom.DOMImplementation;
    3124import org.w3c.dom.Document;
    32 import org.w3c.dom.DOMImplementation;
    33 
     25
     26import render.ChartContext;
     27import render.Renderer;
    3428import s57.S57map;
    35 import s57.S57map.*;
    36 import render.*;
    37 
    38 public class Jicons {
    39    
     29import s57.S57map.Feature;
     30import s57.S57map.Snode;
     31
     32/**
     33 * @author Malcolm Herring
     34 */
     35public final class Jicons {
     36    private Jicons() {
     37        // Hide default constructor for utilities classes
     38    }
     39
    4040    static int x = 0;
    4141    static int y = 0;
     
    5858        boolean inIcons = false;
    5959        boolean inIcon = false;
    60        
     60
    6161        if (args.length < 2) {
    6262            System.err.println("Usage: java -jar jicons.jar icon_definition_file icons_directory");
     
    6464        }
    6565        in = new BufferedReader(new FileReader(args[0]));
    66        
     66
    6767        context = new Context();
    6868        String ln;
     
    188188        System.exit(0);
    189189    }
    190    
     190
    191191    static class Context implements ChartContext {
    192        
     192
     193        @Override
    193194        public Point2D getPoint(Snode coord) {
    194195            return new Point2D.Double(x, y);
    195196        }
    196197
     198        @Override
    197199        public double mile(Feature feature) {
    198200            return Math.min(w, h);
    199201        }
    200202
     203        @Override
    201204        public boolean clip() {
    202205            return false;
    203206        }
    204207
     208        @Override
    205209        public Color background(S57map map) {
    206210            return new Color(0, true);
    207211        }
    208212
     213        @Override
    209214        public RuleSet ruleset() {
    210215            return RuleSet.ALL;
Note: See TracChangeset for help on using the changeset viewer.