Changeset 34
- Timestamp:
- 04/13/08 08:36:31 (5 years ago)
- Location:
- trunk/src/enginuity
- Files:
-
- 10 edited
-
ECUEditor.java (modified) (3 diffs)
-
NewGUI/NewGUI.java (modified) (3 diffs)
-
Settings.java (modified) (2 diffs)
-
logger/ecu/EcuLogger.java (modified) (1 diff)
-
logger/ecu/ui/handler/file/FileLoggerImpl.java (modified) (2 diffs)
-
logger/ecu/ui/swing/menubar/action/AboutAction.java (modified) (2 diffs)
-
swing/DebugPanel.java (modified) (2 diffs)
-
swing/ECUEditorMenuBar.java (modified) (6 diffs)
-
swing/LookAndFeelManager.java (modified) (2 diffs)
-
swing/SettingsForm.java (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/enginuity/ECUEditor.java
r1 r34 42 42 import org.w3c.dom.Document; 43 43 import org.xml.sax.InputSource; 44 45 44 import javax.swing.ImageIcon; 46 45 import javax.swing.JCheckBox; … … 78 77 private RomTreeRootNode imageRoot = new RomTreeRootNode("Open Images"); 79 78 private RomTree imageList = new RomTree(imageRoot); 80 private String versionDate = "2/8/2007"; 81 private String titleText = "Enginuity v" + VERSION; 79 private String titleText = "RomRaider v" + VERSION; 82 80 public MDIDesktopPane rightPanel = new MDIDesktopPane(); 83 81 private JProgressPane statusPanel = new JProgressPane(); … … 157 155 158 156 JOptionPane.showMessageDialog(this, scroller, 159 " Enginuity" + VERSION + " Release Notes", JOptionPane.INFORMATION_MESSAGE);157 "RomRaider " + VERSION + " Release Notes", JOptionPane.INFORMATION_MESSAGE); 160 158 } finally { 161 159 br.close(); -
trunk/src/enginuity/NewGUI/NewGUI.java
r1 r34 12 12 import enginuity.swing.LookAndFeelManager; 13 13 import org.apache.log4j.Logger; 14 15 14 import javax.swing.JFrame; 16 15 import javax.swing.JInternalFrame; … … 29 28 import java.awt.event.ActionEvent; 30 29 import java.awt.event.ActionListener; 31 import java.awt.event.WindowAdapter;32 30 import java.awt.event.WindowEvent; 33 31 import java.awt.event.WindowListener; … … 36 34 37 35 public class NewGUI extends JFrame implements WindowListener, ActionListener, 38 TreeSelectionListener, TuningEntityListener { 39 private static final Logger LOGGER = Logger.getLogger(NewGUI.class); 40 private final String engninuityVersionTitle = "Enginuity v0.5.0 alpha 1"; 41 42 private JPanel mainJPanel = new JPanel(); 43 44 private JMenuBar jMenuBar = new JMenuBar(); 45 private JMenu tuningEntitiesJMenu = new JMenu("Tuning Entities"); 46 47 private JSplitPane splitPane = new JSplitPane(); 48 private EDesktopPane rightDesktopPane = new EDesktopPane(); 49 50 private ETreeNode rootNode = new ETreeNode("Enginuity", new TableMetaData( 51 TableMetaData.RESERVED_ROOT, 0.0, 0.0, new Object[0], null, null, 52 false, "", "", "", "", "", null)); 53 private ETree leftJTree = new ETree(rootNode); 54 55 private boolean newTree = true; 56 57 private NewGUI() { 58 // Define which tuning entities are available 59 initData(); 60 61 // Initialize the GUI elements 62 initGui(); 36 TreeSelectionListener, TuningEntityListener { 37 private static final Logger LOGGER = Logger.getLogger(NewGUI.class); 38 private final String engninuityVersionTitle = "RomRaider v0.5.0 alpha 1"; 39 40 private JPanel mainJPanel = new JPanel(); 41 42 private JMenuBar jMenuBar = new JMenuBar(); 43 private JMenu tuningEntitiesJMenu = new JMenu("Tuning Entities"); 44 45 private JSplitPane splitPane = new JSplitPane(); 46 private EDesktopPane rightDesktopPane = new EDesktopPane(); 47 48 private ETreeNode rootNode = new ETreeNode("RomRaider", new TableMetaData( 49 TableMetaData.RESERVED_ROOT, 0.0, 0.0, new Object[0], null, null, 50 false, "", "", "", "", "", null)); 51 private ETree leftJTree = new ETree(rootNode); 52 53 private boolean newTree = true; 54 55 private NewGUI() { 56 // Define which tuning entities are available 57 initData(); 58 59 // Initialize the GUI elements 60 initGui(); 61 } 62 63 public static NewGUI getInstance() { 64 if (ApplicationStateManager.getEnginuityInstance() == null) { 65 ApplicationStateManager.setEnginuityInstance(new NewGUI()); 66 } 67 68 return ApplicationStateManager.getEnginuityInstance(); 69 } 70 71 private void initData() { 72 // Add supported tuning entities 73 // As new tuning entities are developed, add them here 74 UtecTuningEntityImpl utei = new UtecTuningEntityImpl(); 75 76 ApplicationStateManager.addTuningEntity(utei); 77 } 78 79 private void initGui() { 80 LOGGER.info("Initializing GUI."); 81 82 // Set the frame icon 83 Image img = Toolkit.getDefaultToolkit().getImage( 84 "graphics/enginuity-ico.gif"); 85 setIconImage(img); 86 87 // Set frame title 88 this.setTitle(this.engninuityVersionTitle); 89 90 // Set main JFrame size 91 this.setSize(800, 600); 92 93 // Setup the look and feel 94 LookAndFeelManager.initLookAndFeel(); 95 96 // This class implements its own windows closing methods. Duh!!! ;-) 97 this.addWindowListener(this); 98 99 // Setup JMenu 100 Iterator tuningEntities = ApplicationStateManager.getTuningEntities() 101 .iterator(); 102 while (tuningEntities.hasNext()) { 103 TuningEntity theTuningEntity = (TuningEntity) tuningEntities.next(); 104 JMenuItem tempItem = new JMenuItem(theTuningEntity.getName()); 105 tempItem.addActionListener(this); 106 tuningEntitiesJMenu.add(tempItem); 107 } 108 109 this.jMenuBar.add(this.tuningEntitiesJMenu); 110 this.jMenuBar.setBackground(new Color(236, 233, 216)); 111 this.setLayout(new BorderLayout()); 112 this.setJMenuBar(this.jMenuBar); 113 114 // Setup desktop pane 115 rightDesktopPane.setBackground(Color.BLACK); 116 117 // Setup split pane 118 splitPane.setDividerLocation(200); 119 splitPane.setLeftComponent(leftJTree); 120 splitPane.setRightComponent(rightDesktopPane); 121 splitPane.setDividerSize(5); 122 123 // Setup main JPanel 124 mainJPanel.setLayout(new BorderLayout()); 125 mainJPanel.add(splitPane, BorderLayout.CENTER); 126 127 // Add everything to JFrame 128 this.add(mainJPanel, BorderLayout.CENTER); 129 } 130 131 public void actionPerformed(ActionEvent e) { 132 133 if (e.getActionCommand().equalsIgnoreCase("UTEC Tuning Entity")) { 134 String theCommand = e.getActionCommand(); 135 136 ApplicationStateManager.setCurrentTuningEntity(theCommand, this); 137 } 138 } 139 140 public void rebuildJMenuBar(Vector<JMenu> items) { 141 Iterator iterator = items.iterator(); 142 143 this.jMenuBar.removeAll(); 144 145 while (iterator.hasNext()) { 146 JMenu tempMenu = (JMenu) iterator.next(); 147 jMenuBar.add(tempMenu); 148 } 149 150 jMenuBar.add(this.tuningEntitiesJMenu); 151 152 this.jMenuBar.revalidate(); 153 } 154 155 public void valueChanged(TreeSelectionEvent arg0) { 156 157 LOGGER.debug("Tree Node selected."); 158 159 } 160 161 public void addTuningGroupNameToTitle(String titleAppend) { 162 this.setTitle(this.engninuityVersionTitle + ": " + titleAppend); 163 } 164 165 /** 166 * Tuning group is a collection of maps and parameters, ala a ROM or a UTEC 167 * Map file 168 */ 169 public void addNewTuningGroup(ETreeNode newTreeModel) { 170 LOGGER.debug("test: " + this.newTree); 171 172 int childCount = this.rootNode.getChildCount(); 173 String newTuningGroup = newTreeModel.getTableMetaData().getTableGroup(); 174 175 LOGGER.debug("Children:" + childCount + " :" + newTuningGroup); 176 for (int i = 0; i < childCount; i++) { 177 ETreeNode tempNode = (ETreeNode) this.rootNode.getChildAt(i); 178 if (tempNode.getTableMetaData().getTableGroup().equals( 179 newTuningGroup)) { 180 LOGGER.error("Can't open same ROM / Map file 2x"); 181 return; 182 } 183 } 184 185 if (this.newTree == true) { 186 this.newTree = false; 187 this.rootNode.removeAllChildren(); 188 } 189 190 this.rootNode.add(newTreeModel); 191 this.leftJTree.updateUI(); 192 this.splitPane.repaint(); 193 } 194 195 /** 196 * Removes a tuning group from the GUI 197 */ 198 public void removeTuningGroup(String tableGroup) { 199 int childCount = this.rootNode.getChildCount(); 200 201 for (int i = 0; i < childCount; i++) { 202 ETreeNode tempNode = (ETreeNode) this.rootNode.getChildAt(i); 203 if (tempNode.getTableMetaData().getTableGroup().equals(tableGroup)) { 204 ApplicationStateManager 205 .setSelectedTuningGroup("No Tuning Group Selected."); 206 this.addTuningGroupNameToTitle(""); 207 this.rootNode.remove(i); 208 this.leftJTree.updateUI(); 209 this.splitPane.repaint(); 210 211 // Clean up 212 this.rightDesktopPane.removeInternalFrames(tableGroup); 213 214 // Clean up on tuning entity sides 215 Iterator tuningEntites = ApplicationStateManager 216 .getTuningEntities().iterator(); 217 218 while (tuningEntites.hasNext()) { 219 TuningEntity theTuningEntity = (TuningEntity) tuningEntites 220 .next(); 221 theTuningEntity.removeTuningGroup(tableGroup); 222 } 223 224 return; 225 } 226 } 227 } 228 229 public void displayInternalFrameTable(Object[][] data, TableMetaData tableMetaData) { 230 this.rightDesktopPane.add(data, tableMetaData); 231 } 232 233 public void removeInternalFrame(EInternalFrame frame) { 234 this.rightDesktopPane.remove(frame); 235 } 236 237 public void setNewToolBar(JToolBar theToolBar) { 238 // Ensure proper color 239 theToolBar.setBackground(new Color(236, 233, 216)); 240 this.add(theToolBar, BorderLayout.NORTH); 241 } 242 243 /* 244 * Helper method that returns the number of maps that have had their data changed. 245 * (non-Javadoc) 246 * @see enginuity.NewGUI.interfaces.TuningEntityListener#getMapChangeCount(enginuity.NewGUI.interfaces.TuningEntity, java.lang.String) 247 */ 248 public int getMapChangeCount(TuningEntity tuningEntity, String tableGroup) { 249 JInternalFrame[] allFrames = this.rightDesktopPane.getAllFrames(); 250 int number = 0; 251 for (int i = 0; i < allFrames.length; i++) { 252 EInternalFrame eInternalFrame = (EInternalFrame) allFrames[i]; 253 254 if (eInternalFrame.getTableMetaData().getTableGroup().equals( 255 tableGroup)) { 256 if (eInternalFrame.dataChanged()) { 257 number++; 258 } 259 } 260 } 261 262 return number; 263 264 } 265 266 /* 267 * Method walks through all opened JInternalFrames in right pane. If an InternFrame claims its 268 * data has been changed, the tuning entity parent is notified. 269 * (non-Javadoc) 270 * @see enginuity.NewGUI.interfaces.TuningEntityListener#saveMaps() 271 */ 272 public void saveMaps() { 273 JInternalFrame[] allFrames = this.rightDesktopPane.getAllFrames(); 274 String tableGroup = ApplicationStateManager.getSelectedTuningGroup(); 275 276 for (int i = 0; i < allFrames.length; i++) { 277 EInternalFrame eInternalFrame = (EInternalFrame) allFrames[i]; 278 279 if (eInternalFrame.getTableMetaData().getTableGroup().equals( 280 tableGroup)) { 281 if (eInternalFrame.dataChanged()) { 282 eInternalFrame.saveDataToParentTuningEntity(); 283 } 284 } 285 } 286 } 287 288 /** 289 * Getter that returns the title of Enginuity 290 * 291 * @return 292 */ 293 public String getEngninuityTitle() { 294 return engninuityVersionTitle; 295 } 296 297 /* 298 * Tuning entity in scope will call this when it is ready to exit. Some entities might need to cleanup connections or save files. 299 * (non-Javadoc) 300 * @see enginuity.NewGUI.interfaces.TuningEntityListener#readyForExit() 301 */ 302 public void readyForExit() { 303 LOGGER.info("RomRaider is now exiting as per tuning entity notification: " + ApplicationStateManager.getCurrentTuningEntity().getName()); 304 System.exit(0); 305 } 306 307 // ************************************************************** 308 // Methods pertaining to the WindowListener this class implements 309 // ************************************************************** 310 311 public void windowActivated(WindowEvent e) { 312 LOGGER.info("Window Activated."); 313 } 314 315 public void windowClosed(WindowEvent e) { 316 LOGGER.info("Window Closed."); 317 } 318 319 public void windowClosing(WindowEvent e) { 320 LOGGER.info("Preparing RomRaider for exit."); 321 322 TuningEntity currentTuningEntity = ApplicationStateManager 323 .getCurrentTuningEntity(); 324 325 if (currentTuningEntity == null) { 326 LOGGER.debug("No Tuning Entity ever selected."); 327 LOGGER.info("RomRaider exiting immediately."); 328 System.exit(0); 329 } else { 330 LOGGER.debug("Notify current tuning entity of pending exit."); 331 currentTuningEntity.notifySystemExit(); 332 } 333 } 334 335 public void windowDeactivated(WindowEvent e) { 336 // TODO Auto-generated method stub 337 LOGGER.info("Window Deactivated."); 338 } 339 340 public void windowDeiconified(WindowEvent e) { 341 // TODO Auto-generated method stub 342 LOGGER.info("Window Deiconified."); 343 } 344 345 public void windowIconified(WindowEvent e) { 346 // TODO Auto-generated method stub 347 LOGGER.info("Window Iconified."); 348 } 349 350 public void windowOpened(WindowEvent e) { 351 // TODO Auto-generated method stub 352 LOGGER.info("Window Opened."); 63 353 } 64 354 65 public static NewGUI getInstance() {66 if (ApplicationStateManager.getEnginuityInstance() == null) {67 ApplicationStateManager.setEnginuityInstance(new NewGUI());68 }69 70 return ApplicationStateManager.getEnginuityInstance();71 }72 73 private void initData() {74 // Add supported tuning entities75 // As new tuning entities are developed, add them here76 UtecTuningEntityImpl utei = new UtecTuningEntityImpl();77 78 ApplicationStateManager.addTuningEntity(utei);79 }80 81 private void initGui() {82 LOGGER.info("Initializing GUI.");83 84 // Set the frame icon85 Image img = Toolkit.getDefaultToolkit().getImage(86 "graphics/enginuity-ico.gif");87 setIconImage(img);88 89 // Set frame title90 this.setTitle(this.engninuityVersionTitle);91 92 // Set main JFrame size93 this.setSize(800, 600);94 95 // Setup the look and feel96 LookAndFeelManager.initLookAndFeel();97 98 // This class implements its own windows closing methods. Duh!!! ;-)99 this.addWindowListener(this);100 101 // Setup JMenu102 Iterator tuningEntities = ApplicationStateManager.getTuningEntities()103 .iterator();104 while (tuningEntities.hasNext()) {105 TuningEntity theTuningEntity = (TuningEntity) tuningEntities.next();106 JMenuItem tempItem = new JMenuItem(theTuningEntity.getName());107 tempItem.addActionListener(this);108 tuningEntitiesJMenu.add(tempItem);109 }110 111 this.jMenuBar.add(this.tuningEntitiesJMenu);112 this.jMenuBar.setBackground(new Color(236, 233, 216));113 this.setLayout(new BorderLayout());114 this.setJMenuBar(this.jMenuBar);115 116 // Setup desktop pane117 rightDesktopPane.setBackground(Color.BLACK);118 119 // Setup split pane120 splitPane.setDividerLocation(200);121 splitPane.setLeftComponent(leftJTree);122 splitPane.setRightComponent(rightDesktopPane);123 splitPane.setDividerSize(5);124 125 // Setup main JPanel126 mainJPanel.setLayout(new BorderLayout());127 mainJPanel.add(splitPane, BorderLayout.CENTER);128 129 // Add everything to JFrame130 this.add(mainJPanel, BorderLayout.CENTER);131 }132 133 public void actionPerformed(ActionEvent e) {134 135 if (e.getActionCommand().equalsIgnoreCase("UTEC Tuning Entity")) {136 String theCommand = e.getActionCommand();137 138 ApplicationStateManager.setCurrentTuningEntity(theCommand, this);139 }140 }141 142 public void rebuildJMenuBar(Vector<JMenu> items) {143 Iterator iterator = items.iterator();144 145 this.jMenuBar.removeAll();146 147 while (iterator.hasNext()) {148 JMenu tempMenu = (JMenu) iterator.next();149 jMenuBar.add(tempMenu);150 }151 152 jMenuBar.add(this.tuningEntitiesJMenu);153 154 this.jMenuBar.revalidate();155 }156 157 public void valueChanged(TreeSelectionEvent arg0) {158 159 LOGGER.debug("Tree Node selected.");160 161 }162 163 public void addTuningGroupNameToTitle(String titleAppend) {164 this.setTitle(this.engninuityVersionTitle + ": " + titleAppend);165 }166 167 /**168 * Tuning group is a collection of maps and parameters, ala a ROM or a UTEC169 * Map file170 *171 */172 public void addNewTuningGroup(ETreeNode newTreeModel) {173 LOGGER.debug("test: " + this.newTree);174 175 int childCount = this.rootNode.getChildCount();176 String newTuningGroup = newTreeModel.getTableMetaData().getTableGroup();177 178 LOGGER.debug("Children:" + childCount + " :" + newTuningGroup);179 for (int i = 0; i < childCount; i++) {180 ETreeNode tempNode = (ETreeNode) this.rootNode.getChildAt(i);181 if (tempNode.getTableMetaData().getTableGroup().equals(182 newTuningGroup)) {183 LOGGER.error("Can't open same ROM / Map file 2x");184 return;185 }186 }187 188 if (this.newTree == true) {189 this.newTree = false;190 this.rootNode.removeAllChildren();191 }192 193 this.rootNode.add(newTreeModel);194 this.leftJTree.updateUI();195 this.splitPane.repaint();196 }197 198 /**199 * Removes a tuning group from the GUI200 *201 */202 public void removeTuningGroup(String tableGroup) {203 int childCount = this.rootNode.getChildCount();204 205 for (int i = 0; i < childCount; i++) {206 ETreeNode tempNode = (ETreeNode) this.rootNode.getChildAt(i);207 if (tempNode.getTableMetaData().getTableGroup().equals(tableGroup)) {208 ApplicationStateManager209 .setSelectedTuningGroup("No Tuning Group Selected.");210 this.addTuningGroupNameToTitle("");211 this.rootNode.remove(i);212 this.leftJTree.updateUI();213 this.splitPane.repaint();214 215 // Clean up216 this.rightDesktopPane.removeInternalFrames(tableGroup);217 218 // Clean up on tuning entity sides219 Iterator tuningEntites = ApplicationStateManager220 .getTuningEntities().iterator();221 222 while (tuningEntites.hasNext()) {223 TuningEntity theTuningEntity = (TuningEntity) tuningEntites224 .next();225 theTuningEntity.removeTuningGroup(tableGroup);226 }227 228 return;229 }230 }231 }232 233 public void displayInternalFrameTable(Object[][] data, TableMetaData tableMetaData) {234 this.rightDesktopPane.add(data, tableMetaData);235 }236 237 public void removeInternalFrame(EInternalFrame frame) {238 this.rightDesktopPane.remove(frame);239 }240 241 public void setNewToolBar(JToolBar theToolBar) {242 // Ensure proper color243 theToolBar.setBackground(new Color(236, 233, 216));244 this.add(theToolBar, BorderLayout.NORTH);245 }246 247 /*248 * Helper method that returns the number of maps that have had their data changed.249 * (non-Javadoc)250 * @see enginuity.NewGUI.interfaces.TuningEntityListener#getMapChangeCount(enginuity.NewGUI.interfaces.TuningEntity, java.lang.String)251 */252 public int getMapChangeCount(TuningEntity tuningEntity, String tableGroup) {253 JInternalFrame[] allFrames = this.rightDesktopPane.getAllFrames();254 int number = 0;255 for (int i = 0; i < allFrames.length; i++) {256 EInternalFrame eInternalFrame = (EInternalFrame) allFrames[i];257 258 if (eInternalFrame.getTableMetaData().getTableGroup().equals(259 tableGroup)) {260 if (eInternalFrame.dataChanged()) {261 number++;262 }263 }264 }265 266 return number;267 268 }269 270 /*271 * Method walks through all opened JInternalFrames in right pane. If an InternFrame claims its272 * data has been changed, the tuning entity parent is notified.273 * (non-Javadoc)274 * @see enginuity.NewGUI.interfaces.TuningEntityListener#saveMaps()275 */276 public void saveMaps() {277 JInternalFrame[] allFrames = this.rightDesktopPane.getAllFrames();278 String tableGroup = ApplicationStateManager.getSelectedTuningGroup();279 280 for (int i = 0; i < allFrames.length; i++) {281 EInternalFrame eInternalFrame = (EInternalFrame) allFrames[i];282 283 if (eInternalFrame.getTableMetaData().getTableGroup().equals(284 tableGroup)) {285 if (eInternalFrame.dataChanged()) {286 eInternalFrame.saveDataToParentTuningEntity();287 }288 }289 }290 }291 292 /**293 * Getter that returns the title of Enginuity294 * @return295 */296 public String getEngninuityTitle() {297 return engninuityVersionTitle;298 }299 300 /*301 * Tuning entity in scope will call this when it is ready to exit. Some entities might need to cleanup connections or save files.302 * (non-Javadoc)303 * @see enginuity.NewGUI.interfaces.TuningEntityListener#readyForExit()304 */305 public void readyForExit() {306 LOGGER.info("Enginuity is now exiting as per tuning entity notification: "+ApplicationStateManager.getCurrentTuningEntity().getName());307 System.exit(0);308 }309 310 311 312 // **************************************************************313 // Methods pertaining to the WindowListener this class implements314 // **************************************************************315 316 public void windowActivated(WindowEvent e) {317 LOGGER.info("Window Activated.");318 }319 320 public void windowClosed(WindowEvent e) {321 LOGGER.info("Window Closed.");322 }323 324 public void windowClosing(WindowEvent e) {325 LOGGER.info("Preparing Enginuity for exit.");326 327 TuningEntity currentTuningEntity = ApplicationStateManager328 .getCurrentTuningEntity();329 330 if (currentTuningEntity == null) {331 LOGGER.debug("No Tuning Entity ever selected.");332 LOGGER.info("Enginuity exiting immediately.");333 System.exit(0);334 } else {335 LOGGER.debug("Notify current tuning entity of pending exit.");336 currentTuningEntity.notifySystemExit();337 }338 }339 340 public void windowDeactivated(WindowEvent e) {341 // TODO Auto-generated method stub342 LOGGER.info("Window Deactivated.");343 }344 345 public void windowDeiconified(WindowEvent e) {346 // TODO Auto-generated method stub347 LOGGER.info("Window Deiconified.");348 }349 350 public void windowIconified(WindowEvent e) {351 // TODO Auto-generated method stub352 LOGGER.info("Window Iconified.");353 }354 355 public void windowOpened(WindowEvent e) {356 // TODO Auto-generated method stub357 LOGGER.info("Window Opened.");358 }359 360 355 } -
trunk/src/enginuity/Settings.java
r1 r34 25 25 import enginuity.logger.ecu.definition.EcuDefinition; 26 26 import static enginuity.util.ParamChecker.checkNotNullOrEmpty; 27 28 27 import java.awt.Color; 29 28 import java.awt.Dimension; … … 43 42 44 43 private String romRevisionURL = "http://www.scoobypedia.co.uk/index.php/Knowledge/ECUVersionCompatibilityList"; 45 private String ecuDefsURL = "http://www. enginuity.org/viewtopic.php?t=360";46 private String supportURL = "http://www. enginuity.org";44 private String ecuDefsURL = "http://www.romraider.com/forum/forum8.html"; 45 private String supportURL = "http://www.romraider.com"; 47 46 private String releaseNotes = "release notes.txt"; 48 47 private String recentVersion = "x"; -
trunk/src/enginuity/logger/ecu/EcuLogger.java
r10 r34 150 150 public final class EcuLogger extends JFrame implements WindowListener, PropertyChangeListener, MessageListener { 151 151 private static final Logger LOGGER = Logger.getLogger(EcuLogger.class); 152 private static final String ENGINUITY_ECU_LOGGER_TITLE = " EnginuityECU Logger";152 private static final String ENGINUITY_ECU_LOGGER_TITLE = "RomRaider ECU Logger"; 153 153 private static final String HEADING_PARAMETERS = "Parameters"; 154 154 private static final String HEADING_SWITCHES = "Switches"; -
trunk/src/enginuity/logger/ecu/ui/handler/file/FileLoggerImpl.java
r1 r34 26 26 import enginuity.logger.ecu.ui.MessageListener; 27 27 import static enginuity.util.ParamChecker.checkNotNull; 28 29 28 import java.io.BufferedOutputStream; 30 29 import java.io.File; … … 124 123 logDir += File.separator; 125 124 } 126 logDir += " enginuitylog_" + dateFormat.format(new Date()) + ".csv";125 logDir += "romraiderlog_" + dateFormat.format(new Date()) + ".csv"; 127 126 return logDir; 128 127 } -
trunk/src/enginuity/logger/ecu/ui/swing/menubar/action/AboutAction.java
r1 r34 2 2 3 3 import enginuity.logger.ecu.EcuLogger; 4 5 4 import static javax.swing.JOptionPane.INFORMATION_MESSAGE; 6 5 import static javax.swing.JOptionPane.showMessageDialog; … … 14 13 15 14 public void actionPerformed(ActionEvent actionEvent) { 16 showMessageDialog(logger, " Enginuity ECU Logger\nhttp://www.enginuity.org/", "About", INFORMATION_MESSAGE);15 showMessageDialog(logger, "RomRaider ECU Logger\nhttp://www.romraider.com/", "About", INFORMATION_MESSAGE); 17 16 } 18 17 } -
trunk/src/enginuity/swing/DebugPanel.java
r1 r34 23 23 24 24 import enginuity.net.URL; 25 26 25 import javax.swing.JLabel; 27 26 import javax.swing.JPanel; … … 36 35 37 36 JPanel top = new JPanel(new GridLayout(7, 1)); 38 top.add(new JLabel(" Enginuityhas encountered an exception. Please review the details below."));37 top.add(new JLabel("RomRaider has encountered an exception. Please review the details below.")); 39 38 top.add(new JLabel("If you are unable to fix this problem please visit the following website")); 40 39 top.add(new JLabel("and provide these details and the steps that lead to this error.")); -
trunk/src/enginuity/swing/ECUEditorMenuBar.java
r1 r34 22 22 package enginuity.swing; 23 23 24 import java.awt.event.ActionEvent; 25 import java.awt.event.ActionListener; 26 import java.io.File; 27 import java.io.FileOutputStream; 24 import com.centerkey.utils.BareBonesBrowserLaunch; 25 import enginuity.ECUEditor; 26 import enginuity.logger.ecu.EcuLogger; 27 import enginuity.logger.utec.gui.JutecGUI; 28 import enginuity.maps.Rom; 29 import enginuity.ramtune.test.RamTuneTestApp; 28 30 import javax.swing.ButtonGroup; 29 31 import javax.swing.JFileChooser; … … 39 41 import javax.swing.JRadioButtonMenuItem; 40 42 import javax.swing.JSeparator; 41 import com.centerkey.utils.BareBonesBrowserLaunch; 42 import enginuity.ECUEditor; 43 import enginuity.logger.ecu.EcuLogger; 44 import enginuity.logger.utec.gui.JutecGUI; 45 import enginuity.maps.Rom; 46 import enginuity.ramtune.test.RamTuneTestApp; 43 import java.awt.event.ActionEvent; 44 import java.awt.event.ActionListener; 45 import java.io.File; 46 import java.io.FileOutputStream; 47 47 48 48 public class ECUEditorMenuBar extends JMenuBar implements ActionListener { … … 62 62 63 63 private JMenu editMenu = new JMenu("Edit"); 64 private JMenuItem settings = new JMenuItem(" EnginuitySettings...");64 private JMenuItem settings = new JMenuItem("RomRaider Settings..."); 65 65 66 66 private JMenu viewMenu = new JMenu("View"); … … 82 82 83 83 private JMenu helpMenu = new JMenu("Help"); 84 private JMenuItem about = new JMenuItem("About Enginuity");84 private JMenuItem about = new JMenuItem("About RomRaider"); 85 85 86 86 private ECUEditor parent; … … 189 189 ramTuneMenu.add(launchRamTuneTestApp); 190 190 launchRamTuneTestApp.addActionListener(this); 191 191 192 192 // help menu stuff 193 193 add(helpMenu); … … 292 292 293 293 } else if (e.getSource() == utecLogger) { 294 JutecGUI.startLogger(DISPOSE_ON_CLOSE, parent.getSettings());294 JutecGUI.startLogger(DISPOSE_ON_CLOSE, parent.getSettings()); 295 295 296 296 } else if (e.getSource() == updateDefinition) { -
trunk/src/enginuity/swing/LookAndFeelManager.java
r1 r34 23 23 24 24 import org.apache.log4j.Logger; 25 26 25 import javax.swing.JDialog; 27 26 import javax.swing.JFrame; … … 47 46 System.setProperty("apple.awt.rendering", "true"); 48 47 System.setProperty("apple.awt.window.position.forceSafeCreation", "true"); 49 System.setProperty("com.apple.mrj.application.apple.menu.about.name", " Enginuity");48 System.setProperty("com.apple.mrj.application.apple.menu.about.name", "RomRaider"); 50 49 System.setProperty("apple.awt.brushMetalLook", "true"); 51 50 if (USE_RESTRICTED_PLATFORM_ON_MAC) { -
trunk/src/enginuity/swing/SettingsForm.java
r1 r34 26 26 import enginuity.Settings; 27 27 import enginuity.util.FileAssociator; 28 29 28 import javax.swing.JColorChooser; 30 29 import javax.swing.JFrame; … … 64 63 65 64 tableClickCount.setBackground(Color.WHITE); 66 67 // disable file assocation buttons if user is not in Windows 65 66 // disable file assocation buttons if user is not in Windows 68 67 StringTokenizer osName = new StringTokenizer(System.getProperties().getProperty("os.name")); 69 68 if (!osName.nextToken().equalsIgnoreCase("windows")) { … … 151 150 152 151 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); 153 setTitle(" EnginuitySettings");152 setTitle("RomRaider Settings"); 154 153 setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); 155 154 setFont(new java.awt.Font("Tahoma", 0, 11)); … … 213 212 jPanel2.setLayout(jPanel2Layout); 214 213 jPanel2Layout.setHorizontalGroup( 215 jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 216 .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup() 217 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) 218 .add(lblWarning) 219 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 214 jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 215 .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup() 216 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) 217 .add(lblWarning) 218 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 219 .add(jPanel2Layout.createSequentialGroup() 220 .add(4, 4, 4) 221 .add(lblMin)) 222 .add(lblMax))) 223 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 224 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 225 .add(jPanel2Layout.createSequentialGroup() 226 .add(maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 227 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 22, Short.MAX_VALUE) 228 .add(lblHighlight) 229 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 230 .add(highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 231 .add(jPanel2Layout.createSequentialGroup() 232 .add(minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 233 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 55, Short.MAX_VALUE) 234 .add(lblAxis) 235 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 236 .add(axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 237 .add(warningColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 238 .addContainerGap()) 239 ); 240 jPanel2Layout.setVerticalGroup( 241 jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 220 242 .add(jPanel2Layout.createSequentialGroup() 221 .add(4, 4, 4) 222 .add(lblMin)) 223 .add(lblMax))) 224 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 225 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 226 .add(jPanel2Layout.createSequentialGroup() 227 .add(maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 228 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 22, Short.MAX_VALUE) 229 .add(lblHighlight) 230 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 231 .add(highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 232 .add(jPanel2Layout.createSequentialGroup() 233 .add(minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 234 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 55, Short.MAX_VALUE) 235 .add(lblAxis) 236 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 237 .add(axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 238 .add(warningColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 239 .addContainerGap()) 240 ); 241 jPanel2Layout.setVerticalGroup( 242 jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 243 .add(jPanel2Layout.createSequentialGroup() 244 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 245 .add(lblMax) 246 .add(maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 247 .add(highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 248 .add(lblHighlight)) 249 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 250 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 251 .add(lblMin) 252 .add(minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 253 .add(axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 254 .add(lblAxis)) 255 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 256 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 257 .add(warningColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 258 .add(lblWarning))) 243 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 244 .add(lblMax) 245 .add(maxColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 246 .add(highlightColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 247 .add(lblHighlight)) 248 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 249 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 250 .add(lblMin) 251 .add(minColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 252 .add(axisColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 253 .add(lblAxis)) 254 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 255 .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 256 .add(warningColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 257 .add(lblWarning))) 259 258 ); 260 259 … … 275 274 jPanel3.setLayout(jPanel3Layout); 276 275 jPanel3Layout.setHorizontalGroup( 277 jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)278 .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()279 .addContainerGap()280 .add(lblIncrease)281 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)282 .add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)283 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 59, Short.MAX_VALUE)284 .add(lblDecrease)285 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)286 .add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)287 .addContainerGap())276 jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 277 .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup() 278 .addContainerGap() 279 .add(lblIncrease) 280 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 281 .add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 282 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 59, Short.MAX_VALUE) 283 .add(lblDecrease) 284 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 285 .add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 286 .addContainerGap()) 288 287 ); 289 288 jPanel3Layout.setVerticalGroup( 290 jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)291 .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)292 .add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)293 .add(lblDecrease)294 .add(lblIncrease)295 .add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))289 jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 290 .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 291 .add(decreaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 292 .add(lblDecrease) 293 .add(lblIncrease) 294 .add(increaseColor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 296 295 ); 297 296 … … 332 331 jPanel4.setLayout(jPanel4Layout); 333 332 jPanel4Layout.setHorizontalGroup( 334 jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)335 .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()336 .addContainerGap()337 .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)338 .add(extensionBin)339 .add(extensionHex))340 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 93, Short.MAX_VALUE)341 .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)342 .add(btnAddAssocs, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)343 .add(btnRemoveAssocs))344 .add(25, 25, 25))333 jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 334 .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup() 335 .addContainerGap() 336 .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 337 .add(extensionBin) 338 .add(extensionHex)) 339 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 93, Short.MAX_VALUE) 340 .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) 341 .add(btnAddAssocs, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 342 .add(btnRemoveAssocs)) 343 .add(25, 25, 25)) 345 344 ); 346 345 jPanel4Layout.setVerticalGroup( 347 jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)348 .add(jPanel4Layout.createSequentialGroup()349 .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)350 .add(btnAddAssocs)351 .add(extensionHex))352 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)353 .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)354 .add(btnRemoveAssocs)355 .add(extensionBin)))346 jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 347 .add(jPanel4Layout.createSequentialGroup() 348 .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 349 .add(btnAddAssocs) 350 .add(extensionHex)) 351 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 352 .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 353 .add(btnRemoveAssocs) 354 .add(extensionBin))) 356 355 ); 357 356 … … 359 358 jPanel1.setLayout(jPanel1Layout); 360 359 jPanel1Layout.setHorizontalGroup( 361 jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)362 .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)363 .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)364 .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)365 .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()366 .addContainerGap()367 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)368 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)369 .add(saveDebugTables)370 .add(displayHighTables)371 .add(valueLimitWarning))372 .add(jPanel1Layout.createSequentialGroup()373 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)374 .add(lblCellHeight)375 .add(lblFont))376 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)377 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)378 .add(btnChooseFont)379 .add(jPanel1Layout.createSequentialGroup()360 jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 361 .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 362 .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 363 .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 364 .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup() 365 .addContainerGap() 366 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) 367 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 368 .add(saveDebugTables) 369 .add(displayHighTables) 370 .add(valueLimitWarning)) 371 .add(jPanel1Layout.createSequentialGroup() 372 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 373 .add(lblCellHeight) 374 .add(lblFont)) 375 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 376 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 377 .add(btnChooseFont) 378 .add(jPanel1Layout.createSequentialGroup() 380 379 .add(cellHeight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 381 380 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 42, Short.MAX_VALUE) … … 383 382 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 384 383 .add(cellWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))) 385 .add(47, 47, 47))384 .add(47, 47, 47)) 386 385 ); 387 386 jPanel1Layout.setVerticalGroup( 388 jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)389 .add(jPanel1Layout.createSequentialGroup()390 .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)391 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)392 .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)393 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)394 .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)395 .add(22, 22, 22)396 .add(saveDebugTables)397 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)398 .add(displayHighTables)399 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)400 .add(valueLimitWarning)401 .add(27, 27, 27)402 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)403 .add(lblCellWidth)404 .add(cellWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)405 .add(lblCellHeight)406 .add(cellHeight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))407 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)408 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)409 .add(lblFont)410 .add(btnChooseFont, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))387 jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 388 .add(jPanel1Layout.createSequentialGroup() 389 .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 390 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 391 .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 392 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 393 .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 394 .add(22, 22, 22) 395 .add(saveDebugTables) 396 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 397 .add(displayHighTables) 398 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 399 .add(valueLimitWarning) 400 .add(27, 27, 27) 401 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 402 .add(lblCellWidth) 403 .add(cellWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 404 .add(lblCellHeight) 405 .add(cellHeight, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 406 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 407 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 408 .add(lblFont) 409 .add(btnChooseFont, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) 411 410 ); 412 411 413 412 jLabel1.setText("click to open tables"); 414 413 415 tableClickCount.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Single", "Double"}));414 tableClickCount.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Single", "Double"})); 416 415 417 416 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); 418 417 getContentPane().setLayout(layout); 419 418 layout.setHorizontalGroup( 420 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)421 .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()422 .addContainerGap()423 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)424 .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)425 .add(org.jdesktop.layout.GroupLayout.LEADING, calcConflictWarning)426 .add(org.jdesktop.layout.GroupLayout.LEADING, obsoleteWarning)427 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()428 .add(tableClickCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)429 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)430 .add(jLabel1))431 .add(org.jdesktop.layout.GroupLayout.LEADING, debug)432 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()433 .add(reset)434 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 34, Short.MAX_VALUE)435 .add(btnApply)436 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)437 .add(btnOk)438 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)439 .add(btnCancel)))440 .addContainerGap())419 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 420 .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() 421 .addContainerGap() 422 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) 423 .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 424 .add(org.jdesktop.layout.GroupLayout.LEADING, calcConflictWarning) 425 .add(org.jdesktop.layout.GroupLayout.LEADING, obsoleteWarning) 426 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 427 .add(tableClickCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 428 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 429 .add(jLabel1)) 430 .add(org.jdesktop.layout.GroupLayout.LEADING, debug) 431 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 432 .add(reset) 433 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 34, Short.MAX_VALUE) 434 .add(btnApply) 435 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 436 .add(btnOk) 437 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 438 .add(btnCancel))) 439 .addContainerGap()) 441 440 ); 442 441 layout.setVerticalGroup( 443 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)444 .add(layout.createSequentialGroup()445 .addContainerGap()446 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)447 .add(jLabel1)448 .add(tableClickCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))449 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)450 .add(obsoleteWarning)451 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)452 .add(calcConflictWarning)453 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)454 .add(debug)455 .add(17, 17, 17)456 .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)457 .add(22, 22, 22)458 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)459 .add(btnCancel)460 .add(btnApply)461 .add(reset)462 .add(btnOk))463 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))442 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 443 .add(layout.createSequentialGroup() 444 .addContainerGap() 445 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 446 .add(jLabel1) 447 .add(tableClickCount, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 448 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 449 .add(obsoleteWarning) 450 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 451 .add(calcConflictWarning) 452 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 453 .add(debug) 454 .add(17, 17, 17) 455 .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 456 .add(22, 22, 22) 457 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 458 .add(btnCancel) 459 .add(btnApply) 460 .add(reset) 461 .add(btnOk)) 462 .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 464 463 ); 465 464 pack(); … … 530 529 try { 531 530 if (extensionHex.isSelected()) { 532 FileAssociator.addAssociation("HEX", new File(".").getCanonicalPath() + "\\ Enginuity.exe", "ECU Image");531 FileAssociator.addAssociation("HEX", new File(".").getCanonicalPath() + "\\RomRaider.exe", "ECU Image"); 533 532 } 534 533 535 534 if (extensionBin.isSelected()) { 536 FileAssociator.addAssociation("BIN", new File(".").getCanonicalPath() + "\\ Enginuity.exe", "ECU Image");535 FileAssociator.addAssociation("BIN", new File(".").getCanonicalPath() + "\\RomRaider.exe", "ECU Image"); 537 536 } 538 } catch (Exception ex) { } 539 537 } catch (Exception ex) { 538 } 539 540 540 } else if (e.getSource() == btnRemoveAssocs) { 541 541 // remove file associations for selected file types … … 543 543 FileAssociator.removeAssociation("HEX"); 544 544 } 545 545 546 546 if (extensionBin.isSelected()) { 547 FileAssociator.removeAssociation("HEX"); 548 } 549 547 FileAssociator.removeAssociation("HEX"); 548 } 549 550 550 } 551 551 }
Note: See TracChangeset
for help on using the changeset viewer.