Skip to content

Commit

Permalink
Library manager: "remove" button removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Fissore committed Mar 27, 2015
1 parent 9b5fa9f commit a83d6e9
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ public class ContributedLibraryTableCell extends InstallerTableCell {

private JPanel panel;
private JButton installButton;
private JButton removeButton;
private Component removeButtonPlaceholder;
private Component installButtonPlaceholder;
private JComboBox downgradeChooser;
private JComboBox versionToInstallChooser;
Expand All @@ -90,18 +88,6 @@ public void actionPerformed(ActionEvent e) {
installButtonPlaceholder = Box.createRigidArea(new Dimension(width, 1));
}

{
removeButton = new JButton(_("Remove"));
removeButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
onRemove(editorValue.getInstalled());
}
});
int width = removeButton.getPreferredSize().width;
removeButtonPlaceholder = Box.createRigidArea(new Dimension(width, 1));
}

downgradeButton = new JButton(_("Install"));
downgradeButton.addActionListener(new ActionListener() {
@Override
Expand Down Expand Up @@ -154,8 +140,6 @@ public void itemStateChanged(ItemEvent e) {
buttonsPanel.add(Box.createHorizontalStrut(5));
buttonsPanel.add(installButton);
buttonsPanel.add(Box.createHorizontalStrut(5));
buttonsPanel.add(removeButton);
buttonsPanel.add(Box.createHorizontalStrut(5));
buttonsPanel.add(Box.createHorizontalStrut(15));

panel.add(buttonsPanel);
Expand Down Expand Up @@ -343,8 +327,6 @@ private Component getUpdatedCellComponent(Object value, boolean isSelected, int
}
installButton.setVisible(installable || upgradable);
installButtonPlaceholder.setVisible(!(installable || upgradable));
removeButton.setVisible(removable);
removeButtonPlaceholder.setVisible(!removable);

String name = selected.getName();
String author = selected.getAuthor();
Expand Down Expand Up @@ -444,7 +426,6 @@ public void setEnabled(boolean enabled) {

public void enable(boolean enabled) {
installButton.setEnabled(enabled);
removeButton.setEnabled(enabled);
}

public void setStatus(String status) {
Expand Down

0 comments on commit a83d6e9

Please sign in to comment.