summaryrefslogtreecommitdiff
path: root/altosui/AltosInfoTable.java
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2011-08-24 21:26:26 -0600
committerBdale Garbee <bdale@gag.com>2011-08-24 21:26:26 -0600
commit3d88e0493ab446d7c7011786390d30618a72d045 (patch)
treedcabf5ccfd09dc11a44844664b4d1a1ff8fef598 /altosui/AltosInfoTable.java
parent02d65453225a3807e61b2ac6e2a26da31a05bd45 (diff)
parent5a9972d41a87d4204c6c93cacf14e2962cc1c59c (diff)
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'altosui/AltosInfoTable.java')
-rw-r--r--altosui/AltosInfoTable.java12
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();
}