Removed unused parameters in *TableCell.update(..) method

This commit is contained in:
Cristian Maglie 2015-12-29 10:48:11 +01:00
parent 76068c92b4
commit 47fcf318b1
6 changed files with 8 additions and 10 deletions

View File

@ -101,8 +101,7 @@ public class ContributedLibraryTableCell extends JPanel {
add(Box.createVerticalStrut(15));
}
void update(JTable parentTable, Object value, boolean isSelected, int row,
boolean hasBuiltInRelease) {
void update(JTable parentTable, Object value, boolean isSelected) {
ContributedLibraryReleases releases = (ContributedLibraryReleases) value;
JTextPane description = makeNewDescription();

View File

@ -134,7 +134,7 @@ public class ContributedLibraryTableCellEditor extends InstallerTableCell {
editorCell.versionToInstallChooser
.setVisible(installed == null && uninstalledReleases.size() > 1);
editorCell.update(table, value, true, row, !installedBuiltIn.isEmpty());
editorCell.update(table, value, true);
editorCell.setBackground(new Color(218, 227, 227)); // #dae3e3
return editorCell;
}

View File

@ -45,7 +45,7 @@ public class ContributedLibraryTableCellRenderer implements TableCellRenderer {
ContributedLibraryTableCell cell = new ContributedLibraryTableCell();
cell.setButtonsVisible(false);
cell.update(table, value, isSelected, row, false);
cell.update(table, value, isSelected);
if (row % 2 == 0) {
cell.setBackground(new Color(236, 241, 241)); // #ecf1f1

View File

@ -145,7 +145,7 @@ public class ContributedPlatformTableCell extends JPanel {
add(Box.createVerticalStrut(15));
}
void update(JTable parentTable, Object value, boolean isSelected, int row,
void update(JTable parentTable, Object value, boolean isSelected,
boolean hasBuiltInRelease) {
ContributionIndexTableModel.ContributedPlatformReleases releases = (ContributionIndexTableModel.ContributedPlatformReleases) value;

View File

@ -131,7 +131,7 @@ public class ContributedPlatformTableCellEditor extends InstallerTableCell {
editorCell.versionToInstallChooser
.setVisible(installed == null && uninstalledReleases.size() > 1);
editorCell.update(table, value, true, row, !installedBuiltIn.isEmpty());
editorCell.update(table, value, true, !installedBuiltIn.isEmpty());
editorCell.setBackground(new Color(218, 227, 227)); // #dae3e3
return editorCell;
}

View File

@ -44,16 +44,15 @@ public class ContributedPlatformTableCellRenderer implements TableCellRenderer {
int column) {
ContributedPlatformTableCell cell = new ContributedPlatformTableCell();
cell.setButtonsVisible(false);
cell.update(table, value, isSelected, row, false);
cell.update(table, value, isSelected, false);
if (row % 2 == 0) {
cell.setBackground(new Color(236, 241, 241)); // #ecf1f1
} else {
cell.setBackground(new Color(255, 255, 255));
}
int height = new Double(cell.getPreferredSize().getHeight())
.intValue();
int height = new Double(cell.getPreferredSize().getHeight()).intValue();
if (table.getRowHeight(row) < height) {
table.setRowHeight(row, height);
}