- static final Font label_font = new Font("Dialog", Font.PLAIN, 22);
- static final Font value_font = new Font("Monospaced", Font.PLAIN, 22);
- static final Font status_font = new Font("SansSerif", Font.BOLD, 24);
-
- static final int text_width = 16;
-
- static void initialize_map()
- {
- string_to_state.put("startup", ao_flight_startup);
- string_to_state.put("idle", ao_flight_idle);
- string_to_state.put("pad", ao_flight_pad);
- string_to_state.put("boost", ao_flight_boost);
- string_to_state.put("fast", ao_flight_fast);
- string_to_state.put("coast", ao_flight_coast);
- string_to_state.put("drogue", ao_flight_drogue);
- string_to_state.put("main", ao_flight_main);
- string_to_state.put("landed", ao_flight_landed);
- string_to_state.put("invalid", ao_flight_invalid);
- map_initialized = true;
+ static Font label_font;
+ static Font value_font;
+ static Font status_font;
+ static Font table_label_font;
+ static Font table_value_font;
+
+ final static int font_size_small = 1;
+ final static int font_size_medium = 2;
+ final static int font_size_large = 3;
+
+ static void set_fonts(int size) {
+ int brief_size;
+ int table_size;
+ int status_size;
+
+ switch (size) {
+ case font_size_small:
+ brief_size = 16;
+ status_size = 18;
+ table_size = 11;
+ break;
+ default:
+ case font_size_medium:
+ brief_size = 22;
+ status_size = 24;
+ table_size = 14;
+ break;
+ case font_size_large:
+ brief_size = 26;
+ status_size = 30;
+ table_size = 17;
+ break;
+ }
+ label_font = new Font("Dialog", Font.PLAIN, brief_size);
+ value_font = new Font("Monospaced", Font.PLAIN, brief_size);
+ status_font = new Font("SansSerif", Font.BOLD, status_size);
+ table_label_font = new Font("SansSerif", Font.PLAIN, table_size);
+ table_value_font = new Font("Monospaced", Font.PLAIN, table_size);