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/AltosInfoTable.java | |
| parent | 02d65453225a3807e61b2ac6e2a26da31a05bd45 (diff) | |
| parent | 5a9972d41a87d4204c6c93cacf14e2962cc1c59c (diff) | |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'altosui/AltosInfoTable.java')
| -rw-r--r-- | altosui/AltosInfoTable.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/altosui/AltosInfoTable.java b/altosui/AltosInfoTable.java index 8ebeaba1..c023369e 100644 --- a/altosui/AltosInfoTable.java +++ b/altosui/AltosInfoTable.java @@ -31,27 +31,29 @@ import java.util.concurrent.LinkedBlockingQueue; public class AltosInfoTable 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 = 3; 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 AltosInfoTable() { super(new AltosFlightInfoTableModel(info_rows, info_columns)); model = (AltosFlightInfoTableModel) getModel(); - setFont(infoValueFont); + setFont(Altos.table_value_font); setAutoResizeMode(AUTO_RESIZE_ALL_COLUMNS); setShowGrid(true); setRowHeight(desired_row_height()); doLayout(); } + public void set_font() { + setFont(Altos.table_value_font); + doLayout(); + } + public Dimension getPreferredScrollableViewportSize() { return getPreferredSize(); } |
