public Object getValueAt(int r, int c) {
   PluginDefinition def = getPluginDefinitionAt(r);
   switch (c) {
     case 0:
       switch (def.getStatus()) {
         case NOT_INSTALLED:
           return "Not installed";
         case UPDATE_AVAILABLE:
           return "Update available";
         default:
           return "Installed";
       }
     case 1:
       return def.getName();
     case 2:
       String local = def.getLocalVersion();
       return local == null ? "<N/A>" : local;
     case 3:
       String remote = def.getRemoteVersion();
       return remote == null ? "<Unknown>" : remote;
     case 4:
       return def.getShortDescription();
     default:
       return def.getAuthor();
   }
 }
    public void actionPerformed(ActionEvent evt) {
      final PluginDefinition def = model.getPluginDefinitionAt(table.getSelectedRow());
      status1Text.setText("Updating " + def.getName());
      statusIcon.setIcon(LARGE_UPDATE_ICON);
      Plugin sel = def.getPlugin();
      Properties selPr = def.getLocalProperties();
      String selRes = selPr.getProperty(PluginManager.PLUGIN_RESOURCE);
      if (selRes.equals("")) {
        JOptionPane.showMessageDialog(
            PluginManagerPane.this,
            "Plugin cannot be updated in this version of " + context.getPluginHostName(),
            "Error",
            JOptionPane.ERROR_MESSAGE,
            LARGE_REMOVE_ICON);
        return;
      }

      // Check what other plugins are in the same archive
      Vector allPlugins = getAllPluginsInResource(selRes);
      HashMap removeJars = getJarsToRemove(allPlugins);

      try {
        removeJars(removeJars);
        install(def);
      } catch (IOException ioe) {
        JOptionPane.showMessageDialog(
            PluginManagerPane.this,
            "Could not create remove list. " + ioe.getMessage(),
            "Error",
            JOptionPane.ERROR_MESSAGE);
      }
    }
 public void actionPerformed(ActionEvent evt) {
   /** @todo install should warn about dependencies */
   final PluginDefinition def = model.getPluginDefinitionAt(table.getSelectedRow());
   status1Text.setText("Installing " + def.getName());
   statusIcon.setIcon(LARGE_INSTALL_ICON);
   install(def);
 }
 public void setRemoteProperties(String name, Properties p) {
   context.log(
       PluginHostContext.LOG_INFORMATION, "Looking if " + name + " is already installed");
   for (int i = 0; i < getRowCount(); i++) {
     PluginDefinition def = getPluginDefinitionAt(i);
     context.log(PluginHostContext.LOG_DEBUG, "Found " + def.getName());
     if (name.equals(def.getName())) {
       context.log(PluginHostContext.LOG_DEBUG, name + " is installed");
       def.setRemoteProperties(p);
       fireTableRowsUpdated(i, i);
       return;
     }
   }
   context.log(PluginHostContext.LOG_DEBUG, name + " is not installed");
   int r = getRowCount();
   definitions.addElement(new PluginDefinition(p));
   fireTableRowsInserted(r, r);
 }