Ignore:
Timestamp:
2013-01-10T17:31:17+01:00 (13 years ago)
Author:
malcolmh
Message:

save

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed2/src/symbols/Beacons.java

    r29185 r29186  
    1717import java.awt.geom.Line2D;
    1818import java.awt.geom.Path2D;
    19 import java.util.ArrayList;
    2019import java.util.EnumMap;
    2120
    22 import symbols.Symbols.Instr;
    23 import symbols.Symbols.Prim;
     21import symbols.Symbols.*;
    2422
    2523import s57.S57val.*;
     
    2725public class Beacons {
    2826       
    29         public static final ArrayList<Instr> Beacon = new ArrayList<Instr>();
     27        public static final Symbol Beacon = new Symbol();
    3028        static {
    31                 ArrayList<Instr> colours = new ArrayList<Instr>();
     29                Symbol colours = new Symbol();
    3230                Path2D.Double p = new Path2D.Double(); p.moveTo(-6.0,-8.5); p.lineTo(-6.0,-70.0); p.lineTo(6.0,-70.0); p.lineTo(6.0,-8.5); p.curveTo(6.0,-10.0,-6.0,-10.0,-6.0,-8.5); p.closePath();
    3331                colours.add(new Instr(Prim.P1, p));
     
    5149                Beacon.add(new Instr(Prim.PLIN, p));
    5250        }
    53         public static final ArrayList<Instr> Cairn = new ArrayList<Instr>();
     51        public static final Symbol Cairn = new Symbol();
    5452        static {
    5553                Cairn.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
     
    6260                Cairn.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-18,-70,36,36)));
    6361        }
    64         public static final ArrayList<Instr> FogSignal = new ArrayList<Instr>();
     62        public static final Symbol FogSignal = new Symbol();
    6563        static {
    6664                FogSignal.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
     
    7371                FogSignal.add(new Instr(Prim.EARC, new Arc2D.Double(-65.0,-65.0,130.0,130.0,190.0,50.0,Arc2D.OPEN)));
    7472        }
    75         public static final ArrayList<Instr> LightFlare = new ArrayList<Instr>();
     73        public static final Symbol LightFlare = new Symbol();
    7674        static {
    7775                LightFlare.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-3,-3,6,6)));
     
    8179                LightFlare.add(new Instr(Prim.PGON, p));
    8280        }
    83         public static final ArrayList<Instr> LightMajor = new ArrayList<Instr>();
     81        public static final Symbol LightMajor = new Symbol();
    8482        static {
    8583                LightMajor.add(new Instr(Prim.FILL, Color.black));
     
    9088                LightMajor.add(new Instr(Prim.PGON, p));
    9189        }
    92         public static final ArrayList<Instr> LightMinor = new ArrayList<Instr>();
     90        public static final Symbol LightMinor = new Symbol();
    9391        static {
    9492                LightMinor.add(new Instr(Prim.FILL, Color.black));
     
    9795                LightMinor.add(new Instr(Prim.PGON, p));
    9896        }
    99         public static final ArrayList<Instr> PerchPort = new ArrayList<Instr>();
     97        public static final Symbol PerchPort = new Symbol();
    10098        static {
    10199                PerchPort.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
     
    106104                PerchPort.add(new Instr(Prim.LINE, new Line2D.Double(-25,-70,0,-40)));
    107105        }
    108         public static final ArrayList<Instr> PerchStarboard = new ArrayList<Instr>();
     106        public static final Symbol PerchStarboard = new Symbol();
    109107        static {
    110108                PerchStarboard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
     
    115113                PerchStarboard.add(new Instr(Prim.LINE, new Line2D.Double(-25,-40,0,-68.7)));
    116114        }
    117         public static final ArrayList<Instr> RadarStation = new ArrayList<Instr>();
     115        public static final Symbol RadarStation = new Symbol();
    118116        static {
    119117                RadarStation.add(new Instr(Prim.STRK, new BasicStroke(2.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
     
    121119                RadarStation.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-125,-125,250,250)));
    122120        }
    123         public static final ArrayList<Instr> Stake = new ArrayList<Instr>();
     121        public static final Symbol Stake = new Symbol();
    124122        static {
    125123                Stake.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
    126124                Stake.add(new Instr(Prim.FILL, Color.black));
    127125                Stake.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-70)));
    128                 ArrayList<Instr> colours = new ArrayList<Instr>();
     126                Symbol colours = new Symbol();
    129127                Path2D.Double p = new Path2D.Double(); p.moveTo(-2.0,0.0); p.lineTo(-2.0,-70.0); p.lineTo(2.0,-70.0); p.lineTo(2.0,0.0); p.closePath();
    130128                colours.add(new Instr(Prim.P1, p));
     
    141139                Stake.add(new Instr(Prim.LINE, new Line2D.Double(-10,0,10,0)));
    142140        }
    143         public static final ArrayList<Instr> Tower = new ArrayList<Instr>();
     141        public static final Symbol Tower = new Symbol();
    144142        static {
    145                 ArrayList<Instr> colours = new ArrayList<Instr>();
     143                Symbol colours = new Symbol();
    146144                Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0.0); p.lineTo(-20.0,-70.0); p.lineTo(20.0,-70.0); p.lineTo(25.0,0.0); p.lineTo(10.0,0.0); p.curveTo(10.0,-13.3,-10.0,-13.3,-10.0,0.0); p.closePath();
    147145                colours.add(new Instr(Prim.P1, p));
     
    165163                Tower.add(new Instr(Prim.PLIN, p));
    166164        }
    167         public static final ArrayList<Instr> WithyPort = new ArrayList<Instr>();
     165        public static final Symbol WithyPort = new Symbol();
    168166        static {
    169167                WithyPort.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
     
    176174                WithyPort.add(new Instr(Prim.LINE, new Line2D.Double(-30,-35,0,-21)));
    177175        }
    178         public static final ArrayList<Instr> WithyStarboard = new ArrayList<Instr>();
     176        public static final Symbol WithyStarboard = new Symbol();
    179177        static {
    180178                WithyStarboard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND)));
     
    188186        }
    189187       
    190         public static final EnumMap<BcnSHP, ArrayList<Instr>> Shapes = new EnumMap<BcnSHP, ArrayList<Instr>>(BcnSHP.class);
     188        public static final EnumMap<BcnSHP, Symbol> Shapes = new EnumMap<BcnSHP, Symbol>(BcnSHP.class);
    191189        static {
    192190                Shapes.put(BcnSHP.BCN_UNKN, Beacons.Beacon); Shapes.put(BcnSHP.BCN_STAK, Beacons.Stake); Shapes.put(BcnSHP.BCN_TOWR, Beacons.Tower);
Note: See TracChangeset for help on using the changeset viewer.