summaryrefslogtreecommitdiff
path: root/altosui/AltosFlightUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'altosui/AltosFlightUI.java')
-rw-r--r--altosui/AltosFlightUI.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java
index e8cf7f08..aac4c9b0 100644
--- a/altosui/AltosFlightUI.java
+++ b/altosui/AltosFlightUI.java
@@ -32,6 +32,7 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay, A
JTabbedPane pane;
AltosPad pad;
+ AltosIgnitor ignitor;
AltosAscent ascent;
AltosDescent descent;
AltosLanded landed;
@@ -40,6 +41,7 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay, A
boolean has_map;
boolean has_companion;
boolean has_state;
+ boolean has_ignitor;
private AltosFlightStatus flightStatus;
private AltosInfoTable flightInfo;
@@ -73,6 +75,7 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay, A
public void reset() {
pad.reset();
+ ignitor.reset();
ascent.reset();
descent.reset();
landed.reset();
@@ -82,6 +85,7 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay, A
public void set_font() {
pad.set_font();
+ ignitor.set_font();
ascent.set_font();
descent.set_font();
landed.set_font();
@@ -130,6 +134,19 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay, A
flightStatus.show(state, listener_state);
flightInfo.show(state, listener_state);
+ if (ignitor.should_show(state)) {
+ if (!has_ignitor) {
+ pane.add("Ignitor", ignitor);
+ has_ignitor = true;
+ }
+ ignitor.show(state, listener_state);
+ } else {
+ if (has_ignitor) {
+ pane.remove(ignitor);
+ has_ignitor = false;
+ }
+ }
+
if (state.companion != null) {
if (!has_companion) {
pane.add("Companion", companion);
@@ -274,6 +291,7 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay, A
pad = new AltosPad();
pane.add("Status", pad);
+ ignitor = new AltosIgnitor();
ascent = new AltosAscent();
descent = new AltosDescent();
landed = new AltosLanded(reader);