updated ramtune test app

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@655 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
kascade 2007-04-20 11:21:09 +00:00
parent e9b7798044
commit 3e3ec96e9c
2 changed files with 26 additions and 8 deletions

View File

@ -11,6 +11,7 @@ import enginuity.ramtune.test.command.generator.CommandGenerator;
import enginuity.ramtune.test.command.generator.EcuInitCommandGenerator;
import enginuity.ramtune.test.command.generator.ReadCommandGenerator;
import enginuity.ramtune.test.command.generator.WriteCommandGenerator;
import enginuity.swing.LookAndFeelManager;
import static enginuity.util.HexUtil.asBytes;
import static enginuity.util.HexUtil.asHex;
import static enginuity.util.ThreadUtil.runAsDaemon;
@ -156,7 +157,7 @@ public final class RamTuneTestApp extends JFrame implements WindowListener {
JPanel addressPanel = new JPanel(new FlowLayout());
addressPanel.add(new JLabel("Address (eg. 020000):"));
addressPanel.add(addressField);
addressPanel.add(new JLabel("Length:"));
addressPanel.add(new JLabel("Read Length:"));
lengthField.setText("1");
addressPanel.add(lengthField);
constraints.gridx = 3;
@ -375,12 +376,16 @@ public final class RamTuneTestApp extends JFrame implements WindowListener {
//**********************************************************************
public static void main(String[] args) {
//LookAndFeelManager.initLookAndFeel();
LookAndFeelManager.initLookAndFeel();
startTestApp(EXIT_ON_CLOSE);
}
public static void startTestApp(final int defaultCloseOperation) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
RamTuneTestApp ramTuneTestApp = new RamTuneTestApp("RAMTune - Test App");
ramTuneTestApp.setIconImage(new ImageIcon("./graphics/enginuity-ico.gif").getImage());
ramTuneTestApp.setDefaultCloseOperation(EXIT_ON_CLOSE);
ramTuneTestApp.setDefaultCloseOperation(defaultCloseOperation);
ramTuneTestApp.addWindowListener(ramTuneTestApp);
ramTuneTestApp.setLocation(100, 50);
ramTuneTestApp.pack();

View File

@ -26,6 +26,7 @@ import enginuity.ECUEditor;
import enginuity.logger.ecu.EcuLogger;
import enginuity.logger.utec.gui.JutecGUI;
import enginuity.maps.Rom;
import enginuity.ramtune.test.RamTuneTestApp;
import javax.swing.ButtonGroup;
import javax.swing.JFileChooser;
@ -77,6 +78,8 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
private JMenuItem openLogger = new JMenuItem("Launch ECU Logger...");
private JMenuItem utecLogger = new JMenuItem("Launch UTEC Logger...");
private JMenu ramTuneMenu = new JMenu("RAMTune");
private JMenuItem launchRamTuneTestApp = new JMenuItem("Launch Test App...");
private JMenu helpMenu = new JMenu("Help");
private JMenuItem about = new JMenuItem("About Enginuity");
@ -180,6 +183,13 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
openLogger.addActionListener(this);
utecLogger.addActionListener(this);
// ramtune menu stuff
add(ramTuneMenu);
ramTuneMenu.setMnemonic('R');
launchRamTuneTestApp.setMnemonic('L');
ramTuneMenu.add(launchRamTuneTestApp);
launchRamTuneTestApp.addActionListener(this);
// help menu stuff
add(helpMenu);
helpMenu.setMnemonic('H');
@ -287,6 +297,9 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
} else if (e.getSource() == updateDefinition) {
BareBonesBrowserLaunch.openURL(parent.getSettings().getEcuDefsURL());
} else if (e.getSource() == launchRamTuneTestApp) {
RamTuneTestApp.startTestApp(DISPOSE_ON_CLOSE);
}
}