mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-26 15:59:24 +01:00
Added Fuel Gauge Icon - work in progress II
This commit is contained in:
parent
6f187222f8
commit
351e0a079f
@ -23,12 +23,12 @@ public class FuelGaugeIcon extends ImageIcon {
|
|||||||
|
|
||||||
private FuelGaugeIcon(boolean reserve) {
|
private FuelGaugeIcon(boolean reserve) {
|
||||||
this.reserve = reserve;
|
this.reserve = reserve;
|
||||||
java.net.URL smileyUrl = getClass()
|
java.net.URL iconUrl = getClass()
|
||||||
.getResource("/fuel_gauge/fuel_gauge_icon_" + (reserve
|
.getResource("/fuel_gauge/fuel_gauge_icon_" + (reserve
|
||||||
? "orange" : "white") + ".gif");
|
? "orange" : "white") + ".gif");
|
||||||
ImageIcon tmpIcon = new ImageIcon(smileyUrl);
|
ImageIcon tmpIcon = new ImageIcon(iconUrl);
|
||||||
this.icon = new ImageIcon(tmpIcon.getImage()
|
this.icon = new ImageIcon(tmpIcon.getImage()
|
||||||
.getScaledInstance(32, 132, Image.SCALE_SMOOTH));
|
.getScaledInstance(32, 32, Image.SCALE_SMOOTH));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FuelGaugeIcon getInstance(boolean reserve) {
|
public static FuelGaugeIcon getInstance(boolean reserve) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user