Internationalize InjectorTabImpl class

This commit is contained in:
Dale Schultz 2020-03-01 13:13:35 -05:00
parent e15934a78f
commit 710a75d54a
2 changed files with 14 additions and 5 deletions

View File

@ -0,0 +1,2 @@
PWMS = Pulse Width (ms)
FPCE = Fuel per Combustion Event (cc)

View File

@ -1,6 +1,6 @@
/* /*
* RomRaider Open-Source Tuning, Logging and Reflashing * RomRaider Open-Source Tuning, Logging and Reflashing
* Copyright (C) 2006-2012 RomRaider.com * Copyright (C) 2006-2020 RomRaider.com
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -25,6 +25,8 @@ import com.romraider.logger.ecu.definition.EcuSwitch;
import com.romraider.logger.ecu.definition.ExternalData; import com.romraider.logger.ecu.definition.ExternalData;
import com.romraider.logger.ecu.ui.DataRegistrationBroker; import com.romraider.logger.ecu.ui.DataRegistrationBroker;
import com.romraider.logger.ecu.ui.tab.LoggerChartPanel; import com.romraider.logger.ecu.ui.tab.LoggerChartPanel;
import com.romraider.util.ResourceUtil;
import static java.awt.BorderLayout.CENTER; import static java.awt.BorderLayout.CENTER;
import static java.awt.BorderLayout.WEST; import static java.awt.BorderLayout.WEST;
import static javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER; import static javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER;
@ -33,16 +35,22 @@ import javax.swing.JPanel;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.util.List; import java.util.List;
import java.util.ResourceBundle;
public final class InjectorTabImpl extends JPanel implements InjectorTab { public final class InjectorTabImpl extends JPanel implements InjectorTab {
private static final long serialVersionUID = 5365322624406058883L; private static final long serialVersionUID = 5365322624406058883L;
private final LoggerChartPanel chartPanel = new LoggerChartPanel("Pulse Width (ms)", "Fuel per Combustion Event (cc)"); private static final ResourceBundle rb = new ResourceUtil().getBundle(
InjectorTabImpl.class.getName());
private final LoggerChartPanel chartPanel = new LoggerChartPanel(
rb.getString("PWMS"), rb.getString("FPCE"));
private final InjectorControlPanel controlPanel; private final InjectorControlPanel controlPanel;
public InjectorTabImpl(DataRegistrationBroker broker, ECUEditor ecuEditor) { public InjectorTabImpl(DataRegistrationBroker broker, ECUEditor ecuEditor) {
super(new BorderLayout(2, 2)); super(new BorderLayout(2, 2));
controlPanel = new InjectorControlPanel(this, broker, ecuEditor, chartPanel); controlPanel = new InjectorControlPanel(this, broker, ecuEditor,
JScrollPane scrollPane = new JScrollPane(controlPanel, VERTICAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_NEVER); chartPanel);
JScrollPane scrollPane = new JScrollPane(controlPanel,
VERTICAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_NEVER);
add(scrollPane, WEST); add(scrollPane, WEST);
add(chartPanel, CENTER); add(chartPanel, CENTER);
} }
@ -110,5 +118,4 @@ public final class InjectorTabImpl extends JPanel implements InjectorTab {
public JPanel getPanel() { public JPanel getPanel() {
return this; return this;
} }
} }