Skip to content

Commit 47fcf31

Browse files
committed
Removed unused parameters in *TableCell.update(..) method
1 parent 76068c9 commit 47fcf31

6 files changed

+8
-10
lines changed

app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCell.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ public ContributedLibraryTableCell() {
101101
add(Box.createVerticalStrut(15));
102102
}
103103

104-
void update(JTable parentTable, Object value, boolean isSelected, int row,
105-
boolean hasBuiltInRelease) {
104+
void update(JTable parentTable, Object value, boolean isSelected) {
106105
ContributedLibraryReleases releases = (ContributedLibraryReleases) value;
107106

108107
JTextPane description = makeNewDescription();

app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellEditor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public Component getTableCellEditorComponent(JTable table, Object value,
134134
editorCell.versionToInstallChooser
135135
.setVisible(installed == null && uninstalledReleases.size() > 1);
136136

137-
editorCell.update(table, value, true, row, !installedBuiltIn.isEmpty());
137+
editorCell.update(table, value, true);
138138
editorCell.setBackground(new Color(218, 227, 227)); // #dae3e3
139139
return editorCell;
140140
}

app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public Component getTableCellRendererComponent(JTable table, Object value,
4545

4646
ContributedLibraryTableCell cell = new ContributedLibraryTableCell();
4747
cell.setButtonsVisible(false);
48-
cell.update(table, value, isSelected, row, false);
48+
cell.update(table, value, isSelected);
4949

5050
if (row % 2 == 0) {
5151
cell.setBackground(new Color(236, 241, 241)); // #ecf1f1

app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public ContributedPlatformTableCell() {
145145
add(Box.createVerticalStrut(15));
146146
}
147147

148-
void update(JTable parentTable, Object value, boolean isSelected, int row,
148+
void update(JTable parentTable, Object value, boolean isSelected,
149149
boolean hasBuiltInRelease) {
150150
ContributionIndexTableModel.ContributedPlatformReleases releases = (ContributionIndexTableModel.ContributedPlatformReleases) value;
151151

app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellEditor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public Component getTableCellEditorComponent(JTable table, Object value,
131131
editorCell.versionToInstallChooser
132132
.setVisible(installed == null && uninstalledReleases.size() > 1);
133133

134-
editorCell.update(table, value, true, row, !installedBuiltIn.isEmpty());
134+
editorCell.update(table, value, true, !installedBuiltIn.isEmpty());
135135
editorCell.setBackground(new Color(218, 227, 227)); // #dae3e3
136136
return editorCell;
137137
}

app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellRenderer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,15 @@ public Component getTableCellRendererComponent(JTable table, Object value,
4444
int column) {
4545
ContributedPlatformTableCell cell = new ContributedPlatformTableCell();
4646
cell.setButtonsVisible(false);
47-
48-
cell.update(table, value, isSelected, row, false);
47+
cell.update(table, value, isSelected, false);
48+
4949
if (row % 2 == 0) {
5050
cell.setBackground(new Color(236, 241, 241)); // #ecf1f1
5151
} else {
5252
cell.setBackground(new Color(255, 255, 255));
5353
}
5454

55-
int height = new Double(cell.getPreferredSize().getHeight())
56-
.intValue();
55+
int height = new Double(cell.getPreferredSize().getHeight()).intValue();
5756
if (table.getRowHeight(row) < height) {
5857
table.setRowHeight(row, height);
5958
}

0 commit comments

Comments
 (0)