this whole icon business was a huge mistake
This commit is contained in:
parent
893f833489
commit
0029d7237e
|
@ -72,6 +72,10 @@ public class AutoupdateUtil {
|
||||||
if (imgURL != null) {
|
if (imgURL != null) {
|
||||||
return new ImageIcon(imgURL);
|
return new ImageIcon(imgURL);
|
||||||
} else {
|
} else {
|
||||||
|
imgURL = AutoupdateUtil.class.getResource("/com/rusefi/" + strPath);
|
||||||
|
if (imgURL != null) {
|
||||||
|
return new ImageIcon(imgURL);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@ package com.rusefi;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
public class rusEFIVersion {
|
public class rusEFIVersion {
|
||||||
public static final int CONSOLE_VERSION = 20200630;
|
public static final int CONSOLE_VERSION = 20200709;
|
||||||
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
public static AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
||||||
}
|
}
|
||||||
|
|
|
@ -272,7 +272,7 @@ public class StartupFrame {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Component createShowDeviceManagerButton() {
|
private Component createShowDeviceManagerButton() {
|
||||||
JButton showDeviceManager = new JButton(AutoupdateUtil.loadIcon("/com/rusefi/DeviceManager.png"));
|
JButton showDeviceManager = new JButton(AutoupdateUtil.loadIcon("DeviceManager.png"));
|
||||||
showDeviceManager.setMargin(new Insets(0, 0, 0, 0));
|
showDeviceManager.setMargin(new Insets(0, 0, 0, 0));
|
||||||
showDeviceManager.setToolTipText("Show Device Manager");
|
showDeviceManager.setToolTipText("Show Device Manager");
|
||||||
showDeviceManager.addActionListener(event -> {
|
showDeviceManager.addActionListener(event -> {
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class EraseChip {
|
||||||
private static final String FLASH_SIZE = "0x0100000";
|
private static final String FLASH_SIZE = "0x0100000";
|
||||||
private static final String ERASE_COMMAND_SUFFIX = " -c init -c targets -c \"halt\" -c \"flash erase_address 0x08000000 " + FLASH_SIZE + "\" -c shutdown";
|
private static final String ERASE_COMMAND_SUFFIX = " -c init -c targets -c \"halt\" -c \"flash erase_address 0x08000000 " + FLASH_SIZE + "\" -c shutdown";
|
||||||
|
|
||||||
private final JButton button = new JButton("ST-LINK Erase Chip", AutoupdateUtil.loadIcon("/com/rusefi/erase.png"));
|
private final JButton button = new JButton("ST-LINK Erase Chip", AutoupdateUtil.loadIcon("erase.png"));
|
||||||
private StatusWindow wnd = new StatusWindow();
|
private StatusWindow wnd = new StatusWindow();
|
||||||
|
|
||||||
public EraseChip() {
|
public EraseChip() {
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class ProgramSelector {
|
||||||
mode.setSelectedItem(persistedMode);
|
mode.setSelectedItem(persistedMode);
|
||||||
|
|
||||||
JButton updateFirmware = new JButton("Update Firmware",
|
JButton updateFirmware = new JButton("Update Firmware",
|
||||||
AutoupdateUtil.loadIcon("/com/rusefi/upload48.jpg"));
|
AutoupdateUtil.loadIcon("upload48.jpg"));
|
||||||
controls.add(updateFirmware);
|
controls.add(updateFirmware);
|
||||||
JButton updateHelp = new JButton("?");
|
JButton updateHelp = new JButton("?");
|
||||||
updateHelp.addActionListener(e -> URLLabel.open(HELP));
|
updateHelp.addActionListener(e -> URLLabel.open(HELP));
|
||||||
|
|
|
@ -55,28 +55,28 @@ public class RecentCommands {
|
||||||
private final static Map<String, Icon> COMMAND_ICONS = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
|
private final static Map<String, Icon> COMMAND_ICONS = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
COMMAND_ICONS.put(STOPENGINE, AutoupdateUtil.loadIcon("/stop.jpg"));
|
COMMAND_ICONS.put(STOPENGINE, AutoupdateUtil.loadIcon("stop.jpg"));
|
||||||
ImageIcon infoIcon = AutoupdateUtil.loadIcon("/info.png");
|
ImageIcon infoIcon = AutoupdateUtil.loadIcon("info.png");
|
||||||
COMMAND_ICONS.put(SHOWCONFIG, infoIcon);
|
COMMAND_ICONS.put(SHOWCONFIG, infoIcon);
|
||||||
COMMAND_ICONS.put(HELP, AutoupdateUtil.loadIcon("help.jpg"));
|
COMMAND_ICONS.put(HELP, AutoupdateUtil.loadIcon("help.jpg"));
|
||||||
COMMAND_ICONS.put(ANALOGINFO, infoIcon);
|
COMMAND_ICONS.put(ANALOGINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(CMD_TRIGGERINFO, AutoupdateUtil.loadIcon("/trigger.jpg"));
|
COMMAND_ICONS.put(CMD_TRIGGERINFO, AutoupdateUtil.loadIcon("trigger.jpg"));
|
||||||
COMMAND_ICONS.put(IDLEINFO, infoIcon);
|
COMMAND_ICONS.put(IDLEINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(ALTINFO, AutoupdateUtil.loadIcon("/alternator.jpg"));
|
COMMAND_ICONS.put(ALTINFO, AutoupdateUtil.loadIcon("alternator.jpg"));
|
||||||
COMMAND_ICONS.put(ACCELINFO, infoIcon);
|
COMMAND_ICONS.put(ACCELINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(TSINFO, infoIcon);
|
COMMAND_ICONS.put(TSINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(TPSINFO, infoIcon);
|
COMMAND_ICONS.put(TPSINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(MAPINFO, infoIcon);
|
COMMAND_ICONS.put(MAPINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(joystickINFO, AutoupdateUtil.loadIcon("/joystick.png"));
|
COMMAND_ICONS.put(joystickINFO, AutoupdateUtil.loadIcon("joystick.png"));
|
||||||
COMMAND_ICONS.put(CANINFO, infoIcon);
|
COMMAND_ICONS.put(CANINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(FUELINFO, infoIcon);
|
COMMAND_ICONS.put(FUELINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(TEMPINFO, infoIcon);
|
COMMAND_ICONS.put(TEMPINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(HIPINFO, AutoupdateUtil.loadIcon("/knock.jpg"));
|
COMMAND_ICONS.put(HIPINFO, AutoupdateUtil.loadIcon("knock.jpg"));
|
||||||
COMMAND_ICONS.put(SDINFO, AutoupdateUtil.loadIcon("/sdinfo.jpg"));
|
COMMAND_ICONS.put(SDINFO, AutoupdateUtil.loadIcon("sdinfo.jpg"));
|
||||||
COMMAND_ICONS.put(FSIOINFO, infoIcon);
|
COMMAND_ICONS.put(FSIOINFO, infoIcon);
|
||||||
COMMAND_ICONS.put(PINS, infoIcon);
|
COMMAND_ICONS.put(PINS, infoIcon);
|
||||||
COMMAND_ICONS.put(Fields.CMD_WRITECONFIG, AutoupdateUtil.loadIcon("/writeconfig.jpg"));
|
COMMAND_ICONS.put(Fields.CMD_WRITECONFIG, AutoupdateUtil.loadIcon("writeconfig.jpg"));
|
||||||
COMMAND_ICONS.put(SPEEDINFO, AutoupdateUtil.loadIcon("/speedinfo.jpg"));
|
COMMAND_ICONS.put(SPEEDINFO, AutoupdateUtil.loadIcon("speedinfo.jpg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final JPanel content = new JPanel(new GridLayout(NUMBER_OF_COMMANDS + 1, 1));
|
private final JPanel content = new JPanel(new GridLayout(NUMBER_OF_COMMANDS + 1, 1));
|
||||||
|
@ -170,7 +170,7 @@ public class RecentCommands {
|
||||||
if (uiContext.getLinkManager().isLogViewer())
|
if (uiContext.getLinkManager().isLogViewer())
|
||||||
content.add(createButton(uiContext));
|
content.add(createButton(uiContext));
|
||||||
|
|
||||||
JButton reset = new JButton(AutoupdateUtil.loadIcon("/undo.jpg"));
|
JButton reset = new JButton(AutoupdateUtil.loadIcon("undo.jpg"));
|
||||||
reset.setContentAreaFilled(false);
|
reset.setContentAreaFilled(false);
|
||||||
reset.setFocusPainted(false);
|
reset.setFocusPainted(false);
|
||||||
reset.setBorder(BorderFactory.createEmptyBorder());
|
reset.setBorder(BorderFactory.createEmptyBorder());
|
||||||
|
|
Loading…
Reference in New Issue