mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-14 11:29:26 +01:00
Removed useless parentTable field in ContributedLibraryTableCell
This commit is contained in:
parent
926a8c9101
commit
268ae81759
@ -156,8 +156,8 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
|||||||
panel.add(Box.createVerticalStrut(15));
|
panel.add(Box.createVerticalStrut(15));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update(Object value, boolean isSelected, int row,
|
private void update(JTable parentTable, Object value, boolean isSelected,
|
||||||
boolean hasBuiltInRelease) {
|
int row, boolean hasBuiltInRelease) {
|
||||||
ContributedLibraryReleases releases = (ContributedLibraryReleases) value;
|
ContributedLibraryReleases releases = (ContributedLibraryReleases) value;
|
||||||
|
|
||||||
JTextPane description = makeNewDescription(panel);
|
JTextPane description = makeNewDescription(panel);
|
||||||
@ -307,13 +307,12 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
|||||||
boolean isSelected,
|
boolean isSelected,
|
||||||
boolean hasFocus, int row,
|
boolean hasFocus, int row,
|
||||||
int column) {
|
int column) {
|
||||||
parentTable = table;
|
|
||||||
|
|
||||||
Cell cell = new Cell();
|
Cell cell = new Cell();
|
||||||
cell.installButton.setEnabled(false);
|
cell.installButton.setEnabled(false);
|
||||||
cell.buttonsPanel.setVisible(false);
|
cell.buttonsPanel.setVisible(false);
|
||||||
cell.inactiveButtonsPanel.setVisible(true);
|
cell.inactiveButtonsPanel.setVisible(true);
|
||||||
cell.update(value, isSelected, row, false);
|
cell.update(table, value, isSelected, row, false);
|
||||||
if (row % 2 == 0) {
|
if (row % 2 == 0) {
|
||||||
cell.panel.setBackground(new Color(236, 241, 241)); // #ecf1f1
|
cell.panel.setBackground(new Color(236, 241, 241)); // #ecf1f1
|
||||||
} else {
|
} else {
|
||||||
@ -330,7 +329,6 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ContributedLibraryReleases editorValue;
|
private ContributedLibraryReleases editorValue;
|
||||||
private JTable parentTable;
|
|
||||||
private Cell editorCell;
|
private Cell editorCell;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -342,7 +340,6 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
|||||||
public Component getTableCellEditorComponent(JTable table, Object value,
|
public Component getTableCellEditorComponent(JTable table, Object value,
|
||||||
boolean isSelected, int row,
|
boolean isSelected, int row,
|
||||||
int column) {
|
int column) {
|
||||||
parentTable = table;
|
|
||||||
editorValue = (ContributedLibraryReleases) value;
|
editorValue = (ContributedLibraryReleases) value;
|
||||||
editorCell = new Cell();
|
editorCell = new Cell();
|
||||||
|
|
||||||
@ -400,7 +397,7 @@ public class ContributedLibraryTableCell extends InstallerTableCell {
|
|||||||
editorCell.versionToInstallChooser
|
editorCell.versionToInstallChooser
|
||||||
.setVisible(installed == null && uninstalledReleases.size() > 1);
|
.setVisible(installed == null && uninstalledReleases.size() > 1);
|
||||||
|
|
||||||
editorCell.update(value, true, row, !installedBuiltIn.isEmpty());
|
editorCell.update(table, value, true, row, !installedBuiltIn.isEmpty());
|
||||||
editorCell.panel.setBackground(new Color(218, 227, 227)); // #dae3e3
|
editorCell.panel.setBackground(new Color(218, 227, 227)); // #dae3e3
|
||||||
return editorCell.panel;
|
return editorCell.panel;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user