|
29 | 29 |
|
30 | 30 | public class ContributedLibraryTableCell extends JPanel {
|
31 | 31 |
|
32 |
| - protected final JButton installButton; |
33 |
| - protected final Component installButtonPlaceholder; |
34 |
| - protected final JComboBox downgradeChooser; |
35 |
| - protected final JComboBox versionToInstallChooser; |
36 |
| - protected final JButton downgradeButton; |
37 |
| - protected final JPanel buttonsPanel; |
38 |
| - protected final JPanel inactiveButtonsPanel; |
39 |
| - protected final JLabel statusLabel; |
40 |
| - |
41 |
| - public ContributedLibraryTableCell() { |
| 32 | + final JButton installButton; |
| 33 | + final Component installButtonPlaceholder; |
| 34 | + final JComboBox downgradeChooser; |
| 35 | + final JComboBox versionToInstallChooser; |
| 36 | + final JButton downgradeButton; |
| 37 | + final JPanel buttonsPanel; |
| 38 | + final JPanel inactiveButtonsPanel; |
| 39 | + final JLabel statusLabel; |
| 40 | + |
| 41 | + public ContributedLibraryTableCell(JTable parentTable, Object value, |
| 42 | + boolean isSelected) { |
42 | 43 | super();
|
43 | 44 | setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
|
44 | 45 |
|
@@ -99,11 +100,8 @@ public ContributedLibraryTableCell() {
|
99 | 100 | add(inactiveButtonsPanel);
|
100 | 101 |
|
101 | 102 | add(Box.createVerticalStrut(15));
|
102 |
| - } |
103 | 103 |
|
104 |
| - void update(JTable parentTable, Object value, boolean isSelected) { |
105 | 104 | ContributedLibraryReleases releases = (ContributedLibraryReleases) value;
|
106 |
| - |
107 | 105 | JTextPane description = makeNewDescription();
|
108 | 106 |
|
109 | 107 | // FIXME: happens on macosx, don't know why
|
@@ -193,9 +191,9 @@ void update(JTable parentTable, Object value, boolean isSelected) {
|
193 | 191 |
|
194 | 192 | // See:
|
195 | 193 | // http://stackoverflow.com/questions/3081210/how-to-set-jtextarea-to-have-height-that-matches-the-size-of-a-text-it-contains
|
196 |
| - int width = parentTable.getBounds().width; |
197 |
| - InstallerTableCell.setJTextPaneDimensionToFitContainedText(description, |
198 |
| - width); |
| 194 | + InstallerTableCell |
| 195 | + .setJTextPaneDimensionToFitContainedText(description, |
| 196 | + parentTable.getBounds().width); |
199 | 197 |
|
200 | 198 | if (isSelected) {
|
201 | 199 | setBackground(parentTable.getSelectionBackground());
|
|
0 commit comments