Files
tustu/app/com/efiAnalytics/tuningwidgets/panels/ControllerSelectorPanel.java
johndoe6345789 dae4c29c01 Add new panels and UI components for thermistor calibration and weight input
- Implemented RestorePointsExclusionFilter for file filtering.
- Created SensorComboBoxItemListener to handle sensor selection events.
- Developed TableAxisDisplayPanel for displaying axis data in a table format.
- Added TemperatureUnitActionListener to manage temperature unit changes.
- Introduced ThermistorCalibrationPanel for thermistor calibration functionality.
- Created WeightFieldFocusAdapter to manage focus events in weight input fields.
- Added WeightInputPanel for inputting weight in both pounds and kilograms.
- Removed obsolete aK panel class.
- Introduced DisabledButton class to create non-interactive buttons.
- Added FormattedTableCellRenderer for custom table cell rendering.
- Implemented NoSelectionModel to prevent selection in specific tables.
- Created NonEditableTable to disable editing in tables.
- Added StringTransferable for handling string data transfer.
- Implemented TableCenterCellEditor for centered text in table cells.
- Developed TableTransferHandler for managing data transfer in tables.
2026-01-11 06:19:41 +00:00

148 lines
4.9 KiB
Java

package com.efiAnalytics.tuningwidgets.panels;
import G.R;
import G.T;
import G.bT;
import W.aa;
import W.z;
import bH.D;
import com.efiAnalytics.ui.ck;
import com.efiAnalytics.ui.fp;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.io.File;
import java.net.URLDecoder;
import java.text.DateFormat;
import java.util.Enumeration;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.AbstractButton;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JTextPane;
import javax.swing.UIManager;
import r.a;
import s.g;
public class ControllerSelectorPanel extends ck {
ButtonGroup a = new ButtonGroup();
JTextPane b = new JTextPane();
private String d = "";
JPanel c = null;
private boolean e = false;
public ac(String[] paramArrayOfString, String paramString) {
setBorder(BorderFactory.createTitledBorder("Controller"));
this.c = new JPanel();
this.c.setLayout(new GridLayout(0, 1));
if (paramArrayOfString != null)
for (byte b = 0; b < paramArrayOfString.length; b++) {
JRadioButton jRadioButton = new JRadioButton(paramArrayOfString[b]);
jRadioButton.setActionCommand(paramArrayOfString[b]);
this.a.add(jRadioButton);
this.c.add(jRadioButton);
if (paramString != null && paramArrayOfString[b].equals(paramString))
this.a.setSelected(jRadioButton.getModel(), true);
}
setLayout(new BorderLayout());
add("North", this.c);
add("Center", this.b);
this.b.setBackground(getBackground());
this.b.setForeground(UIManager.getColor("Label.foreground"));
this.b.setBorder(BorderFactory.createEtchedBorder());
}
public String a() {
return this.a.getSelection().getActionCommand();
}
public void a(String paramString) {
Enumeration<AbstractButton> enumeration = this.a.getElements();
while (enumeration.hasMoreElements()) {
AbstractButton abstractButton = enumeration.nextElement();
this.a.setSelected(abstractButton.getModel(), abstractButton.getText().equals(paramString));
}
fp.a(this.c, false);
}
public void b(String paramString) {
Enumeration<AbstractButton> enumeration = this.a.getElements();
while (enumeration.hasMoreElements()) {
AbstractButton abstractButton = enumeration.nextElement();
if (abstractButton.getActionCommand().equals(paramString))
this.a.setSelected(abstractButton.getModel(), true);
}
}
public void a(File paramFile) {
if (paramFile != null) {
if (this.d.length() > 0) {
this.b.setText(b() + "\n\n" + c(paramFile));
} else {
this.b.setText(c(paramFile));
}
String str = z.a(paramFile);
String[] arrayOfString = T.a().d();
if (arrayOfString != null)
for (byte b = 0; b < arrayOfString.length; b++) {
R r = T.a().c(arrayOfString[b]);
if (r.i().equals(str))
b(arrayOfString[b]);
}
} else {
this.b.setText(b());
}
}
protected String c(File paramFile) {
try {
String str = g.b("Unrecognized file type");
if (paramFile.getName().toLowerCase().endsWith("." + a.cw.toLowerCase()) || paramFile.getName().toLowerCase().endsWith("." + a.cz.toLowerCase()) || paramFile.getName().toLowerCase().indexOf(".ini") != -1 || paramFile.getName().toLowerCase().indexOf(".ecu") != -1) {
str = "Selected File Info:\n\n";
try {
bT bT = (new aa()).a(paramFile);
if (bT.c() != null && bT.c().length() > 0) {
String str1 = URLDecoder.decode(bT.c(), "UTF-8");
str = str + "Firmware:\n" + str1 + "\n\n";
}
str = str + "Signature:\n" + bT.b() + "\n\nLast Modified : " + DateFormat.getDateInstance(2).format(Long.valueOf(paramFile.lastModified()));
} catch (Exception exception) {}
} else if (paramFile.getName().toLowerCase().endsWith("." + a.C)) {
str = "Selected File Info:\n\nOld style BigComm tune file.\nLast Modified : " + DateFormat.getDateInstance(2).format(Long.valueOf(paramFile.lastModified()));
}
return str;
} catch (Exception exception) {
Logger.getLogger(ControllerSelectorPanel.class.getName()).log(Level.SEVERE, (String)null, exception);
return g.b("Unrecognized file type");
}
}
public void b(File paramFile) {
D.c("Directory Selected: " + paramFile.getAbsolutePath());
}
public String b() {
return this.d;
}
public void c(String paramString) {
this.d = paramString;
this.b.setText(paramString);
}
public void a(boolean paramBoolean) {
this.e = paramBoolean;
}
}
/* Location: /home/rewrich/Downloads/TunerStudioMS/TunerStudioMS/!/com/efiAnalytics/tuningwidgets/panels/ac.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/