mirror of
https://github.com/johndoe6345789/tustu.git
synced 2026-04-24 13:45:00 +00:00
- 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.
61 lines
2.1 KiB
Java
61 lines
2.1 KiB
Java
package com.efiAnalytics.ui;
|
|
|
|
import java.awt.datatransfer.Transferable;
|
|
import javax.swing.JComponent;
|
|
import javax.swing.JTable;
|
|
import javax.swing.TransferHandler;
|
|
import javax.swing.plaf.UIResource;
|
|
|
|
class TableTransferHandler extends TransferHandler implements UIResource {
|
|
TableTransferHandler(S paramS) {}
|
|
|
|
protected Transferable createTransferable(JComponent paramJComponent) {
|
|
if (paramJComponent instanceof JTable) {
|
|
int[] arrayOfInt1;
|
|
int[] arrayOfInt2;
|
|
JTable jTable = (JTable)paramJComponent;
|
|
if (!jTable.getRowSelectionAllowed() && !jTable.getColumnSelectionAllowed())
|
|
return null;
|
|
if (!jTable.getRowSelectionAllowed()) {
|
|
int i = jTable.getRowCount();
|
|
arrayOfInt1 = new int[i];
|
|
for (byte b1 = 0; b1 < i; b1++)
|
|
arrayOfInt1[b1] = b1;
|
|
} else {
|
|
arrayOfInt1 = jTable.getSelectedRows();
|
|
}
|
|
if (!jTable.getColumnSelectionAllowed()) {
|
|
int i = jTable.getColumnCount();
|
|
arrayOfInt2 = new int[i];
|
|
for (byte b1 = 0; b1 < i; b1++)
|
|
arrayOfInt2[b1] = b1;
|
|
} else {
|
|
arrayOfInt2 = jTable.getSelectedColumns();
|
|
}
|
|
if (arrayOfInt1 == null || arrayOfInt2 == null || arrayOfInt1.length == 0 || arrayOfInt2.length == 0)
|
|
return null;
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
for (byte b = 0; b < arrayOfInt1.length; b++) {
|
|
for (byte b1 = 0; b1 < arrayOfInt2.length; b1++) {
|
|
Object object = jTable.getValueAt(arrayOfInt1[b], arrayOfInt2[b1]);
|
|
String str = (object == null) ? "" : object.toString();
|
|
stringBuilder.append(str).append("\t");
|
|
}
|
|
stringBuilder.deleteCharAt(stringBuilder.length() - 1).append("\n");
|
|
}
|
|
stringBuilder.deleteCharAt(stringBuilder.length() - 1);
|
|
return new ad(this, stringBuilder);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public int getSourceActions(JComponent paramJComponent) {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|
|
/* Location: /home/rewrich/Downloads/TunerStudioMS/TunerStudioMS/!/com/efiAnalytics/ui/ac.class
|
|
* Java compiler version: 8 (52.0)
|
|
* JD-Core Version: 1.1.3
|
|
*/ |