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

save

File:
1 edited

Legend:

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

    r29132 r29186  
    1414import java.awt.Rectangle;
    1515import java.awt.geom.*;
    16 import java.util.ArrayList;
    1716
    18 import symbols.Symbols.Instr;
    19 import symbols.Symbols.Prim;
     17import symbols.Symbols.*;
    2018
    2119public class Harbours {
    22         public static final ArrayList<Instr> Anchor = new ArrayList<Instr>();
     20        public static final Symbol Anchor = new Symbol();
    2321        static {
    2422                Anchor.add(new Instr(Prim.BBOX, new Rectangle(-60,-60,120,120)));
     
    3129                Anchor.add(new Instr(Prim.PGON, p));
    3230        }
    33         public static final ArrayList<Instr> Yacht = new ArrayList<Instr>();
     31        public static final Symbol Yacht = new Symbol();
    3432        static {
    3533                Yacht.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     
    3937                Yacht.add(new Instr(Prim.PGON, p));
    4038        }
    41         public static final ArrayList<Instr> Anchorage = new ArrayList<Instr>();
     39        public static final Symbol Anchorage = new Symbol();
    4240        static {
    4341                Anchorage.add(new Instr(Prim.FILL, new Color(0xa30075)));
    44                 Anchorage.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 1.0, 0, 0, null, null)));
     42                Anchorage.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 1.0, 0, 0, null, null)));
    4543        }
    46         public static final ArrayList<Instr> AnchorBerth = new ArrayList<Instr>();
     44        public static final Symbol AnchorBerth = new Symbol();
    4745        static {
    48                 AnchorBerth.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchorage, 1.0, 0, 0, null, null)));
     46                AnchorBerth.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchorage, 1.0, 0, 0, null, null)));
    4947                AnchorBerth.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
    5048                AnchorBerth.add(new Instr(Prim.FILL, Color.white));
     
    5452                AnchorBerth.add(new Instr(Prim.ELPS, s));
    5553        }
    56         public static final ArrayList<Instr> Bollard = new ArrayList<Instr>();
     54        public static final Symbol Bollard = new Symbol();
    5755        static {
    5856                Bollard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     
    6361                Bollard.add(new Instr(Prim.ELPS, s));
    6462        }
    65         public static final ArrayList<Instr> ClearV = new ArrayList<Instr>();
     63        public static final Symbol ClearV = new Symbol();
    6664        static {
    6765                ClearV.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     
    7472                ClearV.add(new Instr(Prim.LINE, new Line2D.Double(0,25,0,15)));
    7573        }
    76         public static final ArrayList<Instr> ContainerCrane = new ArrayList<Instr>();
     74        public static final Symbol ContainerCrane = new Symbol();
    7775        static {
    7876                ContainerCrane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     
    8179                ContainerCrane.add(new Instr(Prim.RECT, new Rectangle2D.Double(-40,-12.5,80,25)));
    8280        }
    83         public static final ArrayList<Instr> DeviationDolphin = new ArrayList<Instr>();
     81        public static final Symbol DeviationDolphin = new Symbol();
    8482        static {
    8583                DeviationDolphin.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     
    8987                DeviationDolphin.add(new Instr(Prim.PLIN, p));
    9088        }
    91         public static final ArrayList<Instr> DistanceI = new ArrayList<Instr>();
     89        public static final Symbol DistanceI = new Symbol();
    9290        static {
    9391                DistanceI.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     
    9593                DistanceI.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22)));
    9694        }
    97         public static final ArrayList<Instr> DistanceU = new ArrayList<Instr>();
     95        public static final Symbol DistanceU = new Symbol();
    9896        static {
    9997                DistanceU.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     
    10199                DistanceU.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22)));
    102100        }
    103         public static final ArrayList<Instr> Dolphin = new ArrayList<Instr>();
     101        public static final Symbol Dolphin = new Symbol();
    104102        static {
    105103                Dolphin.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     
    111109                Dolphin.add(new Instr(Prim.PLIN, p));
    112110        }
    113         public static final ArrayList<Instr> Harbour = new ArrayList<Instr>();
     111        public static final Symbol Harbour = new Symbol();
    114112        static {
    115113                Harbour.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
    116114                Harbour.add(new Instr(Prim.FILL, new Color(0xa30075)));
    117115                Harbour.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-75,-75,150,150)));
    118                 Harbour.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 1.0, 0, 0, null, null)));
     116                Harbour.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 1.0, 0, 0, null, null)));
    119117        }
    120         public static final ArrayList<Instr> HarbourMaster = new ArrayList<Instr>();
     118        public static final Symbol HarbourMaster = new Symbol();
    121119        static {
    122120                HarbourMaster.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
    123121                HarbourMaster.add(new Instr(Prim.FILL, Color.black));
    124122                HarbourMaster.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-35,-50,70,100)));
    125                 HarbourMaster.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 0.6, 0, 0, null, null)));
     123                HarbourMaster.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.6, 0, 0, null, null)));
    126124        }
    127         public static final ArrayList<Instr> LandingSteps = new ArrayList<Instr>();
     125        public static final Symbol LandingSteps = new Symbol();
    128126        static {
    129127                LandingSteps.add(new Instr(Prim.FILL, new Color(0xa30075)));
     
    132130                LandingSteps.add(new Instr(Prim.PGON, p));
    133131        }
    134         public static final ArrayList<Instr> Lock_Gate = new ArrayList<Instr>();
    135         public static final ArrayList<Instr> Lock = new ArrayList<Instr>();
    136         public static final ArrayList<Instr> Marina = new ArrayList<Instr>();
     132        public static final Symbol Lock_Gate = new Symbol();
     133        public static final Symbol Lock = new Symbol();
     134        public static final Symbol Marina = new Symbol();
    137135        static {
    138136                Marina.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
    139137                Marina.add(new Instr(Prim.FILL, new Color(0xa30075)));
    140                 Marina.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Yacht, 1.0, 0, 0, null, null)));
     138                Marina.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 1.0, 0, 0, null, null)));
    141139                Marina.add(new Instr(Prim.EARC, new Arc2D.Double(-80.0,-80.0,160.0,160.0,215.0,-250.0,Arc2D.OPEN)));
    142140        }
    143         public static final ArrayList<Instr> MarinaNF = new ArrayList<Instr>();
     141        public static final Symbol MarinaNF = new Symbol();
    144142        static {
    145143                MarinaNF.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
    146144                MarinaNF.add(new Instr(Prim.FILL, new Color(0xa30075)));
    147                 MarinaNF.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Yacht, 1.0, 0, 0, null, null)));
     145                MarinaNF.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Yacht, 1.0, 0, 0, null, null)));
    148146        }
    149         public static final ArrayList<Instr> PortCrane = new ArrayList<Instr>();
     147        public static final Symbol PortCrane = new Symbol();
    150148        static {
    151149                PortCrane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     
    154152                PortCrane.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-60)));
    155153        }
    156         public static final ArrayList<Instr> Post = new ArrayList<Instr>();
     154        public static final Symbol Post = new Symbol();
    157155        static {
    158156                Post.add(new Instr(Prim.FILL, Color.black));
    159157                Post.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-10,-10,20,20)));
    160158        }
    161         public static final ArrayList<Instr> SignalStation = new ArrayList<Instr>();
     159        public static final Symbol SignalStation = new Symbol();
    162160        static {
    163161                SignalStation.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
     
    166164                SignalStation.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8)));
    167165        }
    168         public static final ArrayList<Instr> TideGauge = new ArrayList<Instr>();
     166        public static final Symbol TideGauge = new Symbol();
    169167        static {
    170168                TideGauge.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
Note: See TracChangeset for help on using the changeset viewer.