diff options
Diffstat (limited to 'src/main/java/com/benburwell/planes/gui/aircraftmap/symbols/VORDMESymbol.java')
-rw-r--r-- | src/main/java/com/benburwell/planes/gui/aircraftmap/symbols/VORDMESymbol.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/com/benburwell/planes/gui/aircraftmap/symbols/VORDMESymbol.java b/src/main/java/com/benburwell/planes/gui/aircraftmap/symbols/VORDMESymbol.java new file mode 100644 index 0000000..0b67989 --- /dev/null +++ b/src/main/java/com/benburwell/planes/gui/aircraftmap/symbols/VORDMESymbol.java @@ -0,0 +1,29 @@ +package com.benburwell.planes.gui.aircraftmap.symbols; + +import com.benburwell.planes.data.Position; +import com.benburwell.planes.gui.GraphicsTheme; +import com.benburwell.planes.gui.aircraftmap.AircraftMap; +import com.benburwell.planes.gui.aircraftmap.Drawable; +import com.benburwell.planes.gui.aircraftmap.symbols.VORSymbol; + +import java.awt.Graphics; + +/** + * Created by ben on 11/19/16. + */ +public class VORDMESymbol extends VORSymbol implements Drawable { + public VORDMESymbol(String name, Position pos, int frequency) { + super(name, pos, frequency); + } + + @Override + public void drawOn(Graphics graphicsContext, AircraftMap map) { + super.drawOn(graphicsContext, map); + if (this.shouldDrawOn(map)) { + int x = this.getX(map); + int y = this.getY(map); + graphicsContext.setColor(GraphicsTheme.Colors.VIOLET); + graphicsContext.drawRect(x - VORSymbol.RADIUS, y - VORSymbol.HEIGHT, VORSymbol.RADIUS * 2, VORSymbol.HEIGHT * 2); + } + } +} |