1,6 → 1,7 |
package dongfang.mkt.ui.offscreendisplay; |
|
import java.awt.BorderLayout; |
import java.awt.Font; |
import java.awt.GridLayout; |
import java.util.Formatter; |
import java.util.Locale; |
17,15 → 18,22 |
import dongfang.mkt.frames.OSDDataResponseFrame; |
|
public class VariousInfoPane extends JPanel implements OSDDataConsumer { |
|
static class BigLabel extends JLabel { |
public BigLabel() { |
super(); |
setFont(getFont().deriveFont(Font.BOLD, 16)); |
} |
} |
|
class PositionsPanel extends JPanel implements OSDDataConsumer { |
class CurrentPositionPanel extends JPanel { |
JLabel lat; |
JLabel lon; |
BigLabel lat; |
BigLabel lon; |
|
void init() { |
lat = new JLabel(); |
lon = new JLabel(); |
lat = new BigLabel(); |
lon = new BigLabel(); |
} |
|
int getNumRows() { |
47,11 → 55,11 |
} |
|
class HomePositionPanel extends CurrentPositionPanel { |
JLabel home; |
BigLabel home; |
|
void init() { |
super.init(); |
home = new JLabel(); |
home = new BigLabel(); |
} |
|
int getNumRows() { |
118,16 → 126,16 |
|
class HeightsPanel extends JPanel implements OSDDataConsumer { |
class HeightPanel extends JPanel implements OSDDataConsumer { |
JLabel baroHeight; |
JLabel GPSHeight; |
JLabel baroVVI; |
JLabel GPSVVI; |
BigLabel baroHeight; |
BigLabel GPSHeight; |
BigLabel baroVVI; |
BigLabel GPSVVI; |
|
void init() { |
baroHeight = new JLabel(); |
GPSHeight = new JLabel(); |
baroVVI = new JLabel(); |
GPSVVI = new JLabel(); |
baroHeight = new BigLabel(); |
GPSHeight = new BigLabel(); |
baroVVI = new BigLabel(); |
GPSVVI = new BigLabel(); |
} |
|
int getNumRows() { |
203,14 → 211,14 |
} |
|
class SpeedHeadingPanel extends JPanel implements OSDDataConsumer { |
JLabel noseDirection; |
JLabel flightDirection; |
JLabel speed; |
BigLabel noseDirection; |
BigLabel flightDirection; |
BigLabel speed; |
|
void init() { |
noseDirection = new JLabel(); |
flightDirection = new JLabel(); |
speed = new JLabel(); |
noseDirection = new BigLabel(); |
flightDirection = new BigLabel(); |
speed = new BigLabel(); |
Border b = BorderFactory.createTitledBorder( |
BorderFactory.createEtchedBorder(), "Speed and heading"); |
setBorder(b); |
253,6 → 261,7 |
class StatusPanel extends JPanel implements OSDDataConsumer { |
JProgressBar dataAgeProgress; |
JProgressBar battery; |
BigLabel numberOfSatellites; |
|
long dataTime = 0; |
|
259,6 → 268,7 |
void init() { |
dataAgeProgress = new JProgressBar(0, 5000); |
battery = new JProgressBar(100, 130); |
numberOfSatellites = new BigLabel(); |
|
//dataAgeProgress.setEnabled(false); |
Border b = BorderFactory.createTitledBorder( |
282,7 → 292,7 |
} |
|
int getNumRows() { |
return 2; |
return 3; |
} |
|
void layoutSubs() { |
290,6 → 300,8 |
add(dataAgeProgress); |
add(new JLabel("Battery")); |
add(battery); |
add(new JLabel("Satellites")); |
add(numberOfSatellites); |
} |
|
StatusPanel() { |
303,6 → 315,7 |
return; |
dataTime = System.currentTimeMillis(); |
battery.setValue(data.getBatteryVoltage()); |
numberOfSatellites.setText("" + data.getNumberOfSatellites()); |
} |
} |
|