diff options
| author | Bdale Garbee <bdale@gag.com> | 2011-08-24 21:26:26 -0600 |
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2011-08-24 21:26:26 -0600 |
| commit | 3d88e0493ab446d7c7011786390d30618a72d045 (patch) | |
| tree | dcabf5ccfd09dc11a44844664b4d1a1ff8fef598 /altosui/AltosCompanionInfo.java | |
| parent | 02d65453225a3807e61b2ac6e2a26da31a05bd45 (diff) | |
| parent | 5a9972d41a87d4204c6c93cacf14e2962cc1c59c (diff) | |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'altosui/AltosCompanionInfo.java')
| -rw-r--r-- | altosui/AltosCompanionInfo.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/altosui/AltosCompanionInfo.java b/altosui/AltosCompanionInfo.java index f287a8ea..82bde623 100644 --- a/altosui/AltosCompanionInfo.java +++ b/altosui/AltosCompanionInfo.java @@ -31,25 +31,26 @@ import java.util.concurrent.LinkedBlockingQueue; public class AltosCompanionInfo extends JTable { private AltosFlightInfoTableModel model; - private Font infoLabelFont = new Font("SansSerif", Font.PLAIN, 14); - private Font infoValueFont = new Font("Monospaced", Font.PLAIN, 14); - static final int info_columns = 2; static final int info_rows = 17; int desired_row_height() { - FontMetrics infoValueMetrics = getFontMetrics(infoValueFont); + FontMetrics infoValueMetrics = getFontMetrics(Altos.table_value_font); return (infoValueMetrics.getHeight() + infoValueMetrics.getLeading()) * 18 / 10; } + public void set_font() { + setFont(Altos.table_value_font); + setRowHeight(desired_row_height()); + doLayout(); + } + public AltosCompanionInfo() { super(new AltosFlightInfoTableModel(info_rows, info_columns)); model = (AltosFlightInfoTableModel) getModel(); - setFont(infoValueFont); setAutoResizeMode(AUTO_RESIZE_ALL_COLUMNS); setShowGrid(true); - setRowHeight(desired_row_height()); - doLayout(); + set_font(); } public Dimension getPreferredScrollableViewportSize() { |
