power source first step
This commit is contained in:
parent
ab4d34d949
commit
e88890c05c
|
@ -92,6 +92,11 @@ public class PowerSourceForm {
|
|||
powerPanel.add(capacityLabel, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
|
||||
JLabel temperatureLabel = new JLabel();
|
||||
double powerUsageRate = powerSource.getPowerUsageRate();
|
||||
double amperage = powerSource.getAmperage();
|
||||
double voltage = powerSource.getVoltage();
|
||||
boolean charging = powerSource.isCharging();
|
||||
int cycleCount = powerSource.getCycleCount();
|
||||
temperatureLabel.setText(String.valueOf(String.format("Temperature: %.1f°C", powerSource.getTemperature())));
|
||||
powerPanel.add(temperatureLabel, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1637559962382" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9991" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M512 393.216 229.376 512 430.08 512 471.04 630.784 753.664 512 552.96 512Z" p-id="9992" fill="#bfbfbf"></path><path d="M913.408 430.08l0-81.92c0-45.056-36.864-81.92-81.92-81.92L151.552 266.24c-45.056 0-81.92 36.864-81.92 81.92l0 319.488c0 45.056 36.864 81.92 81.92 81.92l684.032 0c45.056 0 81.92-36.864 81.92-81.92l0-81.92c20.48 0 40.96-16.384 40.96-40.96l0-81.92C954.368 450.56 933.888 430.08 913.408 430.08zM872.448 471.04l0 81.92 0 118.784c0 20.48-16.384 40.96-40.96 40.96L151.552 712.704c-20.48 0-40.96-16.384-40.96-40.96L110.592 352.256c0-20.48 16.384-40.96 40.96-40.96l684.032 0c20.48 0 40.96 16.384 40.96 40.96L876.544 471.04z" p-id="9993" fill="#bfbfbf"></path></svg>
|
After Width: | Height: | Size: 1.0 KiB |
Loading…
Reference in New Issue