update enginuity to romraider

git-svn-id: https://svn2.assembla.com/svn/romraider/trunk@34 38686702-15cf-42e4-a595-3071df8bf5ea
This commit is contained in:
kascade 2008-04-13 08:36:31 +00:00
parent af89c1087b
commit c8e40abb83
10 changed files with 497 additions and 509 deletions

View File

@ -41,7 +41,6 @@ import enginuity.xml.DOMRomUnmarshaller;
import enginuity.xml.RomNotFoundException;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import javax.swing.ImageIcon;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
@ -77,8 +76,7 @@ public class ECUEditor extends JFrame implements WindowListener, PropertyChangeL
private final SettingsManager settingsManager = new SettingsManagerImpl();
private RomTreeRootNode imageRoot = new RomTreeRootNode("Open Images");
private RomTree imageList = new RomTree(imageRoot);
private String versionDate = "2/8/2007";
private String titleText = "Enginuity v" + VERSION;
private String titleText = "RomRaider v" + VERSION;
public MDIDesktopPane rightPanel = new MDIDesktopPane();
private JProgressPane statusPanel = new JProgressPane();
private JSplitPane splitPane = new JSplitPane();
@ -156,7 +154,7 @@ public class ECUEditor extends JFrame implements WindowListener, PropertyChangeL
releaseNotes.setText(sb.toString());
JOptionPane.showMessageDialog(this, scroller,
"Enginuity " + VERSION + " Release Notes", JOptionPane.INFORMATION_MESSAGE);
"RomRaider " + VERSION + " Release Notes", JOptionPane.INFORMATION_MESSAGE);
} finally {
br.close();
}

View File

@ -11,7 +11,6 @@ import enginuity.NewGUI.tree.ETreeNode;
import enginuity.logger.utec.impl.UtecTuningEntityImpl;
import enginuity.swing.LookAndFeelManager;
import org.apache.log4j.Logger;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.JMenu;
@ -28,333 +27,329 @@ import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.Iterator;
import java.util.Vector;
public class NewGUI extends JFrame implements WindowListener, ActionListener,
TreeSelectionListener, TuningEntityListener {
private static final Logger LOGGER = Logger.getLogger(NewGUI.class);
private final String engninuityVersionTitle = "Enginuity v0.5.0 alpha 1";
TreeSelectionListener, TuningEntityListener {
private static final Logger LOGGER = Logger.getLogger(NewGUI.class);
private final String engninuityVersionTitle = "RomRaider v0.5.0 alpha 1";
private JPanel mainJPanel = new JPanel();
private JPanel mainJPanel = new JPanel();
private JMenuBar jMenuBar = new JMenuBar();
private JMenu tuningEntitiesJMenu = new JMenu("Tuning Entities");
private JMenuBar jMenuBar = new JMenuBar();
private JMenu tuningEntitiesJMenu = new JMenu("Tuning Entities");
private JSplitPane splitPane = new JSplitPane();
private EDesktopPane rightDesktopPane = new EDesktopPane();
private JSplitPane splitPane = new JSplitPane();
private EDesktopPane rightDesktopPane = new EDesktopPane();
private ETreeNode rootNode = new ETreeNode("Enginuity", new TableMetaData(
TableMetaData.RESERVED_ROOT, 0.0, 0.0, new Object[0], null, null,
false, "", "", "", "", "", null));
private ETree leftJTree = new ETree(rootNode);
private ETreeNode rootNode = new ETreeNode("RomRaider", new TableMetaData(
TableMetaData.RESERVED_ROOT, 0.0, 0.0, new Object[0], null, null,
false, "", "", "", "", "", null));
private ETree leftJTree = new ETree(rootNode);
private boolean newTree = true;
private boolean newTree = true;
private NewGUI() {
// Define which tuning entities are available
initData();
private NewGUI() {
// Define which tuning entities are available
initData();
// Initialize the GUI elements
initGui();
}
// Initialize the GUI elements
initGui();
}
public static NewGUI getInstance() {
if (ApplicationStateManager.getEnginuityInstance() == null) {
ApplicationStateManager.setEnginuityInstance(new NewGUI());
}
public static NewGUI getInstance() {
if (ApplicationStateManager.getEnginuityInstance() == null) {
ApplicationStateManager.setEnginuityInstance(new NewGUI());
}
return ApplicationStateManager.getEnginuityInstance();
}
return ApplicationStateManager.getEnginuityInstance();
}
private void initData() {
// Add supported tuning entities
// As new tuning entities are developed, add them here
UtecTuningEntityImpl utei = new UtecTuningEntityImpl();
private void initData() {
// Add supported tuning entities
// As new tuning entities are developed, add them here
UtecTuningEntityImpl utei = new UtecTuningEntityImpl();
ApplicationStateManager.addTuningEntity(utei);
}
ApplicationStateManager.addTuningEntity(utei);
}
private void initGui() {
LOGGER.info("Initializing GUI.");
private void initGui() {
LOGGER.info("Initializing GUI.");
// Set the frame icon
Image img = Toolkit.getDefaultToolkit().getImage(
"graphics/enginuity-ico.gif");
setIconImage(img);
// Set the frame icon
Image img = Toolkit.getDefaultToolkit().getImage(
"graphics/enginuity-ico.gif");
setIconImage(img);
// Set frame title
this.setTitle(this.engninuityVersionTitle);
// Set frame title
this.setTitle(this.engninuityVersionTitle);
// Set main JFrame size
this.setSize(800, 600);
// Set main JFrame size
this.setSize(800, 600);
// Setup the look and feel
LookAndFeelManager.initLookAndFeel();
// Setup the look and feel
LookAndFeelManager.initLookAndFeel();
// This class implements its own windows closing methods. Duh!!! ;-)
this.addWindowListener(this);
// This class implements its own windows closing methods. Duh!!! ;-)
this.addWindowListener(this);
// Setup JMenu
Iterator tuningEntities = ApplicationStateManager.getTuningEntities()
.iterator();
while (tuningEntities.hasNext()) {
TuningEntity theTuningEntity = (TuningEntity) tuningEntities.next();
JMenuItem tempItem = new JMenuItem(theTuningEntity.getName());
tempItem.addActionListener(this);
tuningEntitiesJMenu.add(tempItem);
}
this.jMenuBar.add(this.tuningEntitiesJMenu);
this.jMenuBar.setBackground(new Color(236, 233, 216));
this.setLayout(new BorderLayout());
this.setJMenuBar(this.jMenuBar);
// Setup desktop pane
rightDesktopPane.setBackground(Color.BLACK);
// Setup split pane
splitPane.setDividerLocation(200);
splitPane.setLeftComponent(leftJTree);
splitPane.setRightComponent(rightDesktopPane);
splitPane.setDividerSize(5);
// Setup main JPanel
mainJPanel.setLayout(new BorderLayout());
mainJPanel.add(splitPane, BorderLayout.CENTER);
// Add everything to JFrame
this.add(mainJPanel, BorderLayout.CENTER);
}
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equalsIgnoreCase("UTEC Tuning Entity")) {
String theCommand = e.getActionCommand();
ApplicationStateManager.setCurrentTuningEntity(theCommand, this);
}
}
public void rebuildJMenuBar(Vector<JMenu> items) {
Iterator iterator = items.iterator();
this.jMenuBar.removeAll();
while (iterator.hasNext()) {
JMenu tempMenu = (JMenu) iterator.next();
jMenuBar.add(tempMenu);
}
jMenuBar.add(this.tuningEntitiesJMenu);
this.jMenuBar.revalidate();
}
public void valueChanged(TreeSelectionEvent arg0) {
LOGGER.debug("Tree Node selected.");
}
public void addTuningGroupNameToTitle(String titleAppend) {
this.setTitle(this.engninuityVersionTitle + ": " + titleAppend);
}
/**
* Tuning group is a collection of maps and parameters, ala a ROM or a UTEC
* Map file
*
*/
public void addNewTuningGroup(ETreeNode newTreeModel) {
LOGGER.debug("test: " + this.newTree);
int childCount = this.rootNode.getChildCount();
String newTuningGroup = newTreeModel.getTableMetaData().getTableGroup();
LOGGER.debug("Children:" + childCount + " :" + newTuningGroup);
for (int i = 0; i < childCount; i++) {
ETreeNode tempNode = (ETreeNode) this.rootNode.getChildAt(i);
if (tempNode.getTableMetaData().getTableGroup().equals(
newTuningGroup)) {
LOGGER.error("Can't open same ROM / Map file 2x");
return;
}
}
if (this.newTree == true) {
this.newTree = false;
this.rootNode.removeAllChildren();
}
this.rootNode.add(newTreeModel);
this.leftJTree.updateUI();
this.splitPane.repaint();
}
/**
* Removes a tuning group from the GUI
*
*/
public void removeTuningGroup(String tableGroup) {
int childCount = this.rootNode.getChildCount();
for (int i = 0; i < childCount; i++) {
ETreeNode tempNode = (ETreeNode) this.rootNode.getChildAt(i);
if (tempNode.getTableMetaData().getTableGroup().equals(tableGroup)) {
ApplicationStateManager
.setSelectedTuningGroup("No Tuning Group Selected.");
this.addTuningGroupNameToTitle("");
this.rootNode.remove(i);
this.leftJTree.updateUI();
this.splitPane.repaint();
// Clean up
this.rightDesktopPane.removeInternalFrames(tableGroup);
// Clean up on tuning entity sides
Iterator tuningEntites = ApplicationStateManager
.getTuningEntities().iterator();
while (tuningEntites.hasNext()) {
TuningEntity theTuningEntity = (TuningEntity) tuningEntites
.next();
theTuningEntity.removeTuningGroup(tableGroup);
}
return;
}
}
}
public void displayInternalFrameTable(Object[][] data, TableMetaData tableMetaData) {
this.rightDesktopPane.add(data, tableMetaData);
}
public void removeInternalFrame(EInternalFrame frame) {
this.rightDesktopPane.remove(frame);
}
public void setNewToolBar(JToolBar theToolBar) {
// Ensure proper color
theToolBar.setBackground(new Color(236, 233, 216));
this.add(theToolBar, BorderLayout.NORTH);
}
/*
* Helper method that returns the number of maps that have had their data changed.
* (non-Javadoc)
* @see enginuity.NewGUI.interfaces.TuningEntityListener#getMapChangeCount(enginuity.NewGUI.interfaces.TuningEntity, java.lang.String)
*/
public int getMapChangeCount(TuningEntity tuningEntity, String tableGroup) {
JInternalFrame[] allFrames = this.rightDesktopPane.getAllFrames();
int number = 0;
for (int i = 0; i < allFrames.length; i++) {
EInternalFrame eInternalFrame = (EInternalFrame) allFrames[i];
if (eInternalFrame.getTableMetaData().getTableGroup().equals(
tableGroup)) {
if (eInternalFrame.dataChanged()) {
number++;
}
}
}
return number;
}
/*
* Method walks through all opened JInternalFrames in right pane. If an InternFrame claims its
* data has been changed, the tuning entity parent is notified.
* (non-Javadoc)
* @see enginuity.NewGUI.interfaces.TuningEntityListener#saveMaps()
*/
public void saveMaps() {
JInternalFrame[] allFrames = this.rightDesktopPane.getAllFrames();
String tableGroup = ApplicationStateManager.getSelectedTuningGroup();
for (int i = 0; i < allFrames.length; i++) {
EInternalFrame eInternalFrame = (EInternalFrame) allFrames[i];
if (eInternalFrame.getTableMetaData().getTableGroup().equals(
tableGroup)) {
if (eInternalFrame.dataChanged()) {
eInternalFrame.saveDataToParentTuningEntity();
}
}
}
}
/**
* Getter that returns the title of Enginuity
* @return
*/
public String getEngninuityTitle() {
return engninuityVersionTitle;
}
/*
* Tuning entity in scope will call this when it is ready to exit. Some entities might need to cleanup connections or save files.
* (non-Javadoc)
* @see enginuity.NewGUI.interfaces.TuningEntityListener#readyForExit()
*/
public void readyForExit() {
LOGGER.info("Enginuity is now exiting as per tuning entity notification: "+ApplicationStateManager.getCurrentTuningEntity().getName());
System.exit(0);
}
// **************************************************************
// Methods pertaining to the WindowListener this class implements
// **************************************************************
public void windowActivated(WindowEvent e) {
LOGGER.info("Window Activated.");
}
public void windowClosed(WindowEvent e) {
LOGGER.info("Window Closed.");
}
public void windowClosing(WindowEvent e) {
LOGGER.info("Preparing Enginuity for exit.");
TuningEntity currentTuningEntity = ApplicationStateManager
.getCurrentTuningEntity();
if (currentTuningEntity == null) {
LOGGER.debug("No Tuning Entity ever selected.");
LOGGER.info("Enginuity exiting immediately.");
System.exit(0);
} else {
LOGGER.debug("Notify current tuning entity of pending exit.");
currentTuningEntity.notifySystemExit();
}
}
public void windowDeactivated(WindowEvent e) {
// TODO Auto-generated method stub
LOGGER.info("Window Deactivated.");
}
public void windowDeiconified(WindowEvent e) {
// TODO Auto-generated method stub
LOGGER.info("Window Deiconified.");
}
public void windowIconified(WindowEvent e) {
// TODO Auto-generated method stub
LOGGER.info("Window Iconified.");
}
public void windowOpened(WindowEvent e) {
// TODO Auto-generated method stub
LOGGER.info("Window Opened.");
// Setup JMenu
Iterator tuningEntities = ApplicationStateManager.getTuningEntities()
.iterator();
while (tuningEntities.hasNext()) {
TuningEntity theTuningEntity = (TuningEntity) tuningEntities.next();
JMenuItem tempItem = new JMenuItem(theTuningEntity.getName());
tempItem.addActionListener(this);
tuningEntitiesJMenu.add(tempItem);
}
this.jMenuBar.add(this.tuningEntitiesJMenu);
this.jMenuBar.setBackground(new Color(236, 233, 216));
this.setLayout(new BorderLayout());
this.setJMenuBar(this.jMenuBar);
// Setup desktop pane
rightDesktopPane.setBackground(Color.BLACK);
// Setup split pane
splitPane.setDividerLocation(200);
splitPane.setLeftComponent(leftJTree);
splitPane.setRightComponent(rightDesktopPane);
splitPane.setDividerSize(5);
// Setup main JPanel
mainJPanel.setLayout(new BorderLayout());
mainJPanel.add(splitPane, BorderLayout.CENTER);
// Add everything to JFrame
this.add(mainJPanel, BorderLayout.CENTER);
}
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equalsIgnoreCase("UTEC Tuning Entity")) {
String theCommand = e.getActionCommand();
ApplicationStateManager.setCurrentTuningEntity(theCommand, this);
}
}
public void rebuildJMenuBar(Vector<JMenu> items) {
Iterator iterator = items.iterator();
this.jMenuBar.removeAll();
while (iterator.hasNext()) {
JMenu tempMenu = (JMenu) iterator.next();
jMenuBar.add(tempMenu);
}
jMenuBar.add(this.tuningEntitiesJMenu);
this.jMenuBar.revalidate();
}
public void valueChanged(TreeSelectionEvent arg0) {
LOGGER.debug("Tree Node selected.");
}
public void addTuningGroupNameToTitle(String titleAppend) {
this.setTitle(this.engninuityVersionTitle + ": " + titleAppend);
}
/**
* Tuning group is a collection of maps and parameters, ala a ROM or a UTEC
* Map file
*/
public void addNewTuningGroup(ETreeNode newTreeModel) {
LOGGER.debug("test: " + this.newTree);
int childCount = this.rootNode.getChildCount();
String newTuningGroup = newTreeModel.getTableMetaData().getTableGroup();
LOGGER.debug("Children:" + childCount + " :" + newTuningGroup);
for (int i = 0; i < childCount; i++) {
ETreeNode tempNode = (ETreeNode) this.rootNode.getChildAt(i);
if (tempNode.getTableMetaData().getTableGroup().equals(
newTuningGroup)) {
LOGGER.error("Can't open same ROM / Map file 2x");
return;
}
}
if (this.newTree == true) {
this.newTree = false;
this.rootNode.removeAllChildren();
}
this.rootNode.add(newTreeModel);
this.leftJTree.updateUI();
this.splitPane.repaint();
}
/**
* Removes a tuning group from the GUI
*/
public void removeTuningGroup(String tableGroup) {
int childCount = this.rootNode.getChildCount();
for (int i = 0; i < childCount; i++) {
ETreeNode tempNode = (ETreeNode) this.rootNode.getChildAt(i);
if (tempNode.getTableMetaData().getTableGroup().equals(tableGroup)) {
ApplicationStateManager
.setSelectedTuningGroup("No Tuning Group Selected.");
this.addTuningGroupNameToTitle("");
this.rootNode.remove(i);
this.leftJTree.updateUI();
this.splitPane.repaint();
// Clean up
this.rightDesktopPane.removeInternalFrames(tableGroup);
// Clean up on tuning entity sides
Iterator tuningEntites = ApplicationStateManager
.getTuningEntities().iterator();
while (tuningEntites.hasNext()) {
TuningEntity theTuningEntity = (TuningEntity) tuningEntites
.next();
theTuningEntity.removeTuningGroup(tableGroup);
}
return;
}
}
}
public void displayInternalFrameTable(Object[][] data, TableMetaData tableMetaData) {
this.rightDesktopPane.add(data, tableMetaData);
}
public void removeInternalFrame(EInternalFrame frame) {
this.rightDesktopPane.remove(frame);
}
public void setNewToolBar(JToolBar theToolBar) {
// Ensure proper color
theToolBar.setBackground(new Color(236, 233, 216));
this.add(theToolBar, BorderLayout.NORTH);
}
/*
* Helper method that returns the number of maps that have had their data changed.
* (non-Javadoc)
* @see enginuity.NewGUI.interfaces.TuningEntityListener#getMapChangeCount(enginuity.NewGUI.interfaces.TuningEntity, java.lang.String)
*/
public int getMapChangeCount(TuningEntity tuningEntity, String tableGroup) {
JInternalFrame[] allFrames = this.rightDesktopPane.getAllFrames();
int number = 0;
for (int i = 0; i < allFrames.length; i++) {
EInternalFrame eInternalFrame = (EInternalFrame) allFrames[i];
if (eInternalFrame.getTableMetaData().getTableGroup().equals(
tableGroup)) {
if (eInternalFrame.dataChanged()) {
number++;
}
}
}
return number;
}
/*
* Method walks through all opened JInternalFrames in right pane. If an InternFrame claims its
* data has been changed, the tuning entity parent is notified.
* (non-Javadoc)
* @see enginuity.NewGUI.interfaces.TuningEntityListener#saveMaps()
*/
public void saveMaps() {
JInternalFrame[] allFrames = this.rightDesktopPane.getAllFrames();
String tableGroup = ApplicationStateManager.getSelectedTuningGroup();
for (int i = 0; i < allFrames.length; i++) {
EInternalFrame eInternalFrame = (EInternalFrame) allFrames[i];
if (eInternalFrame.getTableMetaData().getTableGroup().equals(
tableGroup)) {
if (eInternalFrame.dataChanged()) {
eInternalFrame.saveDataToParentTuningEntity();
}
}
}
}
/**
* Getter that returns the title of Enginuity
*
* @return
*/
public String getEngninuityTitle() {
return engninuityVersionTitle;
}
/*
* Tuning entity in scope will call this when it is ready to exit. Some entities might need to cleanup connections or save files.
* (non-Javadoc)
* @see enginuity.NewGUI.interfaces.TuningEntityListener#readyForExit()
*/
public void readyForExit() {
LOGGER.info("RomRaider is now exiting as per tuning entity notification: " + ApplicationStateManager.getCurrentTuningEntity().getName());
System.exit(0);
}
// **************************************************************
// Methods pertaining to the WindowListener this class implements
// **************************************************************
public void windowActivated(WindowEvent e) {
LOGGER.info("Window Activated.");
}
public void windowClosed(WindowEvent e) {
LOGGER.info("Window Closed.");
}
public void windowClosing(WindowEvent e) {
LOGGER.info("Preparing RomRaider for exit.");
TuningEntity currentTuningEntity = ApplicationStateManager
.getCurrentTuningEntity();
if (currentTuningEntity == null) {
LOGGER.debug("No Tuning Entity ever selected.");
LOGGER.info("RomRaider exiting immediately.");
System.exit(0);
} else {
LOGGER.debug("Notify current tuning entity of pending exit.");
currentTuningEntity.notifySystemExit();
}
}
public void windowDeactivated(WindowEvent e) {
// TODO Auto-generated method stub
LOGGER.info("Window Deactivated.");
}
public void windowDeiconified(WindowEvent e) {
// TODO Auto-generated method stub
LOGGER.info("Window Deiconified.");
}
public void windowIconified(WindowEvent e) {
// TODO Auto-generated method stub
LOGGER.info("Window Iconified.");
}
public void windowOpened(WindowEvent e) {
// TODO Auto-generated method stub
LOGGER.info("Window Opened.");
}
}

View File

@ -24,7 +24,6 @@ package enginuity;
import enginuity.io.connection.ConnectionProperties;
import enginuity.logger.ecu.definition.EcuDefinition;
import static enginuity.util.ParamChecker.checkNotNullOrEmpty;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
@ -42,8 +41,8 @@ public class Settings implements Serializable {
private boolean windowMaximized = false;
private String romRevisionURL = "http://www.scoobypedia.co.uk/index.php/Knowledge/ECUVersionCompatibilityList";
private String ecuDefsURL = "http://www.enginuity.org/viewtopic.php?t=360";
private String supportURL = "http://www.enginuity.org";
private String ecuDefsURL = "http://www.romraider.com/forum/forum8.html";
private String supportURL = "http://www.romraider.com";
private String releaseNotes = "release notes.txt";
private String recentVersion = "x";

View File

@ -149,7 +149,7 @@ TODO: Add log analysis tab (or maybe new window?), including log playback, custo
public final class EcuLogger extends JFrame implements WindowListener, PropertyChangeListener, MessageListener {
private static final Logger LOGGER = Logger.getLogger(EcuLogger.class);
private static final String ENGINUITY_ECU_LOGGER_TITLE = "Enginuity ECU Logger";
private static final String ENGINUITY_ECU_LOGGER_TITLE = "RomRaider ECU Logger";
private static final String HEADING_PARAMETERS = "Parameters";
private static final String HEADING_SWITCHES = "Switches";
private static final String HEADING_EXTERNAL = "External";

View File

@ -25,7 +25,6 @@ import enginuity.Settings;
import enginuity.logger.ecu.exception.FileLoggerException;
import enginuity.logger.ecu.ui.MessageListener;
import static enginuity.util.ParamChecker.checkNotNull;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
@ -123,7 +122,7 @@ public final class FileLoggerImpl implements FileLogger {
if (!logDir.endsWith(File.separator)) {
logDir += File.separator;
}
logDir += "enginuitylog_" + dateFormat.format(new Date()) + ".csv";
logDir += "romraiderlog_" + dateFormat.format(new Date()) + ".csv";
return logDir;
}

View File

@ -1,7 +1,6 @@
package enginuity.logger.ecu.ui.swing.menubar.action;
import enginuity.logger.ecu.EcuLogger;
import static javax.swing.JOptionPane.INFORMATION_MESSAGE;
import static javax.swing.JOptionPane.showMessageDialog;
import java.awt.event.ActionEvent;
@ -13,6 +12,6 @@ public final class AboutAction extends AbstractAction {
}
public void actionPerformed(ActionEvent actionEvent) {
showMessageDialog(logger, "Enginuity ECU Logger\nhttp://www.enginuity.org/", "About", INFORMATION_MESSAGE);
showMessageDialog(logger, "RomRaider ECU Logger\nhttp://www.romraider.com/", "About", INFORMATION_MESSAGE);
}
}

View File

@ -22,7 +22,6 @@
package enginuity.swing;
import enginuity.net.URL;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
@ -35,7 +34,7 @@ public class DebugPanel extends JPanel {
setLayout(new BorderLayout());
JPanel top = new JPanel(new GridLayout(7, 1));
top.add(new JLabel("Enginuity has encountered an exception. Please review the details below."));
top.add(new JLabel("RomRaider has encountered an exception. Please review the details below."));
top.add(new JLabel("If you are unable to fix this problem please visit the following website"));
top.add(new JLabel("and provide these details and the steps that lead to this error."));
top.add(new JLabel());

View File

@ -21,10 +21,12 @@
package enginuity.swing;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileOutputStream;
import com.centerkey.utils.BareBonesBrowserLaunch;
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;
import static javax.swing.JFrame.DISPOSE_ON_CLOSE;
@ -38,12 +40,10 @@ import static javax.swing.JOptionPane.showConfirmDialog;
import static javax.swing.JOptionPane.showMessageDialog;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JSeparator;
import com.centerkey.utils.BareBonesBrowserLaunch;
import enginuity.ECUEditor;
import enginuity.logger.ecu.EcuLogger;
import enginuity.logger.utec.gui.JutecGUI;
import enginuity.maps.Rom;
import enginuity.ramtune.test.RamTuneTestApp;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileOutputStream;
public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
@ -61,7 +61,7 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
private JMenuItem updateDefinition = new JMenuItem("Update ECU Definitions...");
private JMenu editMenu = new JMenu("Edit");
private JMenuItem settings = new JMenuItem("Enginuity Settings...");
private JMenuItem settings = new JMenuItem("RomRaider Settings...");
private JMenu viewMenu = new JMenu("View");
private JMenuItem romProperties = new JMenuItem("ECU Image Properties");
@ -81,7 +81,7 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
private JMenuItem launchRamTuneTestApp = new JMenuItem("Launch Test App...");
private JMenu helpMenu = new JMenu("Help");
private JMenuItem about = new JMenuItem("About Enginuity");
private JMenuItem about = new JMenuItem("About RomRaider");
private ECUEditor parent;
@ -188,7 +188,7 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
launchRamTuneTestApp.setMnemonic('L');
ramTuneMenu.add(launchRamTuneTestApp);
launchRamTuneTestApp.addActionListener(this);
// help menu stuff
add(helpMenu);
helpMenu.setMnemonic('H');
@ -291,7 +291,7 @@ public class ECUEditorMenuBar extends JMenuBar implements ActionListener {
EcuLogger.startLogger(DISPOSE_ON_CLOSE, parent);
} else if (e.getSource() == utecLogger) {
JutecGUI.startLogger(DISPOSE_ON_CLOSE, parent.getSettings());
JutecGUI.startLogger(DISPOSE_ON_CLOSE, parent.getSettings());
} else if (e.getSource() == updateDefinition) {
BareBonesBrowserLaunch.openURL(parent.getSettings().getEcuDefsURL());

View File

@ -22,7 +22,6 @@
package enginuity.swing;
import org.apache.log4j.Logger;
import javax.swing.JDialog;
import javax.swing.JFrame;
import static javax.swing.UIManager.getSystemLookAndFeelClassName;
@ -46,7 +45,7 @@ public final class LookAndFeelManager {
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("apple.awt.rendering", "true");
System.setProperty("apple.awt.window.position.forceSafeCreation", "true");
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Enginuity");
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "RomRaider");
System.setProperty("apple.awt.brushMetalLook", "true");
if (USE_RESTRICTED_PLATFORM_ON_MAC) {
setRestrictedPlatformLookAndFeel("Windows", "5.1");

View File

@ -25,7 +25,6 @@ import ZoeloeSoft.projects.JFontChooser.JFontChooser;
import enginuity.ECUEditor;
import enginuity.Settings;
import enginuity.util.FileAssociator;
import javax.swing.JColorChooser;
import javax.swing.JFrame;
import java.awt.Color;
@ -63,8 +62,8 @@ public class SettingsForm extends JFrame implements MouseListener {
btnRemoveAssocs.addMouseListener(this);
tableClickCount.setBackground(Color.WHITE);
// disable file assocation buttons if user is not in Windows
// disable file assocation buttons if user is not in Windows
StringTokenizer osName = new StringTokenizer(System.getProperties().getProperty("os.name"));
if (!osName.nextToken().equalsIgnoreCase("windows")) {
btnAddAssocs.setEnabled(false);
@ -150,7 +149,7 @@ public class SettingsForm extends JFrame implements MouseListener {
tableClickCount = new javax.swing.JComboBox();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Enginuity Settings");
setTitle("RomRaider Settings");
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
setFont(new java.awt.Font("Tahoma", 0, 11));
obsoleteWarning.setText("Warn me when opening out of date ECU image revision");
@ -212,50 +211,50 @@ public class SettingsForm extends JFrame implements MouseListener {
org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(lblWarning)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createSequentialGroup()
.add(4, 4, 4)
.add(lblMin))
.add(lblMax)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createSequentialGroup()
.add(maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 22, Short.MAX_VALUE)
.add(lblHighlight)
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(lblWarning)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createSequentialGroup()
.add(4, 4, 4)
.add(lblMin))
.add(lblMax)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel2Layout.createSequentialGroup()
.add(minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 55, Short.MAX_VALUE)
.add(lblAxis)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(warningColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createSequentialGroup()
.add(maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 22, Short.MAX_VALUE)
.add(lblHighlight)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel2Layout.createSequentialGroup()
.add(minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 55, Short.MAX_VALUE)
.add(lblAxis)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(warningColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createSequentialGroup()
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblMax)
.add(maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblHighlight))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblMin)
.add(minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblAxis))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(warningColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblWarning)))
jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2Layout.createSequentialGroup()
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblMax)
.add(maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblHighlight))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblMin)
.add(minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblAxis))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(warningColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblWarning)))
);
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Cell Borders"));
@ -274,25 +273,25 @@ public class SettingsForm extends JFrame implements MouseListener {
org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
.addContainerGap()
.add(lblIncrease)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 59, Short.MAX_VALUE)
.add(lblDecrease)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
.addContainerGap()
.add(lblIncrease)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 59, Short.MAX_VALUE)
.add(lblDecrease)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblDecrease)
.add(lblIncrease)
.add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblDecrease)
.add(lblIncrease)
.add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
);
lblCellHeight.setText("Cell Height:");
@ -331,136 +330,136 @@ public class SettingsForm extends JFrame implements MouseListener {
org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(extensionBin)
.add(extensionHex))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 93, Short.MAX_VALUE)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(btnAddAssocs, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(btnRemoveAssocs))
.add(25, 25, 25))
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(extensionBin)
.add(extensionHex))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 93, Short.MAX_VALUE)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(btnAddAssocs, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(btnRemoveAssocs))
.add(25, 25, 25))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(btnAddAssocs)
.add(extensionHex))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(btnRemoveAssocs)
.add(extensionBin)))
jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel4Layout.createSequentialGroup()
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(btnAddAssocs)
.add(extensionHex))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(btnRemoveAssocs)
.add(extensionBin)))
);
org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(saveDebugTables)
.add(displayHighTables)
.add(valueLimitWarning))
.add(jPanel1Layout.createSequentialGroup()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(lblCellHeight)
.add(lblFont))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(btnChooseFont)
.add(jPanel1Layout.createSequentialGroup()
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(saveDebugTables)
.add(displayHighTables)
.add(valueLimitWarning))
.add(jPanel1Layout.createSequentialGroup()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(lblCellHeight)
.add(lblFont))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(btnChooseFont)
.add(jPanel1Layout.createSequentialGroup()
.add(cellHeight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 42, Short.MAX_VALUE)
.add(lblCellWidth)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(cellWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))
.add(47, 47, 47))
.add(47, 47, 47))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(22, 22, 22)
.add(saveDebugTables)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(displayHighTables)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(valueLimitWarning)
.add(27, 27, 27)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblCellWidth)
.add(cellWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblCellHeight)
.add(cellHeight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblFont)
.add(btnChooseFont, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(22, 22, 22)
.add(saveDebugTables)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(displayHighTables)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(valueLimitWarning)
.add(27, 27, 27)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblCellWidth)
.add(cellWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(lblCellHeight)
.add(cellHeight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(lblFont)
.add(btnChooseFont, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
);
jLabel1.setText("click to open tables");
tableClickCount.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Single", "Double" }));
tableClickCount.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Single", "Double"}));
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.LEADING, calcConflictWarning)
.add(org.jdesktop.layout.GroupLayout.LEADING, obsoleteWarning)
.add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
.add(tableClickCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel1))
.add(org.jdesktop.layout.GroupLayout.LEADING, debug)
.add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
.add(reset)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 34, Short.MAX_VALUE)
.add(btnApply)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(btnOk)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(btnCancel)))
.addContainerGap())
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.LEADING, calcConflictWarning)
.add(org.jdesktop.layout.GroupLayout.LEADING, obsoleteWarning)
.add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
.add(tableClickCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel1))
.add(org.jdesktop.layout.GroupLayout.LEADING, debug)
.add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
.add(reset)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 34, Short.MAX_VALUE)
.add(btnApply)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(btnOk)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(btnCancel)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel1)
.add(tableClickCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(obsoleteWarning)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(calcConflictWarning)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(debug)
.add(17, 17, 17)
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(22, 22, 22)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(btnCancel)
.add(btnApply)
.add(reset)
.add(btnOk))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel1)
.add(tableClickCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(obsoleteWarning)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(calcConflictWarning)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(debug)
.add(17, 17, 17)
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(22, 22, 22)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(btnCancel)
.add(btnApply)
.add(reset)
.add(btnOk))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
@ -529,24 +528,25 @@ public class SettingsForm extends JFrame implements MouseListener {
// add file associations for selected file types
try {
if (extensionHex.isSelected()) {
FileAssociator.addAssociation("HEX", new File(".").getCanonicalPath() + "\\Enginuity.exe", "ECU Image");
FileAssociator.addAssociation("HEX", new File(".").getCanonicalPath() + "\\RomRaider.exe", "ECU Image");
}
if (extensionBin.isSelected()) {
FileAssociator.addAssociation("BIN", new File(".").getCanonicalPath() + "\\Enginuity.exe", "ECU Image");
FileAssociator.addAssociation("BIN", new File(".").getCanonicalPath() + "\\RomRaider.exe", "ECU Image");
}
} catch (Exception ex) { }
} catch (Exception ex) {
}
} else if (e.getSource() == btnRemoveAssocs) {
// remove file associations for selected file types
if (extensionHex.isSelected()) {
FileAssociator.removeAssociation("HEX");
}
if (extensionBin.isSelected()) {
FileAssociator.removeAssociation("HEX");
FileAssociator.removeAssociation("HEX");
}
}
}