Changeset 29186 in osm for applications/editors/josm/plugins/smed2/src/symbols/Beacons.java
- Timestamp:
- 2013-01-10T17:31:17+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/symbols/Beacons.java
r29185 r29186 17 17 import java.awt.geom.Line2D; 18 18 import java.awt.geom.Path2D; 19 import java.util.ArrayList;20 19 import java.util.EnumMap; 21 20 22 import symbols.Symbols.Instr; 23 import symbols.Symbols.Prim; 21 import symbols.Symbols.*; 24 22 25 23 import s57.S57val.*; … … 27 25 public class Beacons { 28 26 29 public static final ArrayList<Instr>Beacon = newArrayList<Instr>();27 public static final Symbol Beacon = new Symbol(); 30 28 static { 31 ArrayList<Instr>colours = newArrayList<Instr>();29 Symbol colours = new Symbol(); 32 30 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(); 33 31 colours.add(new Instr(Prim.P1, p)); … … 51 49 Beacon.add(new Instr(Prim.PLIN, p)); 52 50 } 53 public static final ArrayList<Instr>Cairn = newArrayList<Instr>();51 public static final Symbol Cairn = new Symbol(); 54 52 static { 55 53 Cairn.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 62 60 Cairn.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-18,-70,36,36))); 63 61 } 64 public static final ArrayList<Instr>FogSignal = newArrayList<Instr>();62 public static final Symbol FogSignal = new Symbol(); 65 63 static { 66 64 FogSignal.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 73 71 FogSignal.add(new Instr(Prim.EARC, new Arc2D.Double(-65.0,-65.0,130.0,130.0,190.0,50.0,Arc2D.OPEN))); 74 72 } 75 public static final ArrayList<Instr>LightFlare = newArrayList<Instr>();73 public static final Symbol LightFlare = new Symbol(); 76 74 static { 77 75 LightFlare.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-3,-3,6,6))); … … 81 79 LightFlare.add(new Instr(Prim.PGON, p)); 82 80 } 83 public static final ArrayList<Instr>LightMajor = newArrayList<Instr>();81 public static final Symbol LightMajor = new Symbol(); 84 82 static { 85 83 LightMajor.add(new Instr(Prim.FILL, Color.black)); … … 90 88 LightMajor.add(new Instr(Prim.PGON, p)); 91 89 } 92 public static final ArrayList<Instr>LightMinor = newArrayList<Instr>();90 public static final Symbol LightMinor = new Symbol(); 93 91 static { 94 92 LightMinor.add(new Instr(Prim.FILL, Color.black)); … … 97 95 LightMinor.add(new Instr(Prim.PGON, p)); 98 96 } 99 public static final ArrayList<Instr>PerchPort = newArrayList<Instr>();97 public static final Symbol PerchPort = new Symbol(); 100 98 static { 101 99 PerchPort.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 106 104 PerchPort.add(new Instr(Prim.LINE, new Line2D.Double(-25,-70,0,-40))); 107 105 } 108 public static final ArrayList<Instr>PerchStarboard = newArrayList<Instr>();106 public static final Symbol PerchStarboard = new Symbol(); 109 107 static { 110 108 PerchStarboard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 115 113 PerchStarboard.add(new Instr(Prim.LINE, new Line2D.Double(-25,-40,0,-68.7))); 116 114 } 117 public static final ArrayList<Instr>RadarStation = newArrayList<Instr>();115 public static final Symbol RadarStation = new Symbol(); 118 116 static { 119 117 RadarStation.add(new Instr(Prim.STRK, new BasicStroke(2.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 121 119 RadarStation.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-125,-125,250,250))); 122 120 } 123 public static final ArrayList<Instr>Stake = newArrayList<Instr>();121 public static final Symbol Stake = new Symbol(); 124 122 static { 125 123 Stake.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); 126 124 Stake.add(new Instr(Prim.FILL, Color.black)); 127 125 Stake.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-70))); 128 ArrayList<Instr>colours = newArrayList<Instr>();126 Symbol colours = new Symbol(); 129 127 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(); 130 128 colours.add(new Instr(Prim.P1, p)); … … 141 139 Stake.add(new Instr(Prim.LINE, new Line2D.Double(-10,0,10,0))); 142 140 } 143 public static final ArrayList<Instr>Tower = newArrayList<Instr>();141 public static final Symbol Tower = new Symbol(); 144 142 static { 145 ArrayList<Instr>colours = newArrayList<Instr>();143 Symbol colours = new Symbol(); 146 144 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(); 147 145 colours.add(new Instr(Prim.P1, p)); … … 165 163 Tower.add(new Instr(Prim.PLIN, p)); 166 164 } 167 public static final ArrayList<Instr>WithyPort = newArrayList<Instr>();165 public static final Symbol WithyPort = new Symbol(); 168 166 static { 169 167 WithyPort.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 176 174 WithyPort.add(new Instr(Prim.LINE, new Line2D.Double(-30,-35,0,-21))); 177 175 } 178 public static final ArrayList<Instr>WithyStarboard = newArrayList<Instr>();176 public static final Symbol WithyStarboard = new Symbol(); 179 177 static { 180 178 WithyStarboard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 188 186 } 189 187 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); 191 189 static { 192 190 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.
