mirror of https://github.com/rusefi/RomRaider.git
Internationalize AbstractAction Class and all classes that extend it.
This commit is contained in:
parent
aacc4d68ed
commit
e753e1e987
|
@ -0,0 +1,77 @@
|
||||||
|
# AboutAction
|
||||||
|
ABOUT = About {0}
|
||||||
|
VERSIONSTR = {0} - ECU Logger\nVersion: {1}\nBuild #: {2}\n{3}\nLogger Def Version: {4}
|
||||||
|
|
||||||
|
# GenericPluginMenuAction
|
||||||
|
PLUGINSETTINGS = {0} Plugin Settings
|
||||||
|
SELECTPORT = Select COM port:
|
||||||
|
|
||||||
|
# GlobalAdjustmentAction
|
||||||
|
GAATITLE = Adjust ECU Global Parameters
|
||||||
|
GAACONFIRM = Do you want to adjust the ECU's Global Timing or Idle RPM values?
|
||||||
|
GAASUCCESSMSG = ECU global adjustment successful!
|
||||||
|
GAAERRORMSG = Error performing ECU Global Timing or Idle RPM adjustment.\nCheck the following:\n* Logger has successfully connected to the ECU\n* Correct COM port is selected (if not Openport 2)\n* CAN bus logging mode is disabled\n* Cable is connected properly\n* Ignition is ON\n* Logger definition XML file is up to date\n
|
||||||
|
GAACANCELMSG = User cancelled ECU global adjustments.
|
||||||
|
|
||||||
|
# LearningTableValuesAction
|
||||||
|
LTVTITLE = Learning Table Values
|
||||||
|
LTVINITMSG = To read Learning Table Values the Logger must first initialize with the\n{0}. Press the Restart button to connect with the Logger then try\nreading the Learning Table Values again.\n
|
||||||
|
LTVINTTITLE = Not Initialized
|
||||||
|
LTVINTERRUPT = Interrupt Logging to read the Learning Table values?
|
||||||
|
|
||||||
|
# LoadProfileAction
|
||||||
|
LPASUCCESS = Profile successfully loaded: {0}
|
||||||
|
|
||||||
|
# LogFileLocationAction
|
||||||
|
LFLAUPDATE = Log file output location successfully updated: {0}
|
||||||
|
|
||||||
|
# LogFileNumberFormatAction
|
||||||
|
LFNFATITLE = Log File Number Format Change
|
||||||
|
LFNFAMSG = The Logger has been set to use the {0} number format.\n\nExit and restart the Logger to apply the new setting.
|
||||||
|
|
||||||
|
# LoggerDefinitionLocationAction
|
||||||
|
LDLASUCCESS = Logger definition location successfully updated: {0}
|
||||||
|
|
||||||
|
# ReadEcuCodesAction
|
||||||
|
RECADEFERROR = To read diagnostic codes the Logger requires a logger definition\nXML file containing compatible DTC parameter definitions.\nUse the Help menu 'Update Logger Definition' item to\ngo online and download the latest logger definition.\n
|
||||||
|
RECADEFERRORTITLE = Definition Error
|
||||||
|
RECANOINIT = To read diagnostic codes the Logger must first initialize with the\n{0}. Press the Restart button to connect with the Logger then\ntry reading the codes again.\n
|
||||||
|
RECANOINITTITLE = Not Initialized
|
||||||
|
RECACONFIRM = Do you want to read the {0} diagnostic codes?
|
||||||
|
RECACONFIRMTITLE = Read {0} diagnostic codes
|
||||||
|
RECANOCODES = No diagnostic codes set
|
||||||
|
RECANOCODESTILTE = Read Success
|
||||||
|
RECAREADERROR = Error reading {0} diagnostic codes.\nCheck the following:\n* Logger has successfully connected to the ECU\n* Correct COM port is selected (if not Openport 2)\n* Cable is connected properly\n* Ignition is ON\n* Logger definition XML file is up to date
|
||||||
|
RECAREADERRORTITLE = Error Read {0}
|
||||||
|
RECAREPORTERROR = Error performing {0} codes read
|
||||||
|
|
||||||
|
# ResetEcuAction
|
||||||
|
REATITLE = Reset {0}
|
||||||
|
REACONFIM = Do you want to reset the {0}?
|
||||||
|
REASUCCESS = Reset Successful!\nTurn your ignition OFF and then\nback ON to complete the process.
|
||||||
|
REAERROR = Error performing {0} reset.\nCheck the following:\n* Correct COM port selected\n* Cable is connected properly\n* Ignition is ON\n* Logger is stopped
|
||||||
|
REAREPORTERROR = Error performing {0} reset
|
||||||
|
|
||||||
|
# SaveProfileAsAction & SaveProfileAction
|
||||||
|
SPATITLE = Profile: {0}
|
||||||
|
SPAMSG = Profile successfully saved: {0}
|
||||||
|
SPAACONFIRM = {0} already exists! Overwrite?
|
||||||
|
|
||||||
|
# SelectProtocolAction
|
||||||
|
SPRABTN = Select
|
||||||
|
SPRATITLE = Communications Settings
|
||||||
|
SPRACANCEL = Cancel
|
||||||
|
SPRATRANSPORT = Select the transport to use under the desired protocol to query the target control module
|
||||||
|
SPRATREE = Protocol and Transport Selection
|
||||||
|
SPRACONFIRM = Are you sure you want to change the logging protocol?
|
||||||
|
SPRACONFIRMTITLE = Confirm new selection
|
||||||
|
|
||||||
|
# Lm2MtsPluginMenuAction
|
||||||
|
LPMAPORT = Select MTS port:
|
||||||
|
LPMAPORTTITLE = {0} Plugin Settings
|
||||||
|
LPMANOPORTS = -1 - [ no ports found ]
|
||||||
|
LPMAPORTS = {0,number,integer} - [ {1}: {2,number,integer} sensors ]
|
||||||
|
|
||||||
|
# IntfKitPluginMenuAction
|
||||||
|
IPMAMSG = Un-select each updated External Phidget data item on each Data,\nGraph and Dashboard Logger tabs to complete the update.\n\nLogging profiles using the old Phidget settings must be loaded\nand re-saved with the new settings.
|
||||||
|
IPMAMSGTITLE = Phidget InterfaceKit Settings Applied
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2012 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -28,6 +28,7 @@ import gnu.io.CommPortIdentifier;
|
||||||
import static javax.swing.JOptionPane.QUESTION_MESSAGE;
|
import static javax.swing.JOptionPane.QUESTION_MESSAGE;
|
||||||
import static javax.swing.JOptionPane.showInputDialog;
|
import static javax.swing.JOptionPane.showInputDialog;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.text.MessageFormat;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public final class GenericPluginMenuAction extends AbstractAction {
|
public final class GenericPluginMenuAction extends AbstractAction {
|
||||||
|
@ -42,8 +43,9 @@ public final class GenericPluginMenuAction extends AbstractAction {
|
||||||
public void actionPerformed(ActionEvent actionEvent) {
|
public void actionPerformed(ActionEvent actionEvent) {
|
||||||
String port = (String) showInputDialog(
|
String port = (String) showInputDialog(
|
||||||
logger,
|
logger,
|
||||||
"Select COM port:",
|
rb.getString("SELECTPORT"),
|
||||||
dataSource.getName() + " Plugin Settings",
|
MessageFormat.format(
|
||||||
|
rb.getString("PLUGINSETTINGS"), dataSource.getName()),
|
||||||
QUESTION_MESSAGE,
|
QUESTION_MESSAGE,
|
||||||
null,
|
null,
|
||||||
getPorts(),
|
getPorts(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2015 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -66,8 +66,8 @@ public final class GlobalAdjustmentAction extends AbstractAction {
|
||||||
|
|
||||||
private final int showConfirmation() {
|
private final int showConfirmation() {
|
||||||
return showConfirmDialog(logger,
|
return showConfirmDialog(logger,
|
||||||
"Do you want to adjust the ECU's Global Timing or Idle RPM values?",
|
rb.getString("GAACONFIRM"),
|
||||||
"Adjust ECU Global Parameters",
|
rb.getString("GAATITLE"),
|
||||||
YES_NO_OPTION,
|
YES_NO_OPTION,
|
||||||
QUESTION_MESSAGE);
|
QUESTION_MESSAGE);
|
||||||
}
|
}
|
||||||
|
@ -76,26 +76,20 @@ public final class GlobalAdjustmentAction extends AbstractAction {
|
||||||
final int result = doAdjustEcu();
|
final int result = doAdjustEcu();
|
||||||
if (result == 1) {
|
if (result == 1) {
|
||||||
showMessageDialog(logger,
|
showMessageDialog(logger,
|
||||||
"ECU global adjustment successful !",
|
rb.getString("GAASUCCESSMSG"),
|
||||||
"Adjust ECU Global Parameters",
|
rb.getString("GAATITLE"),
|
||||||
INFORMATION_MESSAGE);
|
INFORMATION_MESSAGE);
|
||||||
}
|
}
|
||||||
else if (result == 0) {
|
else if (result == 0) {
|
||||||
showMessageDialog(logger,
|
showMessageDialog(logger,
|
||||||
"Error performing ECU Global Timing or Idle RPM adjustment.\n" +
|
rb.getString("GAAERRORMSG"),
|
||||||
"Check the following:\n" +
|
rb.getString("GAATITLE"),
|
||||||
"* Logger has successfully conencted to the ECU\n" +
|
|
||||||
"* Correct COM port is selected (if not Openport 2)\n" +
|
|
||||||
"* CAN bus logging mode is disabled\n" +
|
|
||||||
"* Cable is connected properly\n* Ignition is ON\n" +
|
|
||||||
"* Logger definition XML file is up to date\n",
|
|
||||||
"Adjust ECU Global Parameters",
|
|
||||||
ERROR_MESSAGE);
|
ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
if (result == -1) {
|
if (result == -1) {
|
||||||
showMessageDialog(logger,
|
showMessageDialog(logger,
|
||||||
"User cancelled ECU global adjustments.",
|
rb.getString("GAACANCELMSG"),
|
||||||
"Adjust ECU Global Parameters",
|
rb.getString("GAATITLE"),
|
||||||
INFORMATION_MESSAGE);
|
INFORMATION_MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2013 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -27,6 +27,7 @@ import static javax.swing.JOptionPane.showConfirmDialog;
|
||||||
import static javax.swing.JOptionPane.showMessageDialog;
|
import static javax.swing.JOptionPane.showMessageDialog;
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import com.romraider.logger.ecu.EcuLogger;
|
import com.romraider.logger.ecu.EcuLogger;
|
||||||
import com.romraider.swing.menubar.action.AbstractAction;
|
import com.romraider.swing.menubar.action.AbstractAction;
|
||||||
|
@ -38,14 +39,10 @@ public final class LearningTableValuesAction extends AbstractAction {
|
||||||
|
|
||||||
public final void actionPerformed(ActionEvent actionEvent) {
|
public final void actionPerformed(ActionEvent actionEvent) {
|
||||||
if (!logger.isEcuInit()) {
|
if (!logger.isEcuInit()) {
|
||||||
final String notInit = "To read Learning Table Values the " +
|
|
||||||
"Logger must first intialize with the\n" +
|
|
||||||
logger.getTarget() +
|
|
||||||
". Press the Restart button to connect with the Logger then try\n" +
|
|
||||||
"reading the Learning Table Values again.\n";
|
|
||||||
showMessageDialog(logger,
|
showMessageDialog(logger,
|
||||||
notInit,
|
MessageFormat.format(
|
||||||
"Not Initialized", ERROR_MESSAGE);
|
rb.getString("LTVINITMSG"), logger.getTarget()),
|
||||||
|
rb.getString("LTVINTTITLE"), ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!logger.isLogging() ||
|
if (!logger.isLogging() ||
|
||||||
|
@ -59,8 +56,8 @@ public final class LearningTableValuesAction extends AbstractAction {
|
||||||
|
|
||||||
private final int showConfirmation() {
|
private final int showConfirmation() {
|
||||||
return showConfirmDialog(logger,
|
return showConfirmDialog(logger,
|
||||||
"Interrupt Logging to read the Learning Table values?",
|
rb.getString("LTVINTERRUPT"),
|
||||||
"Learning Table Values",
|
rb.getString("LTVTITLE"),
|
||||||
YES_NO_OPTION,
|
YES_NO_OPTION,
|
||||||
QUESTION_MESSAGE);
|
QUESTION_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2014 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -24,6 +24,7 @@ import static com.romraider.logger.ecu.ui.swing.menubar.util.FileHelper.getProfi
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
|
|
||||||
|
@ -54,9 +55,9 @@ public final class LoadProfileAction extends AbstractAction {
|
||||||
if (logger.loadUserProfile(profileFilePath)) {
|
if (logger.loadUserProfile(profileFilePath)) {
|
||||||
logger.getSettings().setLoggerProfileFilePath(profileFilePath);
|
logger.getSettings().setLoggerProfileFilePath(profileFilePath);
|
||||||
logger.restartLogging();
|
logger.restartLogging();
|
||||||
logger.reportMessage("Profile succesfully loaded: " + profileFilePath);
|
logger.reportMessage(MessageFormat.format(
|
||||||
|
rb.getString("LPASUCCESS"), profileFilePath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2013 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -25,6 +25,7 @@ import static javax.swing.JFileChooser.APPROVE_OPTION;
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
|
|
||||||
|
@ -53,7 +54,8 @@ public final class LogFileLocationAction extends AbstractAction {
|
||||||
if (fc.showOpenDialog(logger) == APPROVE_OPTION) {
|
if (fc.showOpenDialog(logger) == APPROVE_OPTION) {
|
||||||
String loggerOutputDirPath = fc.getSelectedFile().getAbsolutePath();
|
String loggerOutputDirPath = fc.getSelectedFile().getAbsolutePath();
|
||||||
logger.getSettings().setLoggerOutputDirPath(loggerOutputDirPath);
|
logger.getSettings().setLoggerOutputDirPath(loggerOutputDirPath);
|
||||||
logger.reportMessage("Log file output location successfully updated: " + loggerOutputDirPath);
|
logger.reportMessage(MessageFormat.format(
|
||||||
|
rb.getString("LFLAUPDATE"), loggerOutputDirPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2013 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -23,6 +23,7 @@ import static javax.swing.JOptionPane.INFORMATION_MESSAGE;
|
||||||
import static javax.swing.JOptionPane.showMessageDialog;
|
import static javax.swing.JOptionPane.showMessageDialog;
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import com.romraider.logger.ecu.EcuLogger;
|
import com.romraider.logger.ecu.EcuLogger;
|
||||||
import com.romraider.swing.menubar.action.AbstractAction;
|
import com.romraider.swing.menubar.action.AbstractAction;
|
||||||
|
@ -43,10 +44,9 @@ public final class LogFileNumberFormatAction extends AbstractAction {
|
||||||
else {
|
else {
|
||||||
logger.getSettings().setLocale(SYSTEM_NUMFORMAT);
|
logger.getSettings().setLocale(SYSTEM_NUMFORMAT);
|
||||||
}
|
}
|
||||||
showMessageDialog(logger, "The Logger has been set to use the " +
|
showMessageDialog(logger, MessageFormat.format(
|
||||||
logger.getSettings().getLocale() + " number format.\n\n" +
|
rb.getString("LFNFAMSG"), logger.getSettings().getLocale()),
|
||||||
"Exit and restart the Logger to apply the new setting.",
|
rb.getString("LFNFATITLE"), INFORMATION_MESSAGE);
|
||||||
"Log File Number Format Change", INFORMATION_MESSAGE);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.reportError(e);
|
logger.reportError(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2012 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -25,6 +25,7 @@ import static javax.swing.JFileChooser.APPROVE_OPTION;
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
|
|
||||||
|
@ -55,7 +56,8 @@ public final class LoggerDefinitionLocationAction extends AbstractAction {
|
||||||
if (fc.showOpenDialog(logger) == APPROVE_OPTION) {
|
if (fc.showOpenDialog(logger) == APPROVE_OPTION) {
|
||||||
String path = fc.getSelectedFile().getAbsolutePath();
|
String path = fc.getSelectedFile().getAbsolutePath();
|
||||||
logger.getSettings().setLoggerDefinitionFilePath(path);
|
logger.getSettings().setLoggerDefinitionFilePath(path);
|
||||||
logger.reportMessage("Logger definition location successfully updated: " + path);
|
logger.reportMessage(MessageFormat.format(
|
||||||
|
rb.getString("LDLASUCCESS"), path));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2014 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -28,6 +28,7 @@ import static javax.swing.JOptionPane.showConfirmDialog;
|
||||||
import static javax.swing.JOptionPane.showMessageDialog;
|
import static javax.swing.JOptionPane.showMessageDialog;
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import com.romraider.logger.ecu.EcuLogger;
|
import com.romraider.logger.ecu.EcuLogger;
|
||||||
import com.romraider.swing.menubar.action.AbstractAction;
|
import com.romraider.swing.menubar.action.AbstractAction;
|
||||||
|
@ -39,24 +40,14 @@ public final class ReadEcuCodesAction extends AbstractAction {
|
||||||
|
|
||||||
public final void actionPerformed(ActionEvent actionEvent) {
|
public final void actionPerformed(ActionEvent actionEvent) {
|
||||||
if (logger.getDtcodesEmpty()) {
|
if (logger.getDtcodesEmpty()) {
|
||||||
final String wrongDefVersion = "To read diagnostic codes the " +
|
|
||||||
"Logger requires a logger definfition\n" +
|
|
||||||
"XML file containing compatible DTC parameter definitions.\n" +
|
|
||||||
"Use the Help menu 'Update Logger Definition' item to\n" +
|
|
||||||
"go online and download the latest logger definition.\n";
|
|
||||||
showMessageDialog(logger,
|
showMessageDialog(logger,
|
||||||
wrongDefVersion,
|
rb.getString("RECADEFERROR"),
|
||||||
"Definition Error", ERROR_MESSAGE);
|
rb.getString("RECADEFERRORTITLE"), ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
else if (!logger.isEcuInit()) {
|
else if (!logger.isEcuInit()) {
|
||||||
final String notInit = "To read diagnostic codes the " +
|
showMessageDialog(logger,MessageFormat.format(
|
||||||
"Logger must first intialize with the\n" +
|
rb.getString("RECANOINIT"), logger.getTarget()),
|
||||||
logger.getTarget() +
|
rb.getString("RECANOINITTITLE"), ERROR_MESSAGE);
|
||||||
". Press the Restart button to connect with the Logger then\n" +
|
|
||||||
"try reading the codes again.\n";
|
|
||||||
showMessageDialog(logger,
|
|
||||||
notInit,
|
|
||||||
"Not Initialized", ERROR_MESSAGE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final boolean logging = logger.isLogging();
|
final boolean logging = logger.isLogging();
|
||||||
|
@ -71,9 +62,10 @@ public final class ReadEcuCodesAction extends AbstractAction {
|
||||||
private final int showConfirmation() {
|
private final int showConfirmation() {
|
||||||
return showConfirmDialog(
|
return showConfirmDialog(
|
||||||
logger,
|
logger,
|
||||||
"Do you want to read the " + logger.getTarget() +
|
MessageFormat.format(
|
||||||
" diagnostic codes?",
|
rb.getString("RECACONFIRM"), logger.getTarget()),
|
||||||
"Read " + logger.getTarget() + " diagnostic codes",
|
MessageFormat.format(
|
||||||
|
rb.getString("RECACONFIRMTITLE"), logger.getTarget()),
|
||||||
YES_NO_OPTION, WARNING_MESSAGE);
|
YES_NO_OPTION, WARNING_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,19 +74,18 @@ public final class ReadEcuCodesAction extends AbstractAction {
|
||||||
if (result == -1) {
|
if (result == -1) {
|
||||||
showMessageDialog(
|
showMessageDialog(
|
||||||
logger,
|
logger,
|
||||||
"No diagnostic codes set.", "Read Success",
|
rb.getString("RECANOCODES"),
|
||||||
|
rb.getString("RECANOCODESTILTE"),
|
||||||
INFORMATION_MESSAGE);
|
INFORMATION_MESSAGE);
|
||||||
}
|
}
|
||||||
else if (result == 0) {
|
else if (result == 0) {
|
||||||
showMessageDialog(
|
showMessageDialog(
|
||||||
logger,
|
logger,
|
||||||
"Error reading " + logger.getTarget() + " diagnostic codes.\n" +
|
MessageFormat.format(
|
||||||
"Check the following:\n" +
|
rb.getString("RECAREADERROR"), logger.getTarget()),
|
||||||
"* Logger has successfully conencted to the ECU\n" +
|
MessageFormat.format(
|
||||||
"* Correct COM port is selected (if not Openport 2)\n" +
|
rb.getString("RECAREADERRORTITLE"), logger.getTarget()),
|
||||||
"* Cable is connected properly\n* Ignition is ON\n* " +
|
ERROR_MESSAGE);
|
||||||
"* Logger definition XML file is up to date",
|
|
||||||
"Error Read " + logger.getTarget(), ERROR_MESSAGE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +94,10 @@ public final class ReadEcuCodesAction extends AbstractAction {
|
||||||
return logger.readEcuCodes();
|
return logger.readEcuCodes();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.reportError(
|
logger.reportError(
|
||||||
"Error performing " + logger.getTarget() + " codes read", e);
|
MessageFormat.format(
|
||||||
|
rb.getString("RECAREPORTERROR"),
|
||||||
|
logger.getTarget()),
|
||||||
|
e);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2015 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -30,6 +30,7 @@ import static javax.swing.JOptionPane.YES_NO_OPTION;
|
||||||
import static javax.swing.JOptionPane.showConfirmDialog;
|
import static javax.swing.JOptionPane.showConfirmDialog;
|
||||||
import static javax.swing.JOptionPane.showMessageDialog;
|
import static javax.swing.JOptionPane.showMessageDialog;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
public final class ResetEcuAction extends AbstractAction {
|
public final class ResetEcuAction extends AbstractAction {
|
||||||
public ResetEcuAction(EcuLogger logger) {
|
public ResetEcuAction(EcuLogger logger) {
|
||||||
|
@ -51,16 +52,29 @@ public final class ResetEcuAction extends AbstractAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int showConfirmation() {
|
private int showConfirmation() {
|
||||||
return showConfirmDialog(logger, "Do you want to reset the " + logger.getTarget() + "?", "Reset " + logger.getTarget(), YES_NO_OPTION, WARNING_MESSAGE);
|
return showConfirmDialog(logger,
|
||||||
|
MessageFormat.format(
|
||||||
|
rb.getString("REACONFIM"), logger.getTarget()),
|
||||||
|
MessageFormat.format(
|
||||||
|
rb.getString("REATITLE"), logger.getTarget()),
|
||||||
|
YES_NO_OPTION,
|
||||||
|
WARNING_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resetEcu(int resetCode) {
|
private void resetEcu(int resetCode) {
|
||||||
if (doReset(resetCode)) {
|
if (doReset(resetCode)) {
|
||||||
showMessageDialog(logger, "Reset Successful!\nTurn your ignition OFF and then\nback ON to complete the process.",
|
showMessageDialog(logger,
|
||||||
"Reset " + logger.getTarget(), INFORMATION_MESSAGE);
|
rb.getString("REASUCCESS"),
|
||||||
|
MessageFormat.format(
|
||||||
|
rb.getString("REATITLE"), logger.getTarget()),
|
||||||
|
INFORMATION_MESSAGE);
|
||||||
} else {
|
} else {
|
||||||
showMessageDialog(logger, "Error performing " + logger.getTarget() + " reset.\nCheck the following:\n* Correct COM port selected\n" +
|
showMessageDialog(logger,
|
||||||
"* Cable is connected properly\n* Ignition is ON\n* Logger is stopped", "Reset " + logger.getTarget(), ERROR_MESSAGE);
|
MessageFormat.format(
|
||||||
|
rb.getString("REAERROR"), logger.getTarget()),
|
||||||
|
MessageFormat.format(
|
||||||
|
rb.getString("REATITLE"), logger.getTarget()),
|
||||||
|
ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +82,9 @@ public final class ResetEcuAction extends AbstractAction {
|
||||||
try {
|
try {
|
||||||
return logger.resetEcu(resetCode);
|
return logger.resetEcu(resetCode);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.reportError("Error performing " + logger.getTarget() + " reset", e);
|
logger.reportError(MessageFormat.format(
|
||||||
|
rb.getString("REAREPORTERROR"), logger.getTarget()),
|
||||||
|
e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2012 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -23,6 +23,7 @@ import static com.romraider.logger.ecu.ui.swing.menubar.util.FileHelper.saveProf
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import com.romraider.logger.ecu.EcuLogger;
|
import com.romraider.logger.ecu.EcuLogger;
|
||||||
import com.romraider.swing.menubar.action.AbstractAction;
|
import com.romraider.swing.menubar.action.AbstractAction;
|
||||||
|
@ -48,7 +49,9 @@ public final class SaveProfileAction extends AbstractAction {
|
||||||
File lastProfileFile = new File(SettingsManager.getSettings().getLoggerProfileFilePath());
|
File lastProfileFile = new File(SettingsManager.getSettings().getLoggerProfileFilePath());
|
||||||
String profileFilePath = saveProfileToFile(logger.getCurrentProfile(), lastProfileFile);
|
String profileFilePath = saveProfileToFile(logger.getCurrentProfile(), lastProfileFile);
|
||||||
logger.getSettings().setLoggerProfileFilePath(profileFilePath);
|
logger.getSettings().setLoggerProfileFilePath(profileFilePath);
|
||||||
logger.reportMessageInTitleBar("Profile: " + profileFilePath);
|
logger.reportMessageInTitleBar(MessageFormat.format(
|
||||||
logger.reportMessage("Profile succesfully saved: " + profileFilePath);
|
rb.getString("SPATITLE"), profileFilePath));
|
||||||
|
logger.reportMessage(MessageFormat.format(
|
||||||
|
rb.getString("SPAMSG"), profileFilePath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2012 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -28,6 +28,7 @@ import static javax.swing.JOptionPane.showConfirmDialog;
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
|
|
||||||
|
@ -56,11 +57,17 @@ public final class SaveProfileAsAction extends AbstractAction {
|
||||||
JFileChooser fc = getProfileFileChooser(lastProfileFile);
|
JFileChooser fc = getProfileFileChooser(lastProfileFile);
|
||||||
if (fc.showSaveDialog(logger) == APPROVE_OPTION) {
|
if (fc.showSaveDialog(logger) == APPROVE_OPTION) {
|
||||||
File selectedFile = fc.getSelectedFile();
|
File selectedFile = fc.getSelectedFile();
|
||||||
if (!selectedFile.exists() || showConfirmDialog(logger, selectedFile.getName() + " already exists! Overwrite?") == OK_OPTION) {
|
if (!selectedFile.exists() ||
|
||||||
|
showConfirmDialog(logger,
|
||||||
|
MessageFormat.format(
|
||||||
|
rb.getString("SPAACONFIRM"),
|
||||||
|
selectedFile.getName())) == OK_OPTION) {
|
||||||
String profileFilePath = saveProfileToFile(logger.getCurrentProfile(), selectedFile);
|
String profileFilePath = saveProfileToFile(logger.getCurrentProfile(), selectedFile);
|
||||||
logger.getSettings().setLoggerProfileFilePath(profileFilePath);
|
logger.getSettings().setLoggerProfileFilePath(profileFilePath);
|
||||||
logger.reportMessageInTitleBar("Profile: " + profileFilePath);
|
logger.reportMessageInTitleBar(MessageFormat.format(
|
||||||
logger.reportMessage("Profile succesfully saved as: " + profileFilePath);
|
rb.getString("SPATITLE"), profileFilePath));
|
||||||
|
logger.reportMessage(MessageFormat.format(
|
||||||
|
rb.getString("SPAMSG"), profileFilePath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2015 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -71,13 +71,13 @@ public final class SelectProtocolAction extends AbstractAction {
|
||||||
|
|
||||||
private class CommSettings extends JDialog {
|
private class CommSettings extends JDialog {
|
||||||
private static final long serialVersionUID = -6226102628115868401L;
|
private static final long serialVersionUID = -6226102628115868401L;
|
||||||
private final JButton selectButton = new JButton("Select");
|
private final JButton selectButton = new JButton(rb.getString("SPRABTN"));
|
||||||
private final Map<String, Map<Transport, Collection<Module>>> protocolList;
|
private final Map<String, Map<Transport, Collection<Module>>> protocolList;
|
||||||
private TreePath selectedPath;
|
private TreePath selectedPath;
|
||||||
|
|
||||||
private CommSettings() {
|
private CommSettings() {
|
||||||
this.protocolList = logger.getProtocolList();
|
this.protocolList = logger.getProtocolList();
|
||||||
setTitle("Communications Settings");
|
setTitle(rb.getString("SPRATITLE"));
|
||||||
setModalityType(ModalityType.APPLICATION_MODAL);
|
setModalityType(ModalityType.APPLICATION_MODAL);
|
||||||
setIconImage(logger.getIconImage());
|
setIconImage(logger.getIconImage());
|
||||||
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
|
||||||
|
@ -108,7 +108,7 @@ public final class SelectProtocolAction extends AbstractAction {
|
||||||
buttonPane.add(selectButton);
|
buttonPane.add(selectButton);
|
||||||
getRootPane().setDefaultButton(selectButton);
|
getRootPane().setDefaultButton(selectButton);
|
||||||
|
|
||||||
final JButton cancelButton = new JButton("Cancel");
|
final JButton cancelButton = new JButton(rb.getString("SPRACANCEL"));
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
@ -147,8 +147,7 @@ public final class SelectProtocolAction extends AbstractAction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return "Select the transport to use under the desired " +
|
return rb.getString("SPRATRANSPORT");
|
||||||
"protocol to query the target control module";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -212,7 +211,7 @@ public final class SelectProtocolAction extends AbstractAction {
|
||||||
|
|
||||||
private MutableTreeNode buildNodeTree() {
|
private MutableTreeNode buildNodeTree() {
|
||||||
final DefaultMutableTreeNode root;
|
final DefaultMutableTreeNode root;
|
||||||
root = new DefaultMutableTreeNode("Protocol and Transport Selection");
|
root = new DefaultMutableTreeNode(rb.getString("SPRATREE"));
|
||||||
for (String protocol : protocolList.keySet()) {
|
for (String protocol : protocolList.keySet()) {
|
||||||
final DefaultMutableTreeNode protocolNode =
|
final DefaultMutableTreeNode protocolNode =
|
||||||
new DefaultMutableTreeNode(protocol);
|
new DefaultMutableTreeNode(protocol);
|
||||||
|
@ -235,8 +234,8 @@ public final class SelectProtocolAction extends AbstractAction {
|
||||||
|
|
||||||
private final void confirmSelection() {
|
private final void confirmSelection() {
|
||||||
final int result = showConfirmDialog(logger,
|
final int result = showConfirmDialog(logger,
|
||||||
"Are you sure you want to change the logging protocol?",
|
rb.getString("SPRACONFIRM"),
|
||||||
"Confirm new selection",
|
rb.getString("SPRACONFIRMTITLE"),
|
||||||
YES_NO_OPTION,
|
YES_NO_OPTION,
|
||||||
QUESTION_MESSAGE);
|
QUESTION_MESSAGE);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2012 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -27,6 +27,7 @@ import com.romraider.swing.menubar.action.AbstractAction;
|
||||||
import static javax.swing.JOptionPane.QUESTION_MESSAGE;
|
import static javax.swing.JOptionPane.QUESTION_MESSAGE;
|
||||||
import static javax.swing.JOptionPane.showInputDialog;
|
import static javax.swing.JOptionPane.showInputDialog;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.text.MessageFormat;
|
||||||
|
|
||||||
public final class Lm2MtsPluginMenuAction extends AbstractAction {
|
public final class Lm2MtsPluginMenuAction extends AbstractAction {
|
||||||
private final ExternalDataSource dataSource;
|
private final ExternalDataSource dataSource;
|
||||||
|
@ -39,8 +40,9 @@ public final class Lm2MtsPluginMenuAction extends AbstractAction {
|
||||||
public void actionPerformed(ActionEvent actionEvent) {
|
public void actionPerformed(ActionEvent actionEvent) {
|
||||||
String port = (String) showInputDialog(
|
String port = (String) showInputDialog(
|
||||||
logger,
|
logger,
|
||||||
"Select MTS port:",
|
rb.getString("LPMAPORT"),
|
||||||
dataSource.getName() + " Plugin Settings",
|
MessageFormat.format(
|
||||||
|
rb.getString("LPMAPORTTITLE"), dataSource.getName()),
|
||||||
QUESTION_MESSAGE,
|
QUESTION_MESSAGE,
|
||||||
null,
|
null,
|
||||||
getPorts(),
|
getPorts(),
|
||||||
|
@ -59,14 +61,14 @@ public final class Lm2MtsPluginMenuAction extends AbstractAction {
|
||||||
mts.disconnect();
|
mts.disconnect();
|
||||||
int portCount = mts.portCount();
|
int portCount = mts.portCount();
|
||||||
results = new String[portCount];
|
results = new String[portCount];
|
||||||
results[0] = "-1 - [ no ports found ]";
|
results[0] = rb.getString("LPMANOPORTS");
|
||||||
for (int i = 0; i < portCount; i++) {
|
for (int i = 0; i < portCount; i++) {
|
||||||
mts.currentPort(i);
|
mts.currentPort(i);
|
||||||
String name = mts.portName();
|
String name = mts.portName();
|
||||||
mts.connect();
|
mts.connect();
|
||||||
int inputs = mts.inputCount();
|
int inputs = mts.inputCount();
|
||||||
String result = String.format(
|
String result = MessageFormat.format(
|
||||||
"%d - [ %s: %d sesnors ]",
|
rb.getString("LPMAPORTS"),
|
||||||
i, name, inputs);
|
i, name, inputs);
|
||||||
results[i] = result;
|
results[i] = result;
|
||||||
mts.disconnect();
|
mts.disconnect();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2013 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -145,11 +145,8 @@ public final class IntfKitPluginMenuAction extends AbstractAction {
|
||||||
SettingsManager.getSettings().setPhidgetSensors(phidgets);
|
SettingsManager.getSettings().setPhidgetSensors(phidgets);
|
||||||
JOptionPane.showMessageDialog(
|
JOptionPane.showMessageDialog(
|
||||||
logger,
|
logger,
|
||||||
"Un-select each updated External Phidget data item on each Data,\n" +
|
rb.getString("IPMAMSG"),
|
||||||
"Graph and Dashboard Logger tabs to complete the update.\n\n" +
|
rb.getString("IPMAMSGTITLE"),
|
||||||
"Logging profiles using the old Phidget settings must be loaded\n" +
|
JOptionPane.INFORMATION_MESSAGE);
|
||||||
"and re-saved with the new settings.",
|
|
||||||
"Phidget InterfaceKit Settings Applied",
|
|
||||||
JOptionPane.INFORMATION_MESSAGE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2012 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -23,7 +23,7 @@ import static javax.swing.JOptionPane.INFORMATION_MESSAGE;
|
||||||
import static javax.swing.JOptionPane.showMessageDialog;
|
import static javax.swing.JOptionPane.showMessageDialog;
|
||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.text.MessageFormat;
|
||||||
import com.romraider.Version;
|
import com.romraider.Version;
|
||||||
import com.romraider.logger.ecu.EcuLogger;
|
import com.romraider.logger.ecu.EcuLogger;
|
||||||
|
|
||||||
|
@ -34,14 +34,15 @@ public final class AboutAction extends AbstractAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void actionPerformed(final ActionEvent actionEvent) {
|
public void actionPerformed(final ActionEvent actionEvent) {
|
||||||
final String message = String.format(
|
final String message = MessageFormat.format(
|
||||||
"%s - ECU Logger%nVersion: %s%nBuild #: %s%n%s%nLogger Def Version: %s",
|
rb.getString("VERSIONSTR"),
|
||||||
Version.PRODUCT_NAME,
|
Version.PRODUCT_NAME,
|
||||||
Version.VERSION,
|
Version.VERSION,
|
||||||
Version.BUILDNUMBER,
|
Version.BUILDNUMBER,
|
||||||
Version.SUPPORT_URL,
|
Version.SUPPORT_URL,
|
||||||
logger.getDefVersion());
|
logger.getDefVersion());
|
||||||
final String title = "About " + Version.PRODUCT_NAME;
|
final String title = MessageFormat.format(
|
||||||
|
rb.getString("ABOUT"), Version.PRODUCT_NAME);
|
||||||
showMessageDialog(logger, message, title,
|
showMessageDialog(logger, message, title,
|
||||||
INFORMATION_MESSAGE, Version.ABOUT_ICON);
|
INFORMATION_MESSAGE, Version.ABOUT_ICON);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* RomRaider Open-Source Tuning, Logging and Reflashing
|
* RomRaider Open-Source Tuning, Logging and Reflashing
|
||||||
* Copyright (C) 2006-2012 RomRaider.com
|
* Copyright (C) 2006-2019 RomRaider.com
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -20,12 +20,17 @@
|
||||||
package com.romraider.swing.menubar.action;
|
package com.romraider.swing.menubar.action;
|
||||||
|
|
||||||
import com.romraider.logger.ecu.EcuLogger;
|
import com.romraider.logger.ecu.EcuLogger;
|
||||||
|
import com.romraider.util.ResourceUtil;
|
||||||
|
|
||||||
import javax.swing.Action;
|
import javax.swing.Action;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
public abstract class AbstractAction implements Action {
|
public abstract class AbstractAction implements Action {
|
||||||
|
protected static final ResourceBundle rb = new ResourceUtil().getBundle(
|
||||||
|
AbstractAction.class.getName());
|
||||||
public static final String SELECTED_KEY = "selected";
|
public static final String SELECTED_KEY = "selected";
|
||||||
private final Map<String, Object> valueMap = new HashMap<String, Object>();
|
private final Map<String, Object> valueMap = new HashMap<String, Object>();
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
|
|
Loading…
Reference in New Issue