summaryrefslogtreecommitdiff
path: root/src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java
diff options
context:
space:
mode:
authorBen Burwell <ben.burwell@trifecta.com>2016-11-19 14:23:59 -0500
committerBen Burwell <ben.burwell@trifecta.com>2016-11-19 14:23:59 -0500
commit72a0e5eeb914a9520a3c9fa51f4ee93a794f51a7 (patch)
tree867c36855c3b6449bc9e80c475231423b6617669 /src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java
parentb91190e2723efd3ca1a567b1ff5cfa24a438e9d1 (diff)
Fix up the ranging
Diffstat (limited to 'src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java')
-rw-r--r--src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java b/src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java
index b7f8aab..4bb13e8 100644
--- a/src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java
+++ b/src/com/benburwell/planes/gui/aircraftmap/AircraftMapComponent.java
@@ -35,20 +35,20 @@ public class AircraftMapComponent implements ViewComponent {
}
public void focusNextAircraft() {
- List<String> aircraftIdentifiers = new ArrayList<>(this.store.getAircraft().keySet());
- Collections.sort(aircraftIdentifiers);
- if (this.focusedAircraftIdentifier == null && aircraftIdentifiers.size() > 0) {
- this.focusedAircraftIdentifier = aircraftIdentifiers.get(0);
- } else {
- int idx = aircraftIdentifiers.indexOf(this.focusedAircraftIdentifier);
- if (idx > 0 && idx < aircraftIdentifiers.size() - 1) {
- this.focusedAircraftIdentifier = aircraftIdentifiers.get(idx++);
- } else if (aircraftIdentifiers.size() > 0) {
- this.focusedAircraftIdentifier = aircraftIdentifiers.get(0);
- } else {
- this.focusedAircraftIdentifier = null;
- }
- }
+ // List<String> aircraftIdentifiers = new ArrayList<>(this.store.getAircraft().keySet());
+ // Collections.sort(aircraftIdentifiers);
+ // if (this.focusedAircraftIdentifier == null && aircraftIdentifiers.size() > 0) {
+ // this.focusedAircraftIdentifier = aircraftIdentifiers.get(0);
+ // } else {
+ // int idx = aircraftIdentifiers.indexOf(this.focusedAircraftIdentifier);
+ // if (idx > 0 && idx < aircraftIdentifiers.size() - 1) {
+ // this.focusedAircraftIdentifier = aircraftIdentifiers.get(idx++);
+ // } else if (aircraftIdentifiers.size() > 0) {
+ // this.focusedAircraftIdentifier = aircraftIdentifiers.get(0);
+ // } else {
+ // this.focusedAircraftIdentifier = null;
+ // }
+ // }
}
private void setupMap() {
@@ -61,6 +61,7 @@ public class AircraftMapComponent implements ViewComponent {
if (e.getKeyCode() == KeyEvent.VK_EQUALS && e.isShiftDown() && e.getID() == KeyEvent.KEY_PRESSED) {
this.mapPanel.zoomIn();
} else if (e.getKeyCode() == KeyEvent.VK_MINUS && e.getID() == KeyEvent.KEY_PRESSED) {
+ System.out.println("Zooming out");
this.mapPanel.zoomOut();
} else if (e.getKeyCode() == KeyEvent.VK_L && e.getID() == KeyEvent.KEY_PRESSED) {
this.mapPanel.moveEast();