reducing Formula confusion

This commit is contained in:
rusefi 2019-04-08 14:09:00 -04:00
parent acf1216ab0
commit dc44cbc5bc
2 changed files with 14 additions and 10 deletions

View File

@ -45,7 +45,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
* @see EngineSnifferPanel * @see EngineSnifferPanel
*/ */
public class Launcher { public class Launcher {
public static final int CONSOLE_VERSION = 20190407; public static final int CONSOLE_VERSION = 20190408;
public static final boolean SHOW_STIMULATOR = false; public static final boolean SHOW_STIMULATOR = false;
private static final String TAB_INDEX = "main_tab"; private static final String TAB_INDEX = "main_tab";
protected static final String PORT_KEY = "port"; protected static final String PORT_KEY = "port";

View File

@ -56,10 +56,10 @@ public class FormulasPane {
UiUtils.setPauseButtonText(pauseButton, isPaused); UiUtils.setPauseButtonText(pauseButton, isPaused);
} }
}); });
JPanel top = new JPanel(new FlowLayout()); JPanel topButtonsPanel = new JPanel(new FlowLayout());
top.add(saveImage); topButtonsPanel.add(saveImage);
top.add(pauseButton); topButtonsPanel.add(pauseButton);
content.add(top, BorderLayout.NORTH); content.add(topButtonsPanel, BorderLayout.NORTH);
JPanel bottomPanel = new JPanel(new FlowLayout()); JPanel bottomPanel = new JPanel(new FlowLayout());
bottomPanel.add(new IntGaugeLabel("count", Sensor.errorCodeCounter)); bottomPanel.add(new IntGaugeLabel("count", Sensor.errorCodeCounter));
@ -133,16 +133,20 @@ public class FormulasPane {
TeXFormula formula = new TeXFormula("\r\n" + TeXFormula formula = new TeXFormula("\r\n" +
algo.title + NL3 + page + ""); algo.title + NL3 + page + "");
TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20); TeXIcon formulasTeX = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, 20);
BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB); BufferedImage image = new BufferedImage(formulasTeX.getIconWidth(), formulasTeX.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = image.createGraphics(); Graphics2D g2 = image.createGraphics();
g2.setColor(Color.white); g2.setColor(Color.white);
g2.fillRect(0, 0, icon.getIconWidth(), icon.getIconHeight()); g2.fillRect(0, 0, formulasTeX.getIconWidth(), formulasTeX.getIconHeight());
JLabel label = new JLabel(icon); JLabel formulaLabel = new JLabel(formulasTeX);
centerProxy.removeAll(); centerProxy.removeAll();
centerProxy.add(label, BorderLayout.CENTER);
JLabel warning = new JLabel("These values are for reference only and do not always reflect ECU logic completely. During cranking different logic is applied.");
warning.setForeground(Color.red);
centerProxy.add(warning, BorderLayout.NORTH);
centerProxy.add(formulaLabel, BorderLayout.CENTER);
} }
@NotNull @NotNull