From: Keith Packard Date: Sat, 3 Apr 2010 06:25:02 +0000 (-0700) Subject: Remove unused cell renderer class X-Git-Tag: debian/0.6+163+g01e524f~18 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=4bea4c327e002ce8f88218f0d840af7c1521bc35 Remove unused cell renderer class --- diff --git a/ao-tools/altosui/AltosUI.java b/ao-tools/altosui/AltosUI.java index 91278afe..8880618b 100644 --- a/ao-tools/altosui/AltosUI.java +++ b/ao-tools/altosui/AltosUI.java @@ -70,26 +70,6 @@ class AltosFlightStatusTableModel extends AbstractTableModel { } } -class AltosFlightStatusCellRenderer extends DefaultTableCellRenderer { - - static Font statusFont = new Font("SansSerif", Font.BOLD, 24); - - @Override public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, - boolean hasFocus, int row, int column) - { - Component cell = super.getTableCellRendererComponent - (table, value, isSelected, hasFocus, row, column); - System.out.println("Selecting new font for cell " + row + " " + column + " " + statusFont); - cell.setFont(statusFont); - return cell; - } - - public AltosFlightStatusCellRenderer () { - super(); - System.out.println("Made a status cell renderer\n"); - } -} - class AltosFlightInfoTableModel extends AbstractTableModel { private String[] columnNames = {"Field", "Value"}; @@ -437,8 +417,11 @@ public class AltosUI extends JFrame { filename = name; } + /* Run the replay in a separate thread + * so that the UI can update + */ public void run() { - String line; + String line; AltosState state = null; try { while ((line = readline(replay)) != null) { @@ -446,6 +429,8 @@ public class AltosUI extends JFrame { AltosTelemetry t = new AltosTelemetry(line); state = new AltosState(t, state); show(state); + + /* Make it run in realtime after the rocket leaves the pad */ try { if (state.state > AltosTelemetry.ao_flight_pad) Thread.sleep((int) (state.time_change * 1000));