1 | /* Copyright 2012 Malcolm Herring
|
---|
2 | *
|
---|
3 | * This is free software: you can redistribute it and/or modify
|
---|
4 | * it under the terms of the GNU General Public License as published by
|
---|
5 | * the Free Software Foundation, version 3 of the License.
|
---|
6 | *
|
---|
7 | * For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>.
|
---|
8 | */
|
---|
9 |
|
---|
10 | package symbols;
|
---|
11 |
|
---|
12 | import java.awt.BasicStroke;
|
---|
13 | import java.awt.Color;
|
---|
14 | import java.awt.Rectangle;
|
---|
15 | import java.awt.geom.*;
|
---|
16 | import java.util.ArrayList;
|
---|
17 |
|
---|
18 | import symbols.Symbols.Instr;
|
---|
19 | import symbols.Symbols.Prim;
|
---|
20 |
|
---|
21 | public class Harbours {
|
---|
22 | public static final ArrayList<Instr> Anchor = new ArrayList<Instr>();
|
---|
23 | static {
|
---|
24 | Anchor.add(new Instr(Prim.BBOX, new Rectangle(-60,-60,120,120)));
|
---|
25 | Anchor.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
26 | Anchor.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-59,20,20)));
|
---|
27 | Path2D.Double p = new Path2D.Double(); p.moveTo(23.0,-40.0); p.lineTo(23.0,-30.0); p.lineTo(6.0,-30.0); p.lineTo(7.0,31.0); p.quadTo(21.0,29.0,31.0,22.0);
|
---|
28 | p.lineTo(27.0,18.0); p.lineTo(52.0,0.0); p.lineTo(45.0,35.0); p.lineTo(37.0,28.0); p.quadTo(25.0,39.0,7.0,43.0); p.lineTo(6.0,51.0);
|
---|
29 | p.lineTo(-6.0,51.0); p.lineTo(-7.0,43.0); p.quadTo(-25.0,39.0,-37.0,28.0); p.lineTo(-45.0,35.0); p.lineTo(-52.0,0.0); p.lineTo(-27.0,18.0);
|
---|
30 | p.lineTo(-31.0,22.0); p.quadTo(-21.0,29.0,-7.0,31.0); p.lineTo(-6.0,-30.0); p.lineTo(-23.0,-30.0); p.lineTo(-23.0,-40.0); p.closePath();
|
---|
31 | Anchor.add(new Instr(Prim.PGON, p));
|
---|
32 | }
|
---|
33 | public static final ArrayList<Instr> Yacht = new ArrayList<Instr>();
|
---|
34 | static {
|
---|
35 | Yacht.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
36 | Path2D.Double p = new Path2D.Double(); p.moveTo(-65.0,50.0); p.curveTo(-36.0,97.0,36.0,97.0,65.0,50.0); p.lineTo(3.0,50.0); p.lineTo(3.0,40.0); p.lineTo(55.0,30.0);
|
---|
37 | p.curveTo(32.0,4.0,25.0,-15.0,26.0,-52.0); p.lineTo(1.5,-40.0); p.lineTo(1.0,-64.0); p.lineTo(-2.0,-64.0); p.lineTo(-4.0,50.0); p.closePath();
|
---|
38 | p.moveTo(-50.0,45.0); p.curveTo(-55.0,3.0,-37.0,-28.5,-7.0,-46.0); p.curveTo(-28.0,-15.0,-26.0,11.0,-20.5,30.0); p.closePath();
|
---|
39 | Yacht.add(new Instr(Prim.PGON, p));
|
---|
40 | }
|
---|
41 | public static final ArrayList<Instr> Anchorage = new ArrayList<Instr>();
|
---|
42 | static {
|
---|
43 | Anchorage.add(new Instr(Prim.FILL, new Color(0xa30075)));
|
---|
44 | Anchorage.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 1.0, 0, 0, null, null)));
|
---|
45 | }
|
---|
46 | public static final ArrayList<Instr> AnchorBerth = new ArrayList<Instr>();
|
---|
47 | static {
|
---|
48 | AnchorBerth.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchorage, 1.0, 0, 0, null, null)));
|
---|
49 | AnchorBerth.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
50 | AnchorBerth.add(new Instr(Prim.FILL, Color.white));
|
---|
51 | Ellipse2D.Double s = new Ellipse2D.Double(-25,-25,50,50);
|
---|
52 | AnchorBerth.add(new Instr(Prim.RSHP, s));
|
---|
53 | AnchorBerth.add(new Instr(Prim.FILL, new Color(0xa30075)));
|
---|
54 | AnchorBerth.add(new Instr(Prim.ELPS, s));
|
---|
55 | }
|
---|
56 | public static final ArrayList<Instr> Bollard = new ArrayList<Instr>();
|
---|
57 | static {
|
---|
58 | Bollard.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
59 | Bollard.add(new Instr(Prim.FILL, Color.white));
|
---|
60 | Ellipse2D.Double s = new Ellipse2D.Double(-10,-10,20,20);
|
---|
61 | Bollard.add(new Instr(Prim.RSHP, s));
|
---|
62 | Bollard.add(new Instr(Prim.FILL, Color.black));
|
---|
63 | Bollard.add(new Instr(Prim.ELPS, s));
|
---|
64 | }
|
---|
65 | public static final ArrayList<Instr> ClearV = new ArrayList<Instr>();
|
---|
66 | static {
|
---|
67 | ClearV.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
68 | ClearV.add(new Instr(Prim.FILL, Color.white));
|
---|
69 | ClearV.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-30,-30,60,60)));
|
---|
70 | ClearV.add(new Instr(Prim.FILL, Color.black));
|
---|
71 | ClearV.add(new Instr(Prim.LINE, new Line2D.Double(-10,-25,10,-25)));
|
---|
72 | ClearV.add(new Instr(Prim.LINE, new Line2D.Double(0,-25,0,-15)));
|
---|
73 | ClearV.add(new Instr(Prim.LINE, new Line2D.Double(-10,25,10,25)));
|
---|
74 | ClearV.add(new Instr(Prim.LINE, new Line2D.Double(0,25,0,15)));
|
---|
75 | }
|
---|
76 | public static final ArrayList<Instr> ContainerCrane = new ArrayList<Instr>();
|
---|
77 | static {
|
---|
78 | ContainerCrane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
79 | ContainerCrane.add(new Instr(Prim.FILL, Color.black));
|
---|
80 | ContainerCrane.add(new Instr(Prim.RSHP, new Rectangle2D.Double(-15,-65,30,100)));
|
---|
81 | ContainerCrane.add(new Instr(Prim.RECT, new Rectangle2D.Double(-40,-12.5,80,25)));
|
---|
82 | }
|
---|
83 | public static final ArrayList<Instr> DeviationDolphin = new ArrayList<Instr>();
|
---|
84 | static {
|
---|
85 | DeviationDolphin.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
86 | DeviationDolphin.add(new Instr(Prim.FILL, Color.black));
|
---|
87 | Path2D.Double p = new Path2D.Double(); p.moveTo(-30.0,0.0); p.lineTo(30.0,0.0); p.moveTo(0.0,0.0); p.lineTo(0.0,-40.0);
|
---|
88 | p.moveTo(-20.0,0.0); p.lineTo(-15.0,-32.0); p.lineTo(15.0,-32.0); p.lineTo(20.0,0.0);
|
---|
89 | DeviationDolphin.add(new Instr(Prim.PLIN, p));
|
---|
90 | }
|
---|
91 | public static final ArrayList<Instr> DistanceI = new ArrayList<Instr>();
|
---|
92 | static {
|
---|
93 | DistanceI.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
94 | DistanceI.add(new Instr(Prim.FILL, Color.black));
|
---|
95 | DistanceI.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22)));
|
---|
96 | }
|
---|
97 | public static final ArrayList<Instr> DistanceU = new ArrayList<Instr>();
|
---|
98 | static {
|
---|
99 | DistanceU.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
100 | DistanceU.add(new Instr(Prim.FILL, new Color(0xa30075)));
|
---|
101 | DistanceU.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-11,-11,22,22)));
|
---|
102 | }
|
---|
103 | public static final ArrayList<Instr> Dolphin = new ArrayList<Instr>();
|
---|
104 | static {
|
---|
105 | Dolphin.add(new Instr(Prim.STRK, new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
106 | Dolphin.add(new Instr(Prim.FILL, new Color(0xffd400)));
|
---|
107 | Path2D.Double p = new Path2D.Double(); p.moveTo(3.8,-9.2); p.lineTo(9.2,-3.8); p.lineTo(9.2,3.8); p.lineTo(3.8,9.2);
|
---|
108 | p.lineTo(-3.8,9.2); p.lineTo(-9.2,3.8); p.lineTo(-9.2,-3.8); p.lineTo(-3.8,-9.2); p.closePath();
|
---|
109 | Dolphin.add(new Instr(Prim.PGON, p));
|
---|
110 | Dolphin.add(new Instr(Prim.FILL, Color.black));
|
---|
111 | Dolphin.add(new Instr(Prim.PLIN, p));
|
---|
112 | }
|
---|
113 | public static final ArrayList<Instr> Harbour = new ArrayList<Instr>();
|
---|
114 | static {
|
---|
115 | Harbour.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
116 | Harbour.add(new Instr(Prim.FILL, new Color(0xa30075)));
|
---|
117 | Harbour.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-75,-75,150,150)));
|
---|
118 | Harbour.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 1.0, 0, 0, null, null)));
|
---|
119 | }
|
---|
120 | public static final ArrayList<Instr> HarbourMaster = new ArrayList<Instr>();
|
---|
121 | static {
|
---|
122 | HarbourMaster.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
123 | HarbourMaster.add(new Instr(Prim.FILL, Color.black));
|
---|
124 | HarbourMaster.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-35,-50,70,100)));
|
---|
125 | HarbourMaster.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Anchor, 0.6, 0, 0, null, null)));
|
---|
126 | }
|
---|
127 | public static final ArrayList<Instr> LandingSteps = new ArrayList<Instr>();
|
---|
128 | static {
|
---|
129 | LandingSteps.add(new Instr(Prim.FILL, new Color(0xa30075)));
|
---|
130 | Path2D.Double p = new Path2D.Double(); p.moveTo(-20,-10); p.lineTo(10,20); p.lineTo(20,20); p.lineTo(20,10);
|
---|
131 | p.lineTo(10,10); p.lineTo(10,0); p.lineTo(0,0); p.lineTo(0,-10); p.lineTo(-10,-10); p.lineTo(-10,-20); p.lineTo(-20,-20); p.closePath();
|
---|
132 | LandingSteps.add(new Instr(Prim.PGON, p));
|
---|
133 | }
|
---|
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>();
|
---|
137 | static {
|
---|
138 | Marina.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
139 | Marina.add(new Instr(Prim.FILL, new Color(0xa30075)));
|
---|
140 | Marina.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Yacht, 1.0, 0, 0, null, null)));
|
---|
141 | Marina.add(new Instr(Prim.EARC, new Arc2D.Double(-80.0,-80.0,160.0,160.0,215.0,-250.0,Arc2D.OPEN)));
|
---|
142 | }
|
---|
143 | public static final ArrayList<Instr> MarinaNF = new ArrayList<Instr>();
|
---|
144 | static {
|
---|
145 | MarinaNF.add(new Instr(Prim.STRK, new BasicStroke(15.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
146 | MarinaNF.add(new Instr(Prim.FILL, new Color(0xa30075)));
|
---|
147 | MarinaNF.add(new Instr(Prim.SYMB, new Symbols.Symbol(Harbours.Yacht, 1.0, 0, 0, null, null)));
|
---|
148 | }
|
---|
149 | public static final ArrayList<Instr> PortCrane = new ArrayList<Instr>();
|
---|
150 | static {
|
---|
151 | PortCrane.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
152 | PortCrane.add(new Instr(Prim.FILL, Color.black));
|
---|
153 | PortCrane.add(new Instr(Prim.EARC, new Arc2D.Double(-36.0,-36.0,72.0,72.0,70.0,-320.0,Arc2D.OPEN)));
|
---|
154 | PortCrane.add(new Instr(Prim.LINE, new Line2D.Double(0,0,0,-60)));
|
---|
155 | }
|
---|
156 | public static final ArrayList<Instr> Post = new ArrayList<Instr>();
|
---|
157 | static {
|
---|
158 | Post.add(new Instr(Prim.FILL, Color.black));
|
---|
159 | Post.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-10,-10,20,20)));
|
---|
160 | }
|
---|
161 | public static final ArrayList<Instr> SignalStation = new ArrayList<Instr>();
|
---|
162 | static {
|
---|
163 | SignalStation.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
164 | SignalStation.add(new Instr(Prim.FILL, Color.black));
|
---|
165 | SignalStation.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-25,-25,50,50)));
|
---|
166 | SignalStation.add(new Instr(Prim.RSHP, new Ellipse2D.Double(-4,-4,8,8)));
|
---|
167 | }
|
---|
168 | public static final ArrayList<Instr> TideGauge = new ArrayList<Instr>();
|
---|
169 | static {
|
---|
170 | TideGauge.add(new Instr(Prim.STRK, new BasicStroke(3.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
171 | TideGauge.add(new Instr(Prim.FILL, Color.black));
|
---|
172 | TideGauge.add(new Instr(Prim.ELPS, new Ellipse2D.Double(-10,-10,20,20)));
|
---|
173 | TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-10,0,-30,0)));
|
---|
174 | TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(10,0,30,0)));
|
---|
175 | TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(0,-10,0,-80)));
|
---|
176 | TideGauge.add(new Instr(Prim.STRK, new BasicStroke(4.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)));
|
---|
177 | TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-15,-25,15,-25)));
|
---|
178 | TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-25,-45,25,-45)));
|
---|
179 | TideGauge.add(new Instr(Prim.LINE, new Line2D.Double(-15,-65,15,-65)));
|
---|
180 | }
|
---|
181 | }
|
---|