mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Removed useless DESCRIPTION_COL constant
This commit is contained in:
parent
47fcf318b1
commit
71eb3c3ab2
@ -43,7 +43,6 @@ import java.util.stream.Stream;
|
||||
@SuppressWarnings("serial")
|
||||
public class LibrariesIndexTableModel extends FilteredAbstractTableModel<ContributedLibrary> {
|
||||
|
||||
public final static int DESCRIPTION_COL = 0;
|
||||
|
||||
private final List<ContributedLibraryReleases> contributions = new ArrayList<>();
|
||||
|
||||
@ -120,9 +119,7 @@ public class LibrariesIndexTableModel extends FilteredAbstractTableModel<Contrib
|
||||
|
||||
@Override
|
||||
public void setValueAt(Object value, int row, int col) {
|
||||
if (col == DESCRIPTION_COL) {
|
||||
fireTableCellUpdated(row, col);
|
||||
}
|
||||
fireTableCellUpdated(row, col);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -131,15 +128,12 @@ public class LibrariesIndexTableModel extends FilteredAbstractTableModel<Contrib
|
||||
return null;
|
||||
}
|
||||
ContributedLibraryReleases contribution = contributions.get(row);
|
||||
if (col == DESCRIPTION_COL) {
|
||||
return contribution;// .getSelected();
|
||||
}
|
||||
return null;
|
||||
return contribution;// .getSelected();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCellEditable(int row, int col) {
|
||||
return col == DESCRIPTION_COL;
|
||||
return true;
|
||||
}
|
||||
|
||||
public ContributedLibraryReleases getReleases(int row) {
|
||||
|
@ -48,8 +48,6 @@ import java.util.stream.Stream;
|
||||
@SuppressWarnings("serial")
|
||||
public class ContributionIndexTableModel extends FilteredAbstractTableModel<ContributedPlatform> {
|
||||
|
||||
public final static int DESCRIPTION_COL = 0;
|
||||
|
||||
public static class ContributedPlatformReleases {
|
||||
public final ContributedPackage packager;
|
||||
public final String arch;
|
||||
@ -184,9 +182,7 @@ public class ContributionIndexTableModel extends FilteredAbstractTableModel<Cont
|
||||
|
||||
@Override
|
||||
public void setValueAt(Object value, int row, int col) {
|
||||
if (col == DESCRIPTION_COL) {
|
||||
fireTableCellUpdated(row, col);
|
||||
}
|
||||
fireTableCellUpdated(row, col);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -195,15 +191,12 @@ public class ContributionIndexTableModel extends FilteredAbstractTableModel<Cont
|
||||
return null;
|
||||
}
|
||||
ContributedPlatformReleases contribution = contributions.get(row);
|
||||
if (col == DESCRIPTION_COL) {
|
||||
return contribution;// .getSelected();
|
||||
}
|
||||
return null;
|
||||
return contribution;// .getSelected();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCellEditable(int row, int col) {
|
||||
return col == DESCRIPTION_COL;
|
||||
return true;
|
||||
}
|
||||
|
||||
public ContributedPlatformReleases getReleases(int row) {
|
||||
|
@ -29,7 +29,6 @@
|
||||
|
||||
package cc.arduino.contributions.ui;
|
||||
|
||||
import static cc.arduino.contributions.packages.ui.ContributionIndexTableModel.DESCRIPTION_COL;
|
||||
import static processing.app.I18n.tr;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
@ -165,7 +164,7 @@ public abstract class InstallerJDialog<T> extends JDialog {
|
||||
|
||||
{
|
||||
TableColumnModel tcm = contribTable.getColumnModel();
|
||||
TableColumn col = tcm.getColumn(DESCRIPTION_COL);
|
||||
TableColumn col = tcm.getColumn(0);
|
||||
col.setCellRenderer(createCellRenderer());
|
||||
col.setCellEditor(createCellEditor());
|
||||
col.setResizable(true);
|
||||
|
Loading…
Reference in New Issue
Block a user