Changeset 29186 in osm for applications/editors/josm/plugins/smed2/src
- Timestamp:
- 2013-01-10T17:31:17+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/smed2/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed2/src/seamap/Renderer.java
r29185 r29186 112 112 } 113 113 114 public static void symbol(Feature feature, ArrayList<Instr> symbol, Obj obj) {114 public static void symbol(Feature feature, Symbol symbol, Obj obj, Delta delta) { 115 115 Point2D point = helper.getPoint(findCentroid(feature)); 116 116 ArrayList<ColCOL> colours = (ArrayList<ColCOL>) getAttVal(feature, obj, 0, Att.COLOUR); 117 117 ArrayList<ColPAT> pattern = (ArrayList<ColPAT>) getAttVal(feature, obj, 0, Att.COLPAT); 118 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), null, new Scheme(pattern, colours));118 Symbols.drawSymbol(g2, symbol, sScale, point.getX(), point.getY(), delta, new Scheme(pattern, colours)); 119 119 } 120 120 -
applications/editors/josm/plugins/smed2/src/seamap/Rules.java
r29185 r29186 16 16 import s57.S57obj.*; 17 17 18 import seamap.SeaMap.AttItem; 18 19 import seamap.SeaMap.*; 19 import symbols.Beacons; 20 import symbols.Buoys; 21 import symbols.Harbours; 22 import symbols.Landmarks; 23 import symbols.Symbols.Instr; 20 import symbols.*; 21 import symbols.Symbols.*; 24 22 25 23 public class Rules { … … 119 117 for (Feature feature : features) { 120 118 ArrayList<CatLMK> cats = (ArrayList<CatLMK>) Renderer.getAttVal(feature, feature.type, 0, Att.CATLMK); 121 ArrayList<Instr>catSym = Landmarks.Shapes.get(cats.get(0));119 Symbol catSym = Landmarks.Shapes.get(cats.get(0)); 122 120 ArrayList<FncFNC> fncs = (ArrayList<FncFNC>) Renderer.getAttVal(feature, feature.type, 0, Att.FUNCTN); 123 ArrayList<Instr>fncSym = Landmarks.Funcs.get(fncs.get(0));121 Symbol fncSym = Landmarks.Funcs.get(fncs.get(0)); 124 122 if ((fncs.get(0) == FncFNC.FNC_CHCH) && (cats.get(0) == CatLMK.LMK_TOWR)) catSym = Landmarks.ChurchTower; 125 123 if ((cats.get(0) == CatLMK.LMK_UNKN) && (fncs.get(0) == FncFNC.FNC_UNKN) && (feature.objs.get(Obj.LIGHTS) != null)) catSym = Beacons.LightMajor; 126 124 if (cats.get(0) == CatLMK.LMK_RADR) fncSym = Landmarks.RadioTV; 127 Renderer.symbol(feature, catSym, feature.type );128 Renderer.symbol(feature, fncSym, feature.type );125 Renderer.symbol(feature, catSym, feature.type, null); 126 Renderer.symbol(feature, fncSym, feature.type, null); 129 127 } 130 128 } … … 134 132 switch (cat) { 135 133 case MOR_DLPN: 136 Renderer.symbol(feature, Harbours.Dolphin, feature.type );134 Renderer.symbol(feature, Harbours.Dolphin, feature.type, null); 137 135 break; 138 136 case MOR_DDPN: 139 Renderer.symbol(feature, Harbours.DeviationDolphin, feature.type );137 Renderer.symbol(feature, Harbours.DeviationDolphin, feature.type, null); 140 138 break; 141 139 case MOR_BLRD: 142 140 case MOR_POST: 143 Renderer.symbol(feature, Harbours.Bollard, feature.type );141 Renderer.symbol(feature, Harbours.Bollard, feature.type, null); 144 142 break; 145 143 case MOR_BUOY: 146 144 BoySHP shape = (BoySHP) Renderer.getAttVal(feature, feature.type, 0, Att.BOYSHP); 147 145 if (shape == BoySHP.BOY_UNKN) shape = BoySHP.BOY_SPHR; 148 Renderer.symbol(feature, Buoys.Shapes.get(shape), feature.type );146 Renderer.symbol(feature, Buoys.Shapes.get(shape), feature.type, null); 149 147 break; 150 148 } … … 160 158 switch (feature.type) { 161 159 case LITMAJ: 162 Renderer.symbol(feature, Beacons.LightMajor, feature.type );160 Renderer.symbol(feature, Beacons.LightMajor, feature.type, null); 163 161 break; 164 162 case LITMIN: 165 163 case LIGHTS: 166 Renderer.symbol(feature, Beacons.LightMinor, feature.type );164 Renderer.symbol(feature, Beacons.LightMinor, feature.type, null); 167 165 break; 168 166 } … … 174 172 case SISTAT: 175 173 case SISTAW: 176 Renderer.symbol(feature, Harbours.SignalStation, feature.type );174 Renderer.symbol(feature, Harbours.SignalStation, feature.type, null); 177 175 break; 178 176 case RDOSTA: 179 Renderer.symbol(feature, Harbours.SignalStation, feature.type );177 Renderer.symbol(feature, Harbours.SignalStation, feature.type, null); 180 178 break; 181 179 case RADSTA: 182 Renderer.symbol(feature, Harbours.SignalStation, feature.type );180 Renderer.symbol(feature, Harbours.SignalStation, feature.type, null); 183 181 break; 184 182 case PILBOP: 185 Renderer.symbol(feature, Harbours.SignalStation, feature.type );183 Renderer.symbol(feature, Harbours.SignalStation, feature.type, null); 186 184 break; 187 185 case CGUSTA: 188 // Renderer.symbol(feature, Harbours.CGuardStation, feature.type );186 // Renderer.symbol(feature, Harbours.CGuardStation, feature.type, null); 189 187 break; 190 188 case RSCSTA: 191 // Renderer.symbol(feature, Harbours.RescueStation, feature.type );189 // Renderer.symbol(feature, Harbours.RescueStation, feature.type, null); 192 190 break; 193 191 } … … 198 196 switch (feature.type) { 199 197 case LITVES: 200 Renderer.symbol(feature, Buoys.Super, feature.type );198 Renderer.symbol(feature, Buoys.Super, feature.type, null); 201 199 break; 202 200 case LITFLT: 203 Renderer.symbol(feature, Buoys.Float, feature.type );201 Renderer.symbol(feature, Buoys.Float, feature.type, null); 204 202 break; 205 203 case BOYINB: 206 Renderer.symbol(feature, Buoys.Storage, feature.type); 207 break; 208 } 204 Renderer.symbol(feature, Buoys.Storage, feature.type, null); 205 break; 206 } 207 if (feature.objs.get(Obj.TOPMAR) != null) 208 Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), Obj.TOPMAR, Topmarks.Floats); 209 209 } 210 210 } 211 211 private static void platforms(ArrayList<Feature> features) { 212 212 for (Feature feature : features) { 213 Renderer.symbol(feature, Landmarks.Platform, feature.type );213 Renderer.symbol(feature, Landmarks.Platform, feature.type, null); 214 214 } 215 215 } … … 217 217 for (Feature feature : features) { 218 218 BoySHP shape = (BoySHP) Renderer.getAttVal(feature, feature.type, 0, Att.BOYSHP); 219 Renderer.symbol(feature, Buoys.Shapes.get(shape), feature.type); 219 Renderer.symbol(feature, Buoys.Shapes.get(shape), feature.type, null); 220 if (feature.objs.get(Obj.TOPMAR) != null) { 221 Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), Obj.TOPMAR, Topmarks.Buoys.get(shape)); 222 } 220 223 } 221 224 } … … 228 231 case LAM_PORT: 229 232 if (shape == BcnSHP.BCN_PRCH) 230 Renderer.symbol(feature, Beacons.PerchPort, feature.type );233 Renderer.symbol(feature, Beacons.PerchPort, feature.type, null); 231 234 else 232 Renderer.symbol(feature, Beacons.WithyPort, feature.type );235 Renderer.symbol(feature, Beacons.WithyPort, feature.type, null); 233 236 break; 234 237 case LAM_STBD: 235 238 if (shape == BcnSHP.BCN_PRCH) 236 Renderer.symbol(feature, Beacons.PerchStarboard, feature.type );239 Renderer.symbol(feature, Beacons.PerchStarboard, feature.type, null); 237 240 else 238 Renderer.symbol(feature, Beacons.WithyStarboard, feature.type );241 Renderer.symbol(feature, Beacons.WithyStarboard, feature.type, null); 239 242 break; 240 243 default: 241 Renderer.symbol(feature, Beacons.Stake, feature.type );244 Renderer.symbol(feature, Beacons.Stake, feature.type, null); 242 245 } 243 246 } else { 244 Renderer.symbol(feature, Beacons.Shapes.get(shape), feature.type); 247 Renderer.symbol(feature, Beacons.Shapes.get(shape), feature.type, null); 248 if (feature.objs.get(Obj.TOPMAR) != null) 249 Renderer.symbol(feature, Topmarks.Shapes.get(feature.objs.get(Obj.TOPMAR).get(0).get(Att.TOPSHP).val), Obj.TOPMAR, Topmarks.Beacons); 245 250 } 246 251 } -
applications/editors/josm/plugins/smed2/src/symbols/Areas.java
r29128 r29186 14 14 import java.awt.Rectangle; 15 15 import java.awt.geom.*; 16 import java.util.ArrayList;17 16 18 17 import symbols.Symbols.*; 19 18 20 19 public class Areas { 21 public static final ArrayList<Instr> Plane = new ArrayList<Instr>();20 public static final Symbol Plane = new Symbol(); 22 21 static { 23 22 Plane.add(new Instr(Prim.BBOX, new Rectangle(-60,-60,120,120))); … … 26 25 Plane.add(new Instr(Prim.PGON, p)); 27 26 } 28 public static final ArrayList<Instr> Cable = new ArrayList<Instr>();27 public static final Symbol Cable = new Symbol(); 29 28 static { 30 29 Cable.add(new Instr(Prim.BBOX, new Rectangle(-30,-60,60,60))); … … 34 33 Cable.add(new Instr(Prim.PLIN, p)); 35 34 } 36 public static final ArrayList<Instr> LaneArrow = new ArrayList<Instr>();35 public static final Symbol LaneArrow = new Symbol(); 37 36 static { 38 37 LaneArrow.add(new Instr(Prim.STRK, new BasicStroke(10.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); … … 42 41 LaneArrow.add(new Instr(Prim.PLIN, p)); 43 42 } 44 public static final ArrayList<Instr> LineAnchor = new ArrayList<Instr>();43 public static final Symbol LineAnchor = new Symbol(); 45 44 static { 46 45 LineAnchor.add(new Instr(Prim.FILL, new Color(0xc480ff))); 47 LineAnchor.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Harbours.Anchor, 0.5, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))), null)));46 LineAnchor.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.5, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))), null))); 48 47 } 49 public static final ArrayList<Instr> LinePlane = new ArrayList<Instr>();48 public static final Symbol LinePlane = new Symbol(); 50 49 static { 51 50 LinePlane.add(new Instr(Prim.FILL, new Color(0xc480ff))); 52 LinePlane.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Areas.Plane, 0.5, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))), null)));51 LinePlane.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Areas.Plane, 0.5, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(-90.0))), null))); 53 52 } 54 public static final ArrayList<Instr> MarineFarm = new ArrayList<Instr>();53 public static final Symbol MarineFarm = new Symbol(); 55 54 static { 56 55 MarineFarm.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); … … 62 61 MarineFarm.add(new Instr(Prim.RSHP, new Ellipse2D.Double(9,-2,4,4))); 63 62 } 64 public static final ArrayList<Instr> NoWake = new ArrayList<Instr>();63 public static final Symbol NoWake = new Symbol(); 65 64 static { 66 65 NoWake.add(new Instr(Prim.STRK, new BasicStroke(12.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 72 71 NoWake.add(new Instr(Prim.LINE, new Line2D.Double(-60,-60,60,60))); 73 72 } 74 public static final ArrayList<Instr> Pipeline = new ArrayList<Instr>();73 public static final Symbol Pipeline = new Symbol(); 75 74 static { 76 75 Pipeline.add(new Instr(Prim.BBOX, new Rectangle(-15,-60,30,60))); … … 80 79 Pipeline.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-10,-60,20,20))); 81 80 } 82 public static final ArrayList<Instr> Restricted = new ArrayList<Instr>();81 public static final Symbol Restricted = new Symbol(); 83 82 static { 84 83 Restricted.add(new Instr(Prim.BBOX, new Rectangle(-15,-30,30,30))); … … 88 87 Restricted.add(new Instr(Prim.LINE, new Line2D.Double(0,-15,17,-15))); 89 88 } 90 public static final ArrayList<Instr> Rock = new ArrayList<Instr>();89 public static final Symbol Rock = new Symbol(); 91 90 static { 92 91 Rock.add(new Instr(Prim.FILL, new Color(0x80c0ff))); … … 99 98 Rock.add(new Instr(Prim.LINE, new Line2D.Double(0,-20,0,20))); 100 99 } 101 public static final ArrayList<Instr> RockA = new ArrayList<Instr>();100 public static final Symbol RockA = new Symbol(); 102 101 static { 103 102 RockA.add(new Instr(Prim.FILL, new Color(0x80c0ff))); … … 114 113 RockA.add(new Instr(Prim.RSHP, new Ellipse2D.Double(9,9,8,8))); 115 114 } 116 public static final ArrayList<Instr> RockC = new ArrayList<Instr>();115 public static final Symbol RockC = new Symbol(); 117 116 static { 118 117 RockC.add(new Instr(Prim.FILL, new Color(0x80c0ff))); … … 126 125 RockC.add(new Instr(Prim.LINE, new Line2D.Double(10,17.3,-10,-17.3))); 127 126 } 128 public static final ArrayList<Instr> Sandwaves = new ArrayList<Instr>();129 public static final ArrayList<Instr> Seaplane = new ArrayList<Instr>();127 public static final Symbol Sandwaves = new Symbol(); 128 public static final Symbol Seaplane = new Symbol(); 130 129 static { 131 130 Seaplane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 132 131 Seaplane.add(new Instr(Prim.FILL, new Color(0xa30075))); 133 132 Seaplane.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-60,-60,120,120))); 134 Seaplane.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Areas.Plane, 1.0, 0, 0, null, null)));133 Seaplane.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Areas.Plane, 1.0, 0, 0, null, null))); 135 134 } 136 public static final ArrayList<Instr> WindFarm = new ArrayList<Instr>();135 public static final Symbol WindFarm = new Symbol(); 137 136 static { 138 137 WindFarm.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 145 144 WindFarm.add(new Instr(Prim.LINE, new Line2D.Double(0,-27.5,-13.8,-53.6))); 146 145 } 147 public static final ArrayList<Instr> WreckD = new ArrayList<Instr>();146 public static final Symbol WreckD = new Symbol(); 148 147 static { 149 148 WreckD.add(new Instr(Prim.FILL, new Color(0x80c0ff))); … … 158 157 WreckD.add(new Instr(Prim.LINE, new Line2D.Double(20,-15,20,15))); 159 158 } 160 public static final ArrayList<Instr> WreckND = new ArrayList<Instr>();159 public static final Symbol WreckND = new Symbol(); 161 160 static { 162 161 WreckND.add(new Instr(Prim.STRK, new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 167 166 WreckND.add(new Instr(Prim.LINE, new Line2D.Double(20,-15,20,15))); 168 167 } 169 public static final ArrayList<Instr> WreckS = new ArrayList<Instr>();168 public static final Symbol WreckS = new Symbol(); 170 169 static { 171 170 WreckS.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); -
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 = new ArrayList<Instr>();27 public static final Symbol Beacon = new Symbol(); 30 28 static { 31 ArrayList<Instr> colours = new ArrayList<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 = new ArrayList<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 = new ArrayList<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 = new ArrayList<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 = new ArrayList<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 = new ArrayList<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 = new ArrayList<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 = new ArrayList<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 = new ArrayList<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 = new ArrayList<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 = new ArrayList<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 = new ArrayList<Instr>();141 public static final Symbol Tower = new Symbol(); 144 142 static { 145 ArrayList<Instr> colours = new ArrayList<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 = new ArrayList<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 = new ArrayList<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); -
applications/editors/josm/plugins/smed2/src/symbols/Buoys.java
r29175 r29186 13 13 import java.awt.Color; 14 14 import java.awt.geom.*; 15 import java.util.ArrayList;16 15 import java.util.EnumMap; 17 16 … … 21 20 public class Buoys { 22 21 23 public static final ArrayList<Instr> Barrel = new ArrayList<Instr>();24 static { 25 ArrayList<Instr> colours = new ArrayList<Instr>();22 public static final Symbol Barrel = new Symbol(); 23 static { 24 Symbol colours = new Symbol(); 26 25 Path2D.Double p = new Path2D.Double(); p.moveTo(-50.0,0); p.curveTo(-50.0,-11.0,-45.0,-32.0,-32.0,-36.0); 27 26 p.curveTo(-18.0,-40.0,12.0,-40.0,25.0,-36.0); p.curveTo(38.0,-32.0,43.0,-11.0,43.0,0); … … 38 37 Barrel.add(new Instr(Prim.PLIN, p)); 39 38 } 40 public static final ArrayList<Instr> Can = new ArrayList<Instr>();41 static { 42 ArrayList<Instr> colours = new ArrayList<Instr>();39 public static final Symbol Can = new Symbol(); 40 static { 41 Symbol colours = new Symbol(); 43 42 Path2D.Double p = new Path2D.Double(); p.moveTo(-31.6, 0); p.lineTo(-15.7,-47.4); p.lineTo(41.1,-28.4); p.lineTo(31.6,0); 44 43 p.lineTo(8.0, 0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath(); … … 64 63 Can.add(new Instr(Prim.PLIN, p)); 65 64 } 66 public static final ArrayList<Instr> Cone = new ArrayList<Instr>();67 static { 68 ArrayList<Instr> colours = new ArrayList<Instr>();65 public static final Symbol Cone = new Symbol(); 66 static { 67 Symbol colours = new Symbol(); 69 68 Path2D.Double p = new Path2D.Double(); p.moveTo(-31.6,0); p.curveTo(-24.9,-32.2, 1.4,-38.7,12.7,-37.9); p.curveTo(21.9,-30.5,32.8,-18.4,32.1,0.0); 70 69 p.lineTo(8.0,0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath(); … … 90 89 Cone.add(new Instr(Prim.PLIN, p)); 91 90 } 92 public static final ArrayList<Instr> Float = new ArrayList<Instr>();93 static { 94 ArrayList<Instr> colours = new ArrayList<Instr>();91 public static final Symbol Float = new Symbol(); 92 static { 93 Symbol colours = new Symbol(); 95 94 Path2D.Double p = new Path2D.Double(); p.moveTo(-36.0,0); p.lineTo(-47.0,-33.0); p.quadTo(-30.0, -25.0, -19.0,-23.0); 96 95 p.lineTo(-12.0,-42.0); p.lineTo(12.0,-42.0); p.lineTo(19.0,-23.0); p.quadTo(30.0,-25.0,47.0,-33.0); p.lineTo(36.0,0); … … 121 120 Float.add(new Instr(Prim.PLIN, p)); 122 121 } 123 public static final ArrayList<Instr> Ice = new ArrayList<Instr>();124 static { 125 ArrayList<Instr> colours = new ArrayList<Instr>();122 public static final Symbol Ice = new Symbol(); 123 static { 124 Symbol colours = new Symbol(); 126 125 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,0); p.quadTo(-30.0,0.0,-30.0,-15.0); p.lineTo(-30.0,-25.0); p.lineTo(30.0,-25.0); p.lineTo(30.0,-15); p.quadTo(30.0,0.0,15.0,0.0); 127 126 p.lineTo(8.0, 0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath(); … … 138 137 Ice.add(new Instr(Prim.PLIN, p)); 139 138 } 140 public static final ArrayList<Instr> Pillar = new ArrayList<Instr>();141 static { 142 ArrayList<Instr> colours = new ArrayList<Instr>();139 public static final Symbol Pillar = new Symbol(); 140 static { 141 Symbol colours = new Symbol(); 143 142 Path2D.Double p = new Path2D.Double(); p.moveTo(-32.0,0.0); p.lineTo(-2.8,-32.5); p.lineTo(25.6,-96.7); p.lineTo(37.0,-92.9); p.lineTo(21.8,-24.3); 144 143 p.lineTo(25.0,0.0); p.lineTo(8.0, 0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath(); … … 165 164 Pillar.add(new Instr(Prim.PLIN, p)); 166 165 } 167 public static final ArrayList<Instr> Spar = new ArrayList<Instr>();168 static { 169 ArrayList<Instr> colours = new ArrayList<Instr>();166 public static final Symbol Spar = new Symbol(); 167 static { 168 Symbol colours = new Symbol(); 170 169 Path2D.Double p = new Path2D.Double(); p.moveTo(-3.2,-9.5); p.lineTo(25.6,-96.7); p.lineTo(37.0,-92.9); p.lineTo(8.2,-5.7); p.closePath(); 171 170 colours.add(new Instr(Prim.P1, p)); … … 189 188 Spar.add(new Instr(Prim.PLIN, p)); 190 189 } 191 public static final ArrayList<Instr> Sphere = new ArrayList<Instr>();192 static { 193 ArrayList<Instr> colours = new ArrayList<Instr>();190 public static final Symbol Sphere = new Symbol(); 191 static { 192 Symbol colours = new Symbol(); 194 193 Path2D.Double p = new Path2D.Double(); p.moveTo(-25.0,0); p.curveTo(-32.0,-21.0,-14.0,-45.5,12.7,-37.9); p.curveTo(27.5,-33.8,37.8,-15.5,32.0,0.0); 195 194 p.lineTo(8.0,0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath(); … … 214 213 Sphere.add(new Instr(Prim.EARC, new Arc2D.Double(-26.5,-39.4,60.0,60.0,-18.0,216.0,Arc2D.OPEN))); 215 214 } 216 public static final ArrayList<Instr> Storage = new ArrayList<Instr>();215 public static final Symbol Storage = new Symbol(); 217 216 static { 218 217 Storage.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 223 222 Storage.add(new Instr(Prim.PLIN, p)); 224 223 } 225 public static final ArrayList<Instr> Super = new ArrayList<Instr>();226 static { 227 ArrayList<Instr> colours = new ArrayList<Instr>();224 public static final Symbol Super = new Symbol(); 225 static { 226 Symbol colours = new Symbol(); 228 227 Path2D.Double p = new Path2D.Double(); p.moveTo(-48.0,0); p.lineTo(-28.0,-42.0); p.lineTo(28.0,-42.0); p.lineTo(48.0,0); 229 228 p.lineTo(8.0, 0.0); p.curveTo(8.0,-11.0,-8.0,-11.0,-8.0,0.0); p.closePath(); … … 250 249 } 251 250 252 public static final EnumMap<BoySHP, ArrayList<Instr>> Shapes = new EnumMap<BoySHP, ArrayList<Instr>>(BoySHP.class);251 public static final EnumMap<BoySHP, Symbol> Shapes = new EnumMap<BoySHP, Symbol>(BoySHP.class); 253 252 static { 254 253 Shapes.put(BoySHP.BOY_UNKN, Buoys.Pillar); Shapes.put(BoySHP.BOY_CONE, Buoys.Cone); Shapes.put(BoySHP.BOY_CAN, Buoys.Can); -
applications/editors/josm/plugins/smed2/src/symbols/Facilities.java
r29134 r29186 13 13 import java.awt.Color; 14 14 import java.awt.geom.*; 15 import java.util.ArrayList;16 15 17 import symbols.Symbols.Instr; 18 import symbols.Symbols.Prim; 16 import symbols.Symbols.*; 19 17 20 18 public class Facilities { 21 private static final ArrayList<Instr> Facility = new ArrayList<Instr>();19 private static final Symbol Facility = new Symbol(); 22 20 static { 23 21 Facility.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 28 26 Facility.add(new Instr(Prim.RRCT, s)); 29 27 } 30 public static final ArrayList<Instr> Boatlift = new ArrayList<Instr>();//was Crane28 public static final Symbol Boatlift = new Symbol();//was Crane 31 29 static { 32 Boatlift.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Facilities.Facility, 1.0, 0, 0, null, null)));30 Boatlift.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 33 31 Boatlift.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND))); 34 32 Boatlift.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-3.7,-19.7,12,12))); … … 36 34 Boatlift.add(new Instr(Prim.EARC, new Arc2D.Double(-10.0,-1.5,20,20,75.0,-260.0,Arc2D.OPEN))); 37 35 } 38 public static final ArrayList<Instr> Boatyard = new ArrayList<Instr>();36 public static final Symbol Boatyard = new Symbol(); 39 37 static { 40 Boatyard.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Facilities.Facility, 1.0, 0, 0, null, null)));38 Boatyard.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 41 39 Boatyard.add(new Instr(Prim.STRK, new BasicStroke(8.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 42 40 Boatyard.add(new Instr(Prim.LINE, new Line2D.Double(19,19,-8,-8))); … … 45 43 Boatyard.add(new Instr(Prim.PGON, p)); 46 44 } 47 public static final ArrayList<Instr> Chandler = new ArrayList<Instr>();45 public static final Symbol Chandler = new Symbol(); 48 46 static { 49 Chandler.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Facilities.Facility, 1.0, 0, 0, null, null)));47 Chandler.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 50 48 Chandler.add(new Instr(Prim.STRK, new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); 51 49 Chandler.add(new Instr(Prim.ELPS, new Ellipse2D.Double(14,7,10,10))); … … 55 53 Chandler.add(new Instr(Prim.EARC, new Arc2D.Double(-16.0,-20.5,24,24,0.0,180.0,Arc2D.OPEN))); 56 54 } 57 public static final ArrayList<Instr> Fuel = new ArrayList<Instr>();55 public static final Symbol Fuel = new Symbol(); 58 56 static { 59 Fuel.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Facilities.Facility, 1.0, 0, 0, null, null)));57 Fuel.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 60 58 Fuel.add(new Instr(Prim.STRK, new BasicStroke(2.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); 61 59 Fuel.add(new Instr(Prim.FILL, new Color(0xa30075))); … … 69 67 Fuel.add(new Instr(Prim.PLIN, p)); 70 68 } 71 public static final ArrayList<Instr> Laundrette = new ArrayList<Instr>();69 public static final Symbol Laundrette = new Symbol(); 72 70 static { 73 Laundrette.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Facilities.Facility, 1.0, 0, 0, null, null)));71 Laundrette.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 74 72 Laundrette.add(new Instr(Prim.STRK, new BasicStroke(1.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); 75 73 Laundrette.add(new Instr(Prim.FILL, new Color(0xa30075))); … … 80 78 Laundrette.add(new Instr(Prim.PLIN, p)); 81 79 } 82 public static final ArrayList<Instr> PumpOut = new ArrayList<Instr>();80 public static final Symbol PumpOut = new Symbol(); 83 81 static { 84 PumpOut.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Facilities.Facility, 1.0, 0, 0, null, null)));82 PumpOut.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 85 83 PumpOut.add(new Instr(Prim.STRK, new BasicStroke(2.5f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 86 84 PumpOut.add(new Instr(Prim.FILL, new Color(0xa30075))); … … 96 94 PumpOut.add(new Instr(Prim.PGON, p)); 97 95 } 98 public static final ArrayList<Instr> SailingClub = new ArrayList<Instr>();96 public static final Symbol SailingClub = new Symbol(); 99 97 static { 100 SailingClub.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Facilities.Facility, 1.0, 0, 0, null, null)));98 SailingClub.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 101 99 SailingClub.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); 102 100 SailingClub.add(new Instr(Prim.FILL, new Color(0xa30075))); … … 105 103 SailingClub.add(new Instr(Prim.PGON, p)); 106 104 } 107 public static final ArrayList<Instr> Shower = new ArrayList<Instr>();105 public static final Symbol Shower = new Symbol(); 108 106 static { 109 Shower.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Facilities.Facility, 1.0, 0, 0, null, null)));107 Shower.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 110 108 Shower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); 111 109 Shower.add(new Instr(Prim.FILL, new Color(0xa30075))); … … 119 117 Shower.add(new Instr(Prim.PLIN, p)); 120 118 } 121 public static final ArrayList<Instr> Slipway = new ArrayList<Instr>();119 public static final Symbol Slipway = new Symbol(); 122 120 static { 123 Slipway.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Facilities.Facility, 1.0, 0, 0, null, null)));121 Slipway.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 124 122 Slipway.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); 125 123 Slipway.add(new Instr(Prim.FILL, new Color(0xa30075))); … … 136 134 Slipway.add(new Instr(Prim.PGON, p)); 137 135 } 138 public static final ArrayList<Instr> Toilet = new ArrayList<Instr>();136 public static final Symbol Toilet = new Symbol(); 139 137 static { 140 Toilet.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Facilities.Facility, 1.0, 0, 0, null, null)));138 Toilet.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Facilities.Facility, 1.0, 0, 0, null, null))); 141 139 Toilet.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND))); 142 140 Toilet.add(new Instr(Prim.FILL, new Color(0xa30075))); … … 153 151 Toilet.add(new Instr(Prim.PGON, p)); 154 152 } 155 public static final ArrayList<Instr> VisitorBerth = new ArrayList<Instr>();153 public static final Symbol VisitorBerth = new Symbol(); 156 154 static { 157 155 VisitorBerth.add(new Instr(Prim.FILL, new Color(0xa30075))); … … 162 160 VisitorBerth.add(new Instr(Prim.PGON, p)); 163 161 } 164 public static final ArrayList<Instr> VisitorMooring = new ArrayList<Instr>();162 public static final Symbol VisitorMooring = new Symbol(); 165 163 static { 166 164 VisitorMooring.add(new Instr(Prim.FILL, new Color(0xa30075))); -
applications/editors/josm/plugins/smed2/src/symbols/Harbours.java
r29132 r29186 14 14 import java.awt.Rectangle; 15 15 import java.awt.geom.*; 16 import java.util.ArrayList;17 16 18 import symbols.Symbols.Instr; 19 import symbols.Symbols.Prim; 17 import symbols.Symbols.*; 20 18 21 19 public class Harbours { 22 public static final ArrayList<Instr> Anchor = new ArrayList<Instr>();20 public static final Symbol Anchor = new Symbol(); 23 21 static { 24 22 Anchor.add(new Instr(Prim.BBOX, new Rectangle(-60,-60,120,120))); … … 31 29 Anchor.add(new Instr(Prim.PGON, p)); 32 30 } 33 public static final ArrayList<Instr> Yacht = new ArrayList<Instr>();31 public static final Symbol Yacht = new Symbol(); 34 32 static { 35 33 Yacht.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 39 37 Yacht.add(new Instr(Prim.PGON, p)); 40 38 } 41 public static final ArrayList<Instr> Anchorage = new ArrayList<Instr>();39 public static final Symbol Anchorage = new Symbol(); 42 40 static { 43 41 Anchorage.add(new Instr(Prim.FILL, new Color(0xa30075))); 44 Anchorage.add(new Instr(Prim.SYMB, new Symbols.S ymbol(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))); 45 43 } 46 public static final ArrayList<Instr> AnchorBerth = new ArrayList<Instr>();44 public static final Symbol AnchorBerth = new Symbol(); 47 45 static { 48 AnchorBerth.add(new Instr(Prim.SYMB, new Symbols.S ymbol(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))); 49 47 AnchorBerth.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 50 48 AnchorBerth.add(new Instr(Prim.FILL, Color.white)); … … 54 52 AnchorBerth.add(new Instr(Prim.ELPS, s)); 55 53 } 56 public static final ArrayList<Instr> Bollard = new ArrayList<Instr>();54 public static final Symbol Bollard = new Symbol(); 57 55 static { 58 56 Bollard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 63 61 Bollard.add(new Instr(Prim.ELPS, s)); 64 62 } 65 public static final ArrayList<Instr> ClearV = new ArrayList<Instr>();63 public static final Symbol ClearV = new Symbol(); 66 64 static { 67 65 ClearV.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 74 72 ClearV.add(new Instr(Prim.LINE, new Line2D.Double(0,25,0,15))); 75 73 } 76 public static final ArrayList<Instr> ContainerCrane = new ArrayList<Instr>();74 public static final Symbol ContainerCrane = new Symbol(); 77 75 static { 78 76 ContainerCrane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 81 79 ContainerCrane.add(new Instr(Prim.RECT, new Rectangle2D.Double(-40,-12.5,80,25))); 82 80 } 83 public static final ArrayList<Instr> DeviationDolphin = new ArrayList<Instr>();81 public static final Symbol DeviationDolphin = new Symbol(); 84 82 static { 85 83 DeviationDolphin.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 89 87 DeviationDolphin.add(new Instr(Prim.PLIN, p)); 90 88 } 91 public static final ArrayList<Instr> DistanceI = new ArrayList<Instr>();89 public static final Symbol DistanceI = new Symbol(); 92 90 static { 93 91 DistanceI.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 95 93 DistanceI.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22))); 96 94 } 97 public static final ArrayList<Instr> DistanceU = new ArrayList<Instr>();95 public static final Symbol DistanceU = new Symbol(); 98 96 static { 99 97 DistanceU.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 101 99 DistanceU.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22))); 102 100 } 103 public static final ArrayList<Instr> Dolphin = new ArrayList<Instr>();101 public static final Symbol Dolphin = new Symbol(); 104 102 static { 105 103 Dolphin.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 111 109 Dolphin.add(new Instr(Prim.PLIN, p)); 112 110 } 113 public static final ArrayList<Instr> Harbour = new ArrayList<Instr>();111 public static final Symbol Harbour = new Symbol(); 114 112 static { 115 113 Harbour.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 116 114 Harbour.add(new Instr(Prim.FILL, new Color(0xa30075))); 117 115 Harbour.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-75,-75,150,150))); 118 Harbour.add(new Instr(Prim.SYMB, new Symbols.S ymbol(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))); 119 117 } 120 public static final ArrayList<Instr> HarbourMaster = new ArrayList<Instr>();118 public static final Symbol HarbourMaster = new Symbol(); 121 119 static { 122 120 HarbourMaster.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 123 121 HarbourMaster.add(new Instr(Prim.FILL, Color.black)); 124 122 HarbourMaster.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-35,-50,70,100))); 125 HarbourMaster.add(new Instr(Prim.SYMB, new Symbols.S ymbol(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))); 126 124 } 127 public static final ArrayList<Instr> LandingSteps = new ArrayList<Instr>();125 public static final Symbol LandingSteps = new Symbol(); 128 126 static { 129 127 LandingSteps.add(new Instr(Prim.FILL, new Color(0xa30075))); … … 132 130 LandingSteps.add(new Instr(Prim.PGON, p)); 133 131 } 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(); 137 135 static { 138 136 Marina.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 139 137 Marina.add(new Instr(Prim.FILL, new Color(0xa30075))); 140 Marina.add(new Instr(Prim.SYMB, new Symbols.S ymbol(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))); 141 139 Marina.add(new Instr(Prim.EARC, new Arc2D.Double(-80.0,-80.0,160.0,160.0,215.0,-250.0,Arc2D.OPEN))); 142 140 } 143 public static final ArrayList<Instr> MarinaNF = new ArrayList<Instr>();141 public static final Symbol MarinaNF = new Symbol(); 144 142 static { 145 143 MarinaNF.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 146 144 MarinaNF.add(new Instr(Prim.FILL, new Color(0xa30075))); 147 MarinaNF.add(new Instr(Prim.SYMB, new Symbols.S ymbol(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))); 148 146 } 149 public static final ArrayList<Instr> PortCrane = new ArrayList<Instr>();147 public static final Symbol PortCrane = new Symbol(); 150 148 static { 151 149 PortCrane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 154 152 PortCrane.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-60))); 155 153 } 156 public static final ArrayList<Instr> Post = new ArrayList<Instr>();154 public static final Symbol Post = new Symbol(); 157 155 static { 158 156 Post.add(new Instr(Prim.FILL, Color.black)); 159 157 Post.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-10,-10,20,20))); 160 158 } 161 public static final ArrayList<Instr> SignalStation = new ArrayList<Instr>();159 public static final Symbol SignalStation = new Symbol(); 162 160 static { 163 161 SignalStation.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 166 164 SignalStation.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8))); 167 165 } 168 public static final ArrayList<Instr> TideGauge = new ArrayList<Instr>();166 public static final Symbol TideGauge = new Symbol(); 169 167 static { 170 168 TideGauge.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); -
applications/editors/josm/plugins/smed2/src/symbols/Landmarks.java
r29185 r29186 17 17 import java.awt.geom.Path2D; 18 18 import java.awt.geom.Rectangle2D; 19 import java.util.ArrayList;20 19 import java.util.EnumMap; 21 20 … … 25 24 26 25 public class Landmarks { 27 private static final ArrayList<Instr> Base = new ArrayList<Instr>();26 private static final Symbol Base = new Symbol(); 28 27 static { 29 28 Base.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 34 33 } 35 34 36 public static final ArrayList<Instr> Chimney = new ArrayList<Instr>();37 static { 38 Chimney.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));35 public static final Symbol Chimney = new Symbol(); 36 static { 37 Chimney.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 39 38 Chimney.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 40 39 Chimney.add(new Instr(Prim.FILL, Color.black)); … … 45 44 Chimney.add(new Instr(Prim.PLIN, p)); 46 45 } 47 public static final ArrayList<Instr> Church = new ArrayList<Instr>();46 public static final Symbol Church = new Symbol(); 48 47 static { 49 48 Church.add(new Instr(Prim.FILL, Color.black)); … … 55 54 Church.add(new Instr(Prim.PGON, p)); 56 55 } 57 public static final ArrayList<Instr> ChurchTower = new ArrayList<Instr>();56 public static final Symbol ChurchTower = new Symbol(); 58 57 static { 59 58 ChurchTower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 62 61 ChurchTower.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-2,-2,4,4))); 63 62 } 64 public static final ArrayList<Instr> Cross = new ArrayList<Instr>();65 static { 66 Cross.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));63 public static final Symbol Cross = new Symbol(); 64 static { 65 Cross.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 67 66 Cross.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 68 67 Cross.add(new Instr(Prim.FILL, Color.black)); … … 70 69 Cross.add(new Instr(Prim.LINE, new Line2D.Double(-30,-115,30,-115))); 71 70 } 72 public static final ArrayList<Instr> DishAerial = new ArrayList<Instr>();73 static { 74 DishAerial.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));71 public static final Symbol DishAerial = new Symbol(); 72 static { 73 DishAerial.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 75 74 DishAerial.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL))); 76 75 DishAerial.add(new Instr(Prim.FILL, Color.black)); … … 79 78 DishAerial.add(new Instr(Prim.PLIN, p)); 80 79 } 81 public static final ArrayList<Instr> Dome = new ArrayList<Instr>();80 public static final Symbol Dome = new Symbol(); 82 81 static { 83 82 Dome.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 86 85 Dome.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8))); 87 86 } 88 public static final ArrayList<Instr> Flagstaff = new ArrayList<Instr>();89 static { 90 Flagstaff.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));87 public static final Symbol Flagstaff = new Symbol(); 88 static { 89 Flagstaff.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 91 90 Flagstaff.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 92 91 Flagstaff.add(new Instr(Prim.FILL, Color.black)); … … 94 93 Flagstaff.add(new Instr(Prim.PLIN, p)); 95 94 } 96 public static final ArrayList<Instr> FlareStack = new ArrayList<Instr>();97 static { 98 FlareStack.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));95 public static final Symbol FlareStack = new Symbol(); 96 static { 97 FlareStack.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 99 98 FlareStack.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 100 99 FlareStack.add(new Instr(Prim.FILL, Color.black)); … … 105 104 FlareStack.add(new Instr(Prim.PLIN, p)); 106 105 } 107 public static final ArrayList<Instr> LandTower = new ArrayList<Instr>();108 static { 109 LandTower.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));106 public static final Symbol LandTower = new Symbol(); 107 static { 108 LandTower.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 110 109 LandTower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 111 110 LandTower.add(new Instr(Prim.FILL, Color.black)); … … 114 113 LandTower.add(new Instr(Prim.RECT, new Rectangle2D.Double(-15,-150,30,30))); 115 114 } 116 public static final ArrayList<Instr> Mast = new ArrayList<Instr>();117 static { 118 Mast.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));115 public static final Symbol Mast = new Symbol(); 116 static { 117 Mast.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 119 118 Mast.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL))); 120 119 Mast.add(new Instr(Prim.FILL, Color.black)); … … 122 121 Mast.add(new Instr(Prim.PLIN, p)); 123 122 } 124 public static final ArrayList<Instr> Monument = new ArrayList<Instr>();125 static { 126 Monument.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));123 public static final Symbol Monument = new Symbol(); 124 static { 125 Monument.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 127 126 Monument.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 128 127 Monument.add(new Instr(Prim.FILL, Color.black)); … … 131 130 Monument.add(new Instr(Prim.EARC, new Arc2D.Double(-25.0,-150.0,50.0,50.0,233.0,-285.0,Arc2D.OPEN))); 132 131 } 133 public static final ArrayList<Instr> Platform = new ArrayList<Instr>();132 public static final Symbol Platform = new Symbol(); 134 133 static { 135 134 Platform.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 138 137 Platform.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8))); 139 138 } 140 public static final ArrayList<Instr> RadioTV = new ArrayList<Instr>();139 public static final Symbol RadioTV = new Symbol(); 141 140 static { 142 141 RadioTV.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL))); … … 147 146 RadioTV.add(new Instr(Prim.EARC, new Arc2D.Double(-45.0,-195.0,90.0,90.0,225.0,-90.0,Arc2D.OPEN))); 148 147 } 149 public static final ArrayList<Instr> Spire = new ArrayList<Instr>();148 public static final Symbol Spire = new Symbol(); 150 149 static { 151 150 Spire.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 154 153 Spire.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8))); 155 154 } 156 public static final ArrayList<Instr> Minaret = new ArrayList<Instr>();157 static { 158 Minaret.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Spire, 1.0, 0, 0, null, null)));155 public static final Symbol Minaret = new Symbol(); 156 static { 157 Minaret.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Spire, 1.0, 0, 0, null, null))); 159 158 Minaret.add(new Instr(Prim.STRK, new BasicStroke(6.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 160 159 Minaret.add(new Instr(Prim.LINE, new Line2D.Double(0,-25,0,-50))); … … 162 161 Minaret.add(new Instr(Prim.EARC, new Arc2D.Double(-40.0,-110.0,80.0,60.0,180.0,180.0,Arc2D.OPEN))); 163 162 } 164 public static final ArrayList<Instr> Temple = new ArrayList<Instr>();163 public static final Symbol Temple = new Symbol(); 165 164 static { 166 165 Temple.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 170 169 Temple.add(new Instr(Prim.LINE, new Line2D.Double(-35,21,35,-21))); 171 170 } 172 public static final ArrayList<Instr> WaterTower = new ArrayList<Instr>();173 static { 174 WaterTower.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));171 public static final Symbol WaterTower = new Symbol(); 172 static { 173 WaterTower.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 175 174 WaterTower.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 176 175 WaterTower.add(new Instr(Prim.FILL, Color.black)); … … 179 178 WaterTower.add(new Instr(Prim.RECT, new Rectangle2D.Double(-25,-150,50,30))); 180 179 } 181 public static final ArrayList<Instr> WindMotor = new ArrayList<Instr>();182 static { 183 WindMotor.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));180 public static final Symbol WindMotor = new Symbol(); 181 static { 182 WindMotor.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 184 183 WindMotor.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 185 184 WindMotor.add(new Instr(Prim.FILL, Color.black)); … … 189 188 WindMotor.add(new Instr(Prim.LINE, new Line2D.Double(0,-90,-14.3,-66.7))); 190 189 } 191 public static final ArrayList<Instr> Windmill = new ArrayList<Instr>();190 public static final Symbol Windmill = new Symbol(); 192 191 static { 193 192 Windmill.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 197 196 Windmill.add(new Instr(Prim.LINE, new Line2D.Double(-30,10,30,-42))); 198 197 } 199 public static final ArrayList<Instr> Windsock = new ArrayList<Instr>();200 static { 201 Windsock.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Landmarks.Base, 1.0, 0, 0, null, null)));198 public static final Symbol Windsock = new Symbol(); 199 static { 200 Windsock.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Landmarks.Base, 1.0, 0, 0, null, null))); 202 201 Windsock.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER))); 203 202 Windsock.add(new Instr(Prim.FILL, Color.black)); … … 212 211 } 213 212 214 public static final EnumMap<CatLMK, ArrayList<Instr>> Shapes = new EnumMap<CatLMK, ArrayList<Instr>>(CatLMK.class);213 public static final EnumMap<CatLMK, Symbol> Shapes = new EnumMap<CatLMK, Symbol>(CatLMK.class); 215 214 static { 216 215 Shapes.put(CatLMK.LMK_CARN, Beacons.Cairn); Shapes.put(CatLMK.LMK_CHMY, Landmarks.Chimney); … … 224 223 } 225 224 226 public static final EnumMap<FncFNC, ArrayList<Instr>> Funcs = new EnumMap<FncFNC, ArrayList<Instr>>(FncFNC.class);225 public static final EnumMap<FncFNC, Symbol> Funcs = new EnumMap<FncFNC, Symbol>(FncFNC.class); 227 226 static { 228 227 Funcs.put(FncFNC.FNC_CHCH, Landmarks.Church); Funcs.put(FncFNC.FNC_CHPL, Landmarks.Church); Funcs.put(FncFNC.FNC_TMPL, Landmarks.Temple); -
applications/editors/josm/plugins/smed2/src/symbols/Notices.java
r29134 r29186 15 15 import java.awt.Rectangle; 16 16 import java.awt.geom.*; 17 import java.util.ArrayList; 18 19 import symbols.Symbols.Caption; 20 import symbols.Symbols.Delta; 21 import symbols.Symbols.Handle; 22 import symbols.Symbols.Instr; 23 import symbols.Symbols.Prim; 17 18 import symbols.Symbols.*; 24 19 25 20 public class Notices { 26 private static final ArrayList<Instr> Bollard = new ArrayList<Instr>();21 private static final Symbol Bollard = new Symbol(); 27 22 static { 28 23 Bollard.add(new Instr(Prim.FILL, Color.black)); … … 33 28 Bollard.add(new Instr(Prim.PGON, p)); 34 29 } 35 private static final ArrayList<Instr> Crossing = new ArrayList<Instr>();36 private static final ArrayList<Instr> CrossingL = new ArrayList<Instr>();37 private static final ArrayList<Instr> CrossingR = new ArrayList<Instr>();38 private static final ArrayList<Instr> Junction = new ArrayList<Instr>();39 private static final ArrayList<Instr> JunctionL = new ArrayList<Instr>();40 private static final ArrayList<Instr> JunctionR = new ArrayList<Instr>();41 private static final ArrayList<Instr> Motor = new ArrayList<Instr>();30 private static final Symbol Crossing = new Symbol(); 31 private static final Symbol CrossingL = new Symbol(); 32 private static final Symbol CrossingR = new Symbol(); 33 private static final Symbol Junction = new Symbol(); 34 private static final Symbol JunctionL = new Symbol(); 35 private static final Symbol JunctionR = new Symbol(); 36 private static final Symbol Motor = new Symbol(); 42 37 static { 43 38 Motor.add(new Instr(Prim.FILL, Color.black)); … … 48 43 Motor.add(new Instr(Prim.PGON, p)); 49 44 } 50 private static final ArrayList<Instr> Proceed = new ArrayList<Instr>();51 private static final ArrayList<Instr> Rowboat = new ArrayList<Instr>();52 private static final ArrayList<Instr> Sailboard = new ArrayList<Instr>();53 private static final ArrayList<Instr> Sailboat = new ArrayList<Instr>();54 private static final ArrayList<Instr> Slipway = new ArrayList<Instr>();55 private static final ArrayList<Instr> Speedboat = new ArrayList<Instr>();56 private static final ArrayList<Instr> Sport = new ArrayList<Instr>();45 private static final Symbol Proceed = new Symbol(); 46 private static final Symbol Rowboat = new Symbol(); 47 private static final Symbol Sailboard = new Symbol(); 48 private static final Symbol Sailboat = new Symbol(); 49 private static final Symbol Slipway = new Symbol(); 50 private static final Symbol Speedboat = new Symbol(); 51 private static final Symbol Sport = new Symbol(); 57 52 static { 58 53 Sport.add(new Instr(Prim.FONT, new Font("Arial", Font.BOLD, 15))); 59 54 Sport.add(new Instr(Prim.TEXT, new Caption("SPORT", (float)-25.0, (float)5.0))); 60 55 } 61 private static final ArrayList<Instr> Turn = new ArrayList<Instr>();56 private static final Symbol Turn = new Symbol(); 62 57 static { 63 58 Turn.add(new Instr(Prim.STRK, new BasicStroke(5.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); … … 69 64 Turn.add(new Instr(Prim.PGON, p)); 70 65 } 71 private static final ArrayList<Instr> VHF = new ArrayList<Instr>();66 private static final Symbol VHF = new Symbol(); 72 67 static { 73 68 VHF.add(new Instr(Prim.FONT, new Font("Arial", Font.BOLD, 20))); 74 69 VHF.add(new Instr(Prim.TEXT, new Caption("VHF", (float)-20.0, (float)-5.0))); 75 70 } 76 private static final ArrayList<Instr> Waterbike = new ArrayList<Instr>();77 private static final ArrayList<Instr> Waterski = new ArrayList<Instr>();78 private static final ArrayList<Instr> NoticeA = new ArrayList<Instr>();71 private static final Symbol Waterbike = new Symbol(); 72 private static final Symbol Waterski = new Symbol(); 73 private static final Symbol NoticeA = new Symbol(); 79 74 static { 80 75 NoticeA.add(new Instr(Prim.FILL, new Color(0xe80000))); … … 89 84 NoticeA.add(new Instr(Prim.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 90 85 } 91 private static final ArrayList<Instr> NoticeB = new ArrayList<Instr>();86 private static final Symbol NoticeB = new Symbol(); 92 87 static { 93 88 NoticeB.add(new Instr(Prim.FILL, new Color(0xe80000))); … … 99 94 NoticeB.add(new Instr(Prim.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 100 95 } 101 private static final ArrayList<Instr> NoticeE = new ArrayList<Instr>();96 private static final Symbol NoticeE = new Symbol(); 102 97 static { 103 98 NoticeE.add(new Instr(Prim.FILL, new Color(0x0000a0))); … … 108 103 } 109 104 110 public static final ArrayList<Instr> Notice = new ArrayList<Instr>();111 public static final ArrayList<Instr> NoticeA1 = new ArrayList<Instr>();105 public static final Symbol Notice = new Symbol(); 106 public static final Symbol NoticeA1 = new Symbol(); 112 107 static { 113 108 NoticeA1.add(new Instr(Prim.FILL, new Color(0xe80000))); … … 119 114 NoticeA1.add(new Instr(Prim.RRCT, new RoundRectangle2D.Double(-30,-30,60,60,4,4))); 120 115 } 121 public static final ArrayList<Instr> NoticeA1a = new ArrayList<Instr>();116 public static final Symbol NoticeA1a = new Symbol(); 122 117 static { 123 118 NoticeA1a.add(new Instr(Prim.FILL, new Color(0xe80000))); … … 129 124 NoticeA1a.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-30,-30,60,60))); 130 125 } 131 public static final ArrayList<Instr> NoticeA2 = new ArrayList<Instr>();132 static { 133 NoticeA2.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));126 public static final Symbol NoticeA2 = new Symbol(); 127 static { 128 NoticeA2.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 134 129 NoticeA2.add(new Instr(Prim.FILL, Color.black)); 135 130 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,23); p.lineTo(-10,0); p.lineTo(-6,0); p.lineTo(-12.5,-8); p.lineTo(-19,0); p.lineTo(-15,0); p.lineTo(-15,23); … … 137 132 NoticeA2.add(new Instr(Prim.PGON, p)); 138 133 } 139 public static final ArrayList<Instr> NoticeA3 = new ArrayList<Instr>();140 static { 141 NoticeA3.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA2, 1.0, 0, 0, null, null)));134 public static final Symbol NoticeA3 = new Symbol(); 135 static { 136 NoticeA3.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA2, 1.0, 0, 0, null, null))); 142 137 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,12); p.lineTo(-6,12); p.lineTo(-12.5,4); p.lineTo(-19,12); 143 138 p.closePath(); p.moveTo(10,-3); p.lineTo(6,-3); p.lineTo(12.5,-11); p.lineTo(19,-3); p.closePath(); 144 139 NoticeA3.add(new Instr(Prim.PGON, p)); 145 140 } 146 public static final ArrayList<Instr> NoticeA4 = new ArrayList<Instr>();147 static { 148 NoticeA4.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));141 public static final Symbol NoticeA4 = new Symbol(); 142 static { 143 NoticeA4.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 149 144 NoticeA4.add(new Instr(Prim.FILL, Color.black)); 150 145 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,-15); p.lineTo(-10,8); p.lineTo(-6,8); p.lineTo(-12.5,16); p.lineTo(-19,8); p.lineTo(-15,8); p.lineTo(-15,-15); … … 152 147 NoticeA4.add(new Instr(Prim.PGON, p)); 153 148 } 154 public static final ArrayList<Instr> NoticeA4_1 = new ArrayList<Instr>();155 static { 156 NoticeA4_1.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA4, 1.0, 0, 0, null, null)));149 public static final Symbol NoticeA4_1 = new Symbol(); 150 static { 151 NoticeA4_1.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA4, 1.0, 0, 0, null, null))); 157 152 Path2D.Double p = new Path2D.Double(); p.moveTo(-10,-4); p.lineTo(-6,-4); p.lineTo(-12.5,4); p.lineTo(-19,-4); 158 153 p.closePath(); p.moveTo(10,5); p.lineTo(6,5); p.lineTo(12.5,-3); p.lineTo(19,5); p.closePath(); 159 154 NoticeA4_1.add(new Instr(Prim.PGON, p)); 160 155 } 161 public static final ArrayList<Instr> NoticeA5 = new ArrayList<Instr>();162 static { 163 NoticeA5.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));156 public static final Symbol NoticeA5 = new Symbol(); 157 static { 158 NoticeA5.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 164 159 NoticeA5.add(new Instr(Prim.FILL, Color.black)); 165 160 Path2D.Double p = new Path2D.Double(); p.setWindingRule(GeneralPath.WIND_EVEN_ODD); p.moveTo(-5.3,14.6); p.lineTo(-5.3,4.0); p.lineTo(0.0,4.0); p.curveTo(4.2,4.0,7.4,3.5,9.4,0.0); … … 168 163 NoticeA5.add(new Instr(Prim.PGON, p)); 169 164 } 170 public static final ArrayList<Instr> NoticeA5_1 = new ArrayList<Instr>();171 static { 172 NoticeA5_1.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));173 } 174 public static final ArrayList<Instr> NoticeA6 = new ArrayList<Instr>();175 static { 176 NoticeA6.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));177 NoticeA6.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Harbours.Anchor, 0.4, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0))), null)));178 } 179 public static final ArrayList<Instr> NoticeA7 = new ArrayList<Instr>();180 static { 181 NoticeA7.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));182 NoticeA7.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Bollard, 1.0, 0, 0, null, null)));183 } 184 public static final ArrayList<Instr> NoticeA8 = new ArrayList<Instr>();185 static { 186 NoticeA8.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));187 NoticeA8.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Turn, 1.0, 0, 0, null, null)));188 } 189 public static final ArrayList<Instr> NoticeA9 = new ArrayList<Instr>();190 static { 191 NoticeA9.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));165 public static final Symbol NoticeA5_1 = new Symbol(); 166 static { 167 NoticeA5_1.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 168 } 169 public static final Symbol NoticeA6 = new Symbol(); 170 static { 171 NoticeA6.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 172 NoticeA6.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Harbours.Anchor, 0.4, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0))), null))); 173 } 174 public static final Symbol NoticeA7 = new Symbol(); 175 static { 176 NoticeA7.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 177 NoticeA7.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Bollard, 1.0, 0, 0, null, null))); 178 } 179 public static final Symbol NoticeA8 = new Symbol(); 180 static { 181 NoticeA8.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 182 NoticeA8.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Turn, 1.0, 0, 0, null, null))); 183 } 184 public static final Symbol NoticeA9 = new Symbol(); 185 static { 186 NoticeA9.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 192 187 NoticeA9.add(new Instr(Prim.STRK, new BasicStroke(7.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER))); 193 188 NoticeA9.add(new Instr(Prim.FILL, Color.black)); … … 196 191 NoticeA9.add(new Instr(Prim.PLIN, p)); 197 192 } 198 public static final ArrayList<Instr> NoticeA10a = new ArrayList<Instr>();193 public static final Symbol NoticeA10a = new Symbol(); 199 194 static { 200 195 NoticeA10a.add(new Instr(Prim.BBOX, new Rectangle(-30,-30,60,60))); … … 210 205 NoticeA10a.add(new Instr(Prim.PLIN, p)); 211 206 } 212 public static final ArrayList<Instr> NoticeA10b = new ArrayList<Instr>();213 static { 214 NoticeA10b.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA10a, 1.0, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0))), null)));215 } 216 public static final ArrayList<Instr> NoticeA12= new ArrayList<Instr>();217 static { 218 NoticeA12.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));219 NoticeA12.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Motor, 1.0, 0, 0, null, null)));220 } 221 public static final ArrayList<Instr> NoticeA13= new ArrayList<Instr>();222 static { 223 NoticeA13.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));224 NoticeA13.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Sport, 1.0, 0, 0, null, null)));225 } 226 public static final ArrayList<Instr> NoticeA14= new ArrayList<Instr>();227 static { 228 NoticeA14.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));229 NoticeA14.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Waterski, 1.0, 0, 0, null, null)));230 } 231 public static final ArrayList<Instr> NoticeA15= new ArrayList<Instr>();232 static { 233 NoticeA15.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));234 NoticeA15.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Sailboat, 1.0, 0, 0, null, null)));235 } 236 public static final ArrayList<Instr> NoticeA16= new ArrayList<Instr>();237 static { 238 NoticeA16.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));239 NoticeA16.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Rowboat, 1.0, 0, 0, null, null)));240 } 241 public static final ArrayList<Instr> NoticeA17= new ArrayList<Instr>();242 static { 243 NoticeA17.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));244 NoticeA17.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Sailboard, 1.0, 0, 0, null, null)));245 } 246 public static final ArrayList<Instr> NoticeA18= new ArrayList<Instr>();247 static { 248 NoticeA18.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));249 NoticeA18.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Speedboat, 1.0, 0, 0, null, null)));250 } 251 public static final ArrayList<Instr> NoticeA19= new ArrayList<Instr>();252 static { 253 NoticeA19.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));254 NoticeA19.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Slipway, 1.0, 0, 0, null, null)));255 } 256 public static final ArrayList<Instr> NoticeA20= new ArrayList<Instr>();257 static { 258 NoticeA20.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeA, 1.0, 0, 0, null, null)));259 NoticeA20.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.Waterbike, 1.0, 0, 0, null, null)));260 } 261 public static final ArrayList<Instr> NoticeB2a = new ArrayList<Instr>();262 public static final ArrayList<Instr> NoticeB2b = new ArrayList<Instr>();263 public static final ArrayList<Instr> NoticeB3a = new ArrayList<Instr>();264 public static final ArrayList<Instr> NoticeB3b = new ArrayList<Instr>();265 public static final ArrayList<Instr> NoticeB4a = new ArrayList<Instr>();266 public static final ArrayList<Instr> NoticeB4b = new ArrayList<Instr>();267 public static final ArrayList<Instr> NoticeB5 = new ArrayList<Instr>();268 public static final ArrayList<Instr> NoticeB7 = new ArrayList<Instr>();269 public static final ArrayList<Instr> NoticeB8 = new ArrayList<Instr>();270 public static final ArrayList<Instr> NoticeB11a = new ArrayList<Instr>();271 static { 272 NoticeB11a.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.NoticeB, 1.0, 0, 0, null, null)));273 NoticeB11a.add(new Instr(Prim.SYMB, new Symbols.S ymbol(Notices.VHF, 1.0, 0, 0, null, null)));274 } 275 public static final ArrayList<Instr> NoticeC1 = new ArrayList<Instr>();276 public static final ArrayList<Instr> NoticeC2 = new ArrayList<Instr>();277 public static final ArrayList<Instr> NoticeC3 = new ArrayList<Instr>();278 public static final ArrayList<Instr> NoticeC5a = new ArrayList<Instr>();279 public static final ArrayList<Instr> NoticeC5b = new ArrayList<Instr>();280 public static final ArrayList<Instr> NoticeD1a = new ArrayList<Instr>();281 public static final ArrayList<Instr> NoticeD1b = new ArrayList<Instr>();282 public static final ArrayList<Instr> NoticeD2a = new ArrayList<Instr>();283 public static final ArrayList<Instr> NoticeD2b = new ArrayList<Instr>();284 public static final ArrayList<Instr> NoticeE1 = new ArrayList<Instr>();285 public static final ArrayList<Instr> NoticeE2 = new ArrayList<Instr>();286 public static final ArrayList<Instr> NoticeE3 = new ArrayList<Instr>();287 public static final ArrayList<Instr> NoticeE4a = new ArrayList<Instr>();288 public static final ArrayList<Instr> NoticeE4b = new ArrayList<Instr>();289 public static final ArrayList<Instr> NoticeE5_4 = new ArrayList<Instr>();290 public static final ArrayList<Instr> NoticeE5_5 = new ArrayList<Instr>();291 public static final ArrayList<Instr> NoticeE5_6 = new ArrayList<Instr>();292 public static final ArrayList<Instr> NoticeE5_7 = new ArrayList<Instr>();293 public static final ArrayList<Instr> NoticeE5_8 = new ArrayList<Instr>();294 public static final ArrayList<Instr> NoticeE5_9 = new ArrayList<Instr>();295 public static final ArrayList<Instr> NoticeE5_10 = new ArrayList<Instr>();296 public static final ArrayList<Instr> NoticeE5_11 = new ArrayList<Instr>();297 public static final ArrayList<Instr> NoticeE5_12 = new ArrayList<Instr>();298 public static final ArrayList<Instr> NoticeE5_13 = new ArrayList<Instr>();299 public static final ArrayList<Instr> NoticeE5_14 = new ArrayList<Instr>();300 public static final ArrayList<Instr> NoticeE5_15 = new ArrayList<Instr>();301 public static final ArrayList<Instr> NoticeE7_1 = new ArrayList<Instr>();302 public static final ArrayList<Instr> Notice11 = new ArrayList<Instr>();303 public static final ArrayList<Instr> Notice13 = new ArrayList<Instr>();304 public static final ArrayList<Instr> Notice14 = new ArrayList<Instr>();207 public static final Symbol NoticeA10b = new Symbol(); 208 static { 209 NoticeA10b.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA10a, 1.0, 0, 0, new Delta(Handle.CC, AffineTransform.getRotateInstance(Math.toRadians(180.0))), null))); 210 } 211 public static final Symbol NoticeA12= new Symbol(); 212 static { 213 NoticeA12.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 214 NoticeA12.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Motor, 1.0, 0, 0, null, null))); 215 } 216 public static final Symbol NoticeA13= new Symbol(); 217 static { 218 NoticeA13.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 219 NoticeA13.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Sport, 1.0, 0, 0, null, null))); 220 } 221 public static final Symbol NoticeA14= new Symbol(); 222 static { 223 NoticeA14.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 224 NoticeA14.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Waterski, 1.0, 0, 0, null, null))); 225 } 226 public static final Symbol NoticeA15= new Symbol(); 227 static { 228 NoticeA15.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 229 NoticeA15.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Sailboat, 1.0, 0, 0, null, null))); 230 } 231 public static final Symbol NoticeA16= new Symbol(); 232 static { 233 NoticeA16.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 234 NoticeA16.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Rowboat, 1.0, 0, 0, null, null))); 235 } 236 public static final Symbol NoticeA17= new Symbol(); 237 static { 238 NoticeA17.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 239 NoticeA17.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Sailboard, 1.0, 0, 0, null, null))); 240 } 241 public static final Symbol NoticeA18= new Symbol(); 242 static { 243 NoticeA18.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 244 NoticeA18.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Speedboat, 1.0, 0, 0, null, null))); 245 } 246 public static final Symbol NoticeA19= new Symbol(); 247 static { 248 NoticeA19.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 249 NoticeA19.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Slipway, 1.0, 0, 0, null, null))); 250 } 251 public static final Symbol NoticeA20= new Symbol(); 252 static { 253 NoticeA20.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeA, 1.0, 0, 0, null, null))); 254 NoticeA20.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.Waterbike, 1.0, 0, 0, null, null))); 255 } 256 public static final Symbol NoticeB2a = new Symbol(); 257 public static final Symbol NoticeB2b = new Symbol(); 258 public static final Symbol NoticeB3a = new Symbol(); 259 public static final Symbol NoticeB3b = new Symbol(); 260 public static final Symbol NoticeB4a = new Symbol(); 261 public static final Symbol NoticeB4b = new Symbol(); 262 public static final Symbol NoticeB5 = new Symbol(); 263 public static final Symbol NoticeB7 = new Symbol(); 264 public static final Symbol NoticeB8 = new Symbol(); 265 public static final Symbol NoticeB11a = new Symbol(); 266 static { 267 NoticeB11a.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.NoticeB, 1.0, 0, 0, null, null))); 268 NoticeB11a.add(new Instr(Prim.SYMB, new Symbols.SubSymbol(Notices.VHF, 1.0, 0, 0, null, null))); 269 } 270 public static final Symbol NoticeC1 = new Symbol(); 271 public static final Symbol NoticeC2 = new Symbol(); 272 public static final Symbol NoticeC3 = new Symbol(); 273 public static final Symbol NoticeC5a = new Symbol(); 274 public static final Symbol NoticeC5b = new Symbol(); 275 public static final Symbol NoticeD1a = new Symbol(); 276 public static final Symbol NoticeD1b = new Symbol(); 277 public static final Symbol NoticeD2a = new Symbol(); 278 public static final Symbol NoticeD2b = new Symbol(); 279 public static final Symbol NoticeE1 = new Symbol(); 280 public static final Symbol NoticeE2 = new Symbol(); 281 public static final Symbol NoticeE3 = new Symbol(); 282 public static final Symbol NoticeE4a = new Symbol(); 283 public static final Symbol NoticeE4b = new Symbol(); 284 public static final Symbol NoticeE5_4 = new Symbol(); 285 public static final Symbol NoticeE5_5 = new Symbol(); 286 public static final Symbol NoticeE5_6 = new Symbol(); 287 public static final Symbol NoticeE5_7 = new Symbol(); 288 public static final Symbol NoticeE5_8 = new Symbol(); 289 public static final Symbol NoticeE5_9 = new Symbol(); 290 public static final Symbol NoticeE5_10 = new Symbol(); 291 public static final Symbol NoticeE5_11 = new Symbol(); 292 public static final Symbol NoticeE5_12 = new Symbol(); 293 public static final Symbol NoticeE5_13 = new Symbol(); 294 public static final Symbol NoticeE5_14 = new Symbol(); 295 public static final Symbol NoticeE5_15 = new Symbol(); 296 public static final Symbol NoticeE7_1 = new Symbol(); 297 public static final Symbol Notice11 = new Symbol(); 298 public static final Symbol Notice13 = new Symbol(); 299 public static final Symbol Notice14 = new Symbol(); 305 300 } -
applications/editors/josm/plugins/smed2/src/symbols/Symbols.java
r29176 r29186 97 97 } 98 98 99 public static class Symbol { 100 ArrayList<Instr> instr; 99 public static class Symbol extends ArrayList<Instr> { 100 private static final long serialVersionUID = 1L; 101 102 public Symbol() { 103 super(); 104 } 105 } 106 107 public static class SubSymbol { 108 Symbol instr; 101 109 double scale; 102 110 double x; … … 105 113 Scheme scheme; 106 114 107 public S ymbol(ArrayList<Instr>iinstr, double iscale, double ix, double iy, Delta idelta, Scheme ischeme) {115 public SubSymbol(Symbol iinstr, double iscale, double ix, double iy, Delta idelta, Scheme ischeme) { 108 116 instr = iinstr; 109 117 scale = iscale; … … 115 123 } 116 124 117 public static void drawSymbol(Graphics2D g2, ArrayList<Instr>symbol, double scale, double x, double y, Delta dd, Scheme cs) {125 public static void drawSymbol(Graphics2D g2, Symbol symbol, double scale, double x, double y, Delta dd, Scheme cs) { 118 126 int pn = 0; 119 127 int cn = 0; … … 260 268 break; 261 269 case SYMB: 262 S ymbol s = (Symbol) item.params;270 SubSymbol s = (SubSymbol) item.params; 263 271 drawSymbol(g2, s.instr, s.scale, s.x, s.y, s.delta, s.scheme); 264 272 break; -
applications/editors/josm/plugins/smed2/src/symbols/Topmarks.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 … … 25 24 public class Topmarks { 26 25 27 public static final ArrayList<Instr> FogSignal = new ArrayList<Instr>(); 28 public static final ArrayList<Instr> LightFlare = new ArrayList<Instr>(); 29 public static final ArrayList<Instr> Radar = new ArrayList<Instr>(); 30 public static final ArrayList<Instr> TopBoard = new ArrayList<Instr>(); 26 public static final Symbol TopBoard = new Symbol(); 31 27 static { 32 28 TopBoard.add(new Instr(Prim.BBOX, new Rectangle(-20,-80,40,80))); 33 ArrayList<Instr> colours = new ArrayList<Instr>();29 Symbol colours = new Symbol(); 34 30 Path2D.Double p = new Path2D.Double(); p.moveTo(-19.0,-2.0); p.lineTo(-19.0,-39.0); p.lineTo(19.0,-39.0); p.lineTo(19.0,-2.0); p.closePath(); 35 31 colours.add(new Instr(Prim.P1, p)); … … 40 36 TopBoard.add(new Instr(Prim.PLIN, p)); 41 37 } 42 public static final ArrayList<Instr> TopCan = new ArrayList<Instr>();38 public static final Symbol TopCan = new Symbol(); 43 39 static { 44 40 TopCan.add(new Instr(Prim.BBOX, new Rectangle(-20,-80,40,80))); 45 ArrayList<Instr> colours = new ArrayList<Instr>();41 Symbol colours = new Symbol(); 46 42 Path2D.Double p = new Path2D.Double(); p.moveTo(-12.0,-15.0); p.lineTo(-12.0,-48.0); p.lineTo(12.0,-48.0); p.lineTo(12.0,-15.0); p.closePath(); 47 43 colours.add(new Instr(Prim.P1, p)); … … 53 49 TopCan.add(new Instr(Prim.PLIN, p)); 54 50 } 55 public static final ArrayList<Instr> TopCone = new ArrayList<Instr>();51 public static final Symbol TopCone = new Symbol(); 56 52 static { 57 53 TopCone.add(new Instr(Prim.BBOX, new Rectangle(-20,-80,40,80))); 58 ArrayList<Instr> colours = new ArrayList<Instr>();54 Symbol colours = new Symbol(); 59 55 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-15.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-15.0); p.closePath(); 60 56 colours.add(new Instr(Prim.P1, p)); … … 66 62 TopCone.add(new Instr(Prim.PLIN, p)); 67 63 } 68 public static final ArrayList<Instr> TopCross = new ArrayList<Instr>();64 public static final Symbol TopCross = new Symbol(); 69 65 static { 70 66 TopCross.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 71 ArrayList<Instr> colours = new ArrayList<Instr>();67 Symbol colours = new Symbol(); 72 68 Path2D.Double p = new Path2D.Double(); p.moveTo(-5.0,-15.0); p.lineTo(-5.0,-32.5); p.lineTo(-22.5,-32.5); p.lineTo(-22.5,-42.5); p.lineTo(-5.0,-42.5); 73 69 p.lineTo(-5.0,-60.0); p.lineTo(5.0,-60.0); p.lineTo(5.0,-42.5); p.lineTo(22.5,-42.5); p.lineTo(22.5,-32.5); p.lineTo(5.0,-32.5); p.lineTo(5.0,-15.0); p.closePath(); … … 82 78 TopCross.add(new Instr(Prim.PLIN, p)); 83 79 } 84 public static final ArrayList<Instr> TopEast = new ArrayList<Instr>();80 public static final Symbol TopEast = new Symbol(); 85 81 static { 86 82 TopEast.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 87 ArrayList<Instr> colours = new ArrayList<Instr>();83 Symbol colours = new Symbol(); 88 84 Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-80.0); p.lineTo(-15.0,-47.0); p.lineTo(15.0,-47.0); p.closePath(); 89 85 colours.add(new Instr(Prim.P1, p)); … … 100 96 TopEast.add(new Instr(Prim.PLIN, p)); 101 97 } 102 public static final ArrayList<Instr> TopIsol = new ArrayList<Instr>();98 public static final Symbol TopIsol = new Symbol(); 103 99 static { 104 100 TopIsol.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 105 ArrayList<Instr> colours = new ArrayList<Instr>();101 Symbol colours = new Symbol(); 106 102 Path2D.Double p = new Path2D.Double(); p.moveTo(-13.0,-55.0); p.curveTo(-13.0, -72.3, 13.0, -72.3, 13.0,-55.0); p.curveTo(13.0, -37.7, -13.0, -37.7, -13.0,-55.0); p.closePath(); 107 103 colours.add(new Instr(Prim.P1, p)); … … 116 112 TopIsol.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-13,-68,26,26))); 117 113 } 118 public static final ArrayList<Instr> TopMooring = new ArrayList<Instr>();114 public static final Symbol TopMooring = new Symbol(); 119 115 static { 120 116 TopMooring.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); … … 124 120 TopMooring.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-8.5,-25,17,17))); 125 121 } 126 public static final ArrayList<Instr> TopNorth = new ArrayList<Instr>();122 public static final Symbol TopNorth = new Symbol(); 127 123 static { 128 124 TopNorth.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 129 ArrayList<Instr> colours = new ArrayList<Instr>();125 Symbol colours = new Symbol(); 130 126 Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-78.0); p.lineTo(-15.0,-45.0); p.lineTo(15.0,-45.0); p.closePath(); 131 127 colours.add(new Instr(Prim.P1, p)); … … 141 137 TopNorth.add(new Instr(Prim.PLIN, p)); 142 138 } 143 public static final ArrayList<Instr> TopSouth = new ArrayList<Instr>();139 public static final Symbol TopSouth = new Symbol(); 144 140 static { 145 141 TopSouth.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 146 ArrayList<Instr> colours = new ArrayList<Instr>();142 Symbol colours = new Symbol(); 147 143 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath(); 148 144 colours.add(new Instr(Prim.P1, p)); … … 158 154 TopSouth.add(new Instr(Prim.PLIN, p)); 159 155 } 160 public static final ArrayList<Instr> TopSphere = new ArrayList<Instr>();156 public static final Symbol TopSphere = new Symbol(); 161 157 static { 162 158 TopSphere.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 163 ArrayList<Instr> colours = new ArrayList<Instr>();159 Symbol colours = new Symbol(); 164 160 Path2D.Double p = new Path2D.Double(); p.moveTo(-14.0,-28.0); p.curveTo(-14.0,-46.7,14.0,-46.7,14.0,-28.0); p.curveTo(14.0,-9.3,-14.0,-9.3,-14.0,-28.0); p.closePath(); 165 161 colours.add(new Instr(Prim.P1, p)); … … 171 167 TopSphere.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-14,-42,28,28))); 172 168 } 173 public static final ArrayList<Instr> TopSquare = new ArrayList<Instr>();169 public static final Symbol TopSquare = new Symbol(); 174 170 static { 175 171 TopSquare.add(new Instr(Prim.BBOX, new Rectangle(-20,-80,40,80))); 176 ArrayList<Instr> colours = new ArrayList<Instr>();172 Symbol colours = new Symbol(); 177 173 Path2D.Double p = new Path2D.Double(); p.moveTo(-13.0,-1.0); p.lineTo(-13.0,-27.0); p.lineTo(13.0,-27.0); p.lineTo(13.0,-1.0); p.closePath(); 178 174 colours.add(new Instr(Prim.P1, p)); … … 183 179 TopSquare.add(new Instr(Prim.PLIN, p)); 184 180 } 185 public static final ArrayList<Instr> TopTriangle = new ArrayList<Instr>();181 public static final Symbol TopTriangle = new Symbol(); 186 182 static { 187 183 TopTriangle.add(new Instr(Prim.BBOX, new Rectangle(-20,-80,40,80))); 188 ArrayList<Instr> colours = new ArrayList<Instr>();184 Symbol colours = new Symbol(); 189 185 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-1.0); p.lineTo(0.0,-29.0); p.lineTo(15.0,-1.0); p.closePath(); 190 186 colours.add(new Instr(Prim.P1, p)); … … 195 191 TopTriangle.add(new Instr(Prim.PLIN, p)); 196 192 } 197 public static final ArrayList<Instr> TopWest = new ArrayList<Instr>();193 public static final Symbol TopWest = new Symbol(); 198 194 static { 199 195 TopWest.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 200 ArrayList<Instr> colours = new ArrayList<Instr>();196 Symbol colours = new Symbol(); 201 197 Path2D.Double p = new Path2D.Double(); p.moveTo(-15.0,-78.0); p.lineTo(0.0,-45.0); p.lineTo(15.0,-78.0); p.closePath(); 202 198 colours.add(new Instr(Prim.P1, p)); … … 212 208 TopWest.add(new Instr(Prim.PLIN, p)); 213 209 } 214 public static final ArrayList<Instr> TopX = new ArrayList<Instr>();210 public static final Symbol TopX = new Symbol(); 215 211 static { 216 212 TopX.add(new Instr(Prim.BBOX, new Rectangle(-30,-80,60,80))); 217 ArrayList<Instr> colours = new ArrayList<Instr>();213 Symbol colours = new Symbol(); 218 214 Path2D.Double p = new Path2D.Double(); p.moveTo(0.0,-27.7); p.lineTo(-12.4,-15.7); p.lineTo(-19.3,-22.6); p.lineTo(-7.3,-35.0); p.lineTo(-19.3,-47.3); 219 215 p.lineTo(-12.4,-54.2); p.lineTo(0.0,-42.4); p.lineTo(12.4,-54.2); p.lineTo(19.3,-47.3); p.lineTo(7.3,-35.0); p.lineTo(19.3,-22.6); p.lineTo(12.4,-15.7); p.closePath(); … … 229 225 } 230 226 227 public static final EnumMap<TopSHP, Symbol> Shapes = new EnumMap<TopSHP, Symbol>(TopSHP.class); 228 static { 229 Shapes.put(TopSHP.TOP_BORD, TopBoard); Shapes.put(TopSHP.TOP_CAN, TopCan); Shapes.put(TopSHP.TOP_CONE, TopCone); Shapes.put(TopSHP.TOP_CROS, TopCross); 230 Shapes.put(TopSHP.TOP_EAST, TopEast); Shapes.put(TopSHP.TOP_ISD, TopIsol); Shapes.put(TopSHP.TOP_NORTH, TopNorth); Shapes.put(TopSHP.TOP_SOUTH, TopSouth); 231 Shapes.put(TopSHP.TOP_SPHR, TopSphere); Shapes.put(TopSHP.TOP_SQUR, TopSquare); Shapes.put(TopSHP.TOP_TRI, TopTriangle); Shapes.put(TopSHP.TOP_WEST, TopWest); 232 Shapes.put(TopSHP.TOP_SALT, TopX); 233 } 231 234 public static final EnumMap<BoySHP, Delta> Buoys = new EnumMap<BoySHP, Delta>(BoySHP.class); 232 235 static { … … 240 243 Buoys.put(BoySHP.BOY_ICE, new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -25.0))); 241 244 } 242 public static final Delta Floats = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -70.0)); 245 public static final Delta Floats = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -42.0)); 246 public static final Delta Beacons = new Delta(Handle.BC, AffineTransform.getTranslateInstance(0.0, -70.0)); 243 247 244 248 }
Note:
See TracChangeset
for help on using the changeset viewer.