org-netbeans-modules-autoupdate-ui

ns;

import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

class PluginManagerAction$1
  implements WindowListener
{
  PluginManagerAction$1(PluginManagerAction paramPluginManagerAction) {}
  
  public void windowOpened(WindowEvent paramWindowEvent) {}
  
  public void windowClosing(WindowEvent paramWindowEvent)
  {
    PluginManagerAction.access$002(this$0, null);
    PluginManagerAction.access$102(null);
  }
  
  public void windowClosed(WindowEvent paramWindowEvent)
  {
    PluginManagerAction.access$002(this$0, null);
    PluginManagerAction.access$102(null);
  }
  
  public void windowIconified(WindowEvent paramWindowEvent) {}
  
  public void windowDeiconified(WindowEvent paramWindowEvent) {}
  
  public void windowActivated(WindowEvent paramWindowEvent) {}
  
  public void windowDeactivated(WindowEvent paramWindowEvent) {}
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.actions.PluginManagerAction.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.actions;

import java.awt.Dialog;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import javax.swing.JButton;
import org.netbeans.modules.autoupdate.ui.PluginManagerUI;
import org.openide.DialogDescriptor;
import org.openide.DialogDisplayer;
import org.openide.awt.Mnemonics;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
import org.openide.util.actions.CallableSystemAction;

public final class PluginManagerAction
  extends CallableSystemAction
{
  private static PluginManagerUI pluginManagerUI = null;
  private Dialog dlg = null;
  
  public void performAction()
  {
    if (dlg == null)
    {
      JButton localJButton = new JButton();
      localJButton.setDefaultCapable(false);
      Mnemonics.setLocalizedText(localJButton, NbBundle.getMessage(PluginManagerAction.class, "PluginManager_CloseButton_Name"));
      pluginManagerUI = new PluginManagerUI(localJButton, getValue("InitialTab"));
      
      putValue("InitialTab", null);
      DialogDescriptor localDialogDescriptor = new DialogDescriptor(pluginManagerUI, NbBundle.getMessage(PluginManagerAction.class, "PluginManager_Panel_Name"), false, new JButton[] { localJButton }, localJButton, 0, null, null);
      
      localDialogDescriptor.setOptions(new Object[0]);
      
      dlg = DialogDisplayer.getDefault().createDialog(localDialogDescriptor);
      dlg.setVisible(true);
      dlg.addWindowListener(new WindowListener()
      {
        public void windowOpened(WindowEvent paramAnonymousWindowEvent) {}
        
        public void windowClosing(WindowEvent paramAnonymousWindowEvent)
        {
          dlg = null;
          PluginManagerAction.access$102(null);
        }
        
        public void windowClosed(WindowEvent paramAnonymousWindowEvent)
        {
          dlg = null;
          PluginManagerAction.access$102(null);
        }
        
        public void windowIconified(WindowEvent paramAnonymousWindowEvent) {}
        
        public void windowDeiconified(WindowEvent paramAnonymousWindowEvent) {}
        
        public void windowActivated(WindowEvent paramAnonymousWindowEvent) {}
        
        public void windowDeactivated(WindowEvent paramAnonymousWindowEvent) {}
      });
    }
    else
    {
      dlg.requestFocus();
    }
  }
  
  public String getName()
  {
    return NbBundle.getMessage(PluginManagerAction.class, "PluginManagerAction_Name");
  }
  
  protected void initialize()
  {
    super.initialize();
    putValue("noIconInMenu", Boolean.TRUE);
  }
  
  public HelpCtx getHelpCtx()
  {
    return HelpCtx.DEFAULT_HELP;
  }
  
  protected boolean asynchronous()
  {
    return false;
  }
  
  public static PluginManagerUI getPluginManagerUI()
  {
    return pluginManagerUI;
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.actions.PluginManagerAction
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.actions;

import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkEvent.EventType;
import javax.swing.event.HyperlinkListener;
import org.openide.awt.HtmlBrowser.URLDisplayer;

final class ShowNotifications$1
  implements HyperlinkListener
{
  public void hyperlinkUpdate(HyperlinkEvent paramHyperlinkEvent)
  {
    if (paramHyperlinkEvent.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
      HtmlBrowser.URLDisplayer.getDefault().showURL(paramHyperlinkEvent.getURL());
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.actions.ShowNotifications.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.actions;

import java.awt.Color;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import java.util.prefs.Preferences;
import javax.swing.JTextPane;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkEvent.EventType;
import javax.swing.event.HyperlinkListener;
import org.netbeans.api.autoupdate.UpdateUnitProvider;
import org.openide.awt.HtmlBrowser.URLDisplayer;
import org.openide.awt.Notification;
import org.openide.awt.NotificationDisplayer;
import org.openide.awt.NotificationDisplayer.Priority;
import org.openide.util.ImageUtilities;
import org.openide.util.NbPreferences;

public class ShowNotifications
{
  private static final Logger LOGGER = Logger.getLogger(ShowNotifications.class.getName());
  private static final String SEPARATOR = " ";
  private static final String PROP = "shown-notifications";
  private static final Map<String, Notification> notifications = new HashMap();
  
  public static void checkNotification(UpdateUnitProvider paramUpdateUnitProvider)
  {
    LOGGER.finest("Checking notification for " + paramUpdateUnitProvider.getDisplayName());
    String str = getMessage(paramUpdateUnitProvider);
    if (str != null)
    {
      LOGGER.finest("Check message " + str.hashCode() + " to show... \n" + str + "\n");
      if (add(str))
      {
        LOGGER.finest("Show message " + str.hashCode());
        showNotification(str, paramUpdateUnitProvider);
      }
      else
      {
        LOGGER.finest("Message " + str.hashCode() + "... was already shown");
      }
    }
  }
  
  private static String getMessage(UpdateUnitProvider paramUpdateUnitProvider)
  {
    String str1 = paramUpdateUnitProvider.getDescription();
    if (str1 != null)
    {
      String str2 = "<a name=\"autoupdate_catalog_parser\"";
      if (str1.indexOf(str2) != -1) {
        return str1;
      }
    }
    return null;
  }
  
  private static boolean add(String paramString)
  {
    synchronized (ShowNotifications.class)
    {
      Preferences localPreferences = NbPreferences.root().node("/org/netbeans/modules/autoupdate/ui");
      ArrayList localArrayList = new ArrayList();
      String str2;
      for (str2 : localPreferences.get("shown-notifications", "").split(" ")) {
        if (str2.length() > 0) {
          localArrayList.add(str2);
        }
      }
      boolean bool = true;
      String str1 = "" + paramString.hashCode();
      for (Object localObject1 = localArrayList.iterator(); ((Iterator)localObject1).hasNext();)
      {
        str2 = (String)((Iterator)localObject1).next();
        if (str1.equals(str2)) {
          bool = false;
        }
      }
      if (bool)
      {
        localArrayList.add(str1);
        localObject1 = new StringBuilder();
        for (int k = 0; k < localArrayList.size(); k++)
        {
          if (k != 0) {
            ((StringBuilder)localObject1).append(" ");
          }
          ((StringBuilder)localObject1).append((String)localArrayList.get(k));
        }
        localPreferences.put("shown-notifications", ((StringBuilder)localObject1).toString());
      }
      return bool;
    }
  }
  
  private static void showNotification(String paramString, UpdateUnitProvider paramUpdateUnitProvider)
  {
    if (notifications.get(paramUpdateUnitProvider.getName()) != null) {
      ((Notification)notifications.get(paramUpdateUnitProvider.getName())).clear();
    }
    Notification localNotification = NotificationDisplayer.getDefault().notify(getTitle(paramString), ImageUtilities.loadImageIcon("org/netbeans/modules/autoupdate/ui/resources/info_icon.png", false), createInfoPanel(paramString), createInfoPanel(paramString), NotificationDisplayer.Priority.HIGH);
    
    notifications.put(paramUpdateUnitProvider.getName(), localNotification);
  }
  
  private static String getTitle(String paramString)
  {
    return getMessagePart(paramString, true);
  }
  
  private static String getDetails(String paramString)
  {
    return getMessagePart(paramString, false);
  }
  
  private static String getMessagePart(String paramString, boolean paramBoolean)
  {
    String str1 = paramString;
    
    String[] arrayOfString1 = { "\r\n", "\r", "\n", "<br>", "<br/>" };
    for (String str2 : arrayOfString1) {
      if (str1.indexOf(str2) == 0) {
        str1 = getMessagePart(str1.substring(str2.length()), paramBoolean);
      }
    }
    ??? = null;
    ??? = -1;
    for (String str3 : arrayOfString1)
    {
      int n = str1.indexOf(str3);
      if ((n != -1) && (
        (??? == -1) || (n < ???)))
      {
        ??? = str3;
        ??? = n;
      }
    }
    if (??? == null) {
      return paramBoolean ? str1 : "";
    }
    return paramBoolean ? str1.substring(0, ???) : str1.substring(??? + ((String)???).length());
  }
  
  private static JTextPane createInfoPanel(String paramString)
  {
    JTextPane localJTextPane = new JTextPane();
    localJTextPane.setContentType("text/html");
    String str = getDetails(paramString).replaceAll("(\r\n|\n|\r)", "<br>");
    localJTextPane.setText(str);
    localJTextPane.setOpaque(false);
    localJTextPane.setEditable(false);
    localJTextPane.setBorder(new EmptyBorder(0, 0, 0, 0));
    if (UIManager.getLookAndFeel().getID().equals("Nimbus")) {
      localJTextPane.setBackground(new Color(0, 0, 0, 0));
    }
    localJTextPane.addHyperlinkListener(new HyperlinkListener()
    {
      public void hyperlinkUpdate(HyperlinkEvent paramAnonymousHyperlinkEvent)
      {
        if (paramAnonymousHyperlinkEvent.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) {
          HtmlBrowser.URLDisplayer.getDefault().showURL(paramAnonymousHyperlinkEvent.getURL());
        }
      }
    });
    return localJTextPane;
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.actions.ShowNotifications
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.api;

import java.util.List;
import org.netbeans.api.autoupdate.InstallSupport;
import org.netbeans.api.autoupdate.OperationContainer;
import org.netbeans.api.autoupdate.OperationContainer.OperationInfo;
import org.netbeans.api.autoupdate.UpdateUnit;
import org.netbeans.modules.autoupdate.ui.actions.PluginManagerAction;
import org.netbeans.modules.autoupdate.ui.wizards.InstallUnitWizard;
import org.netbeans.modules.autoupdate.ui.wizards.InstallUnitWizardModel;
import org.netbeans.modules.autoupdate.ui.wizards.OperationWizardModel.OperationType;

public final class PluginManager
{
  private static PluginManagerAction p = null;
  private static Runnable toRun = null;
  
  public static void show()
  {
    if (p == null) {
      p = new PluginManagerAction();
    }
    p.performAction();
  }
  
  public static boolean openInstallWizard(OperationContainer<InstallSupport> paramOperationContainer)
  {
    if (paramOperationContainer == null) {
      throw new IllegalArgumentException("OperationContainer cannot be null.");
    }
    List localList1 = paramOperationContainer.listAll();
    if (localList1.isEmpty()) {
      throw new IllegalArgumentException("OperationContainer cannot be empty.");
    }
    List localList2 = paramOperationContainer.listInvalid();
    if (!localList2.isEmpty()) {
      throw new IllegalArgumentException("OperationContainer cannot contain invalid elements but " + localList2);
    }
    OperationContainer.OperationInfo localOperationInfo = (OperationContainer.OperationInfo)localList1.get(0);
    OperationWizardModel.OperationType localOperationType = localOperationInfo.getUpdateUnit().getInstalled() == null ? OperationWizardModel.OperationType.INSTALL : OperationWizardModel.OperationType.UPDATE;
    return new InstallUnitWizard().invokeWizard(new InstallUnitWizardModel(localOperationType, paramOperationContainer));
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.api.PluginManager
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;

class CustomHandleStep$1
  implements PropertyChangeListener
{
  CustomHandleStep$1(CustomHandleStep paramCustomHandleStep) {}
  
  public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
  {
    if ("run-action".equals(paramPropertyChangeEvent.getPropertyName())) {
      CustomHandleStep.access$000(this$0);
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.CustomHandleStep.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JComponent;
import javax.swing.JLabel;
import org.netbeans.api.autoupdate.OperationException;
import org.netbeans.api.autoupdate.OperationSupport;
import org.netbeans.api.progress.ProgressHandle;
import org.netbeans.api.progress.ProgressHandleFactory;

class CustomHandleStep$2
  implements Runnable
{
  CustomHandleStep$2(CustomHandleStep paramCustomHandleStep, OperationSupport paramOperationSupport) {}
  
  public void run()
  {
    try
    {
      ProgressHandle localProgressHandle = ProgressHandleFactory.createHandle(CustomHandleStep.access$100(this$0) ? CustomHandleStep.access$200(this$0, "CustomHandleStep_Install_InstallingPlugins", new String[0]) : CustomHandleStep.access$200(this$0, "CustomHandleStep_Uninstall_UninstallingPlugins", new String[0]));
      
      JComponent localJComponent = ProgressHandleFactory.createProgressComponent(localProgressHandle);
      JLabel localJLabel1 = ProgressHandleFactory.createMainLabelComponent(localProgressHandle);
      JLabel localJLabel2 = ProgressHandleFactory.createDetailLabelComponent(localProgressHandle);
      
      localProgressHandle.setInitialDelay(0);
      CustomHandleStep.access$300(this$0).waitAndSetProgressComponents(localJLabel1, localJComponent, localJLabel2);
      
      CustomHandleStep.access$402(this$0, val$support.doOperation(localProgressHandle));
      CustomHandleStep.access$502(this$0, true);
      CustomHandleStep.access$300(this$0).waitAndSetProgressComponents(localJLabel1, localJComponent, new JLabel(CustomHandleStep.access$200(this$0, "CustomHandleStep_Done", new String[0])));
    }
    catch (OperationException localOperationException)
    {
      CustomHandleStep.access$600(this$0).log(Level.INFO, localOperationException.getMessage(), localOperationException);
      CustomHandleStep.access$502(this$0, false);
      CustomHandleStep.access$702(this$0, localOperationException.getLocalizedMessage());
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.CustomHandleStep.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.api.autoupdate.OperationException;
import org.netbeans.api.autoupdate.OperationSupport;

class CustomHandleStep$3
  implements Runnable
{
  CustomHandleStep$3(CustomHandleStep paramCustomHandleStep, OperationSupport paramOperationSupport) {}
  
  public void run()
  {
    try
    {
      val$support.doRestart(CustomHandleStep.access$400(this$0), null);
    }
    catch (OperationException localOperationException)
    {
      CustomHandleStep.access$600(this$0).log(Level.INFO, localOperationException.getMessage(), localOperationException);
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.CustomHandleStep.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import org.netbeans.api.autoupdate.OperationContainer;
import org.netbeans.api.autoupdate.OperationException;
import org.netbeans.api.autoupdate.OperationSupport;
import org.netbeans.api.autoupdate.OperationSupport.Restarter;
import org.netbeans.api.progress.ProgressHandle;
import org.netbeans.api.progress.ProgressHandleFactory;
import org.openide.WizardDescriptor;
import org.openide.WizardDescriptor.FinishablePanel;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;

public class CustomHandleStep
  implements WizardDescriptor.FinishablePanel<WizardDescriptor>
{
  private OperationPanel panel;
  private PanelBodyContainer component;
  private OperationWizardModel model = null;
  private WizardDescriptor wd = null;
  private final Logger log = Logger.getLogger(getClass().getName());
  private final List<ChangeListener> listeners = new ArrayList();
  private static final String HEAD_CUSTOM_INSTALL = "CustomHandleStep_Header_Install_Head";
  private static final String CONTENT_CUSTOM_INSTALL = "CustomHandleStep_Header_Install_Content";
  private static final String HEAD_CUSTOM_UNINSTALL = "CustomHandleStep_Header_Uninstall_Head";
  private static final String CONTENT_CUSTOM_UNINSTALL = "CustomHandleStep_Header_Uninstall_Content";
  private static final String HEAD_CUSTOM_INSTALL_DONE = "CustomHandleStep_Header_InstallDone_Head";
  private static final String CONTENT_CUSTOM_INSTALL_DONE = "CustomHandleStep_Header_InstallDone_Content";
  private static final String HEAD_CUSTOM_UNINSTALL_DONE = "CustomHandleStep_Header_UninstallDone_Head";
  private static final String CONTENT_CUSTOM_UNINSTALL_DONE = "CustomHandleStep_Header_UninstallDone_Content";
  private static final String HEAD_CUSTOM_INSTALL_FAIL = "CustomHandleStep_Header_InstallFail_Head";
  private static final String CONTENT_CUSTOM_INSTALL_FAIL = "CustomHandleStep_Header_InstallFail_Content";
  private static final String HEAD_CUSTOM_UNINSTALL_FAIL = "CustomHandleStep_Header_UninstallFail_Head";
  private static final String CONTENT_CUSTOM_UNINSTALL_FAIL = "CustomHandleStep_Header_UninstallFail_Content";
  private static final String HEAD_CUSTOM_INSTALL_RESTART = "CustomHandleStep_Header_Install_Restart_Head";
  private static final String CONTENT_CUSTOM_INSTALL_RESTART = "CustomHandleStep_Header_Install_Restart_Content";
  private static final String HEAD_CUSTOM_UNINSTALL_RESTART = "CustomHandleStep_Header_Uninstall_Restart_Head";
  private static final String CONTENT_CUSTOM_UNINSTALL_RESTART = "CustomHandleStep_Header_Uninstall_Restart_Content";
  private OperationSupport.Restarter restarter = null;
  private boolean isInstall = false;
  
  public CustomHandleStep(OperationWizardModel paramOperationWizardModel)
  {
    model = paramOperationWizardModel;
    isInstall = (paramOperationWizardModel instanceof InstallUnitWizardModel);
  }
  
  public boolean isFinishPanel()
  {
    return !model.hasStandardComponents();
  }
  
  public PanelBodyContainer getComponent()
  {
    if (component == null)
    {
      panel = new OperationPanel(false);
      panel.addPropertyChangeListener(new PropertyChangeListener()
      {
        public void propertyChange(PropertyChangeEvent paramAnonymousPropertyChangeEvent)
        {
          if ("run-action".equals(paramAnonymousPropertyChangeEvent.getPropertyName())) {
            CustomHandleStep.this.doHandleOperation();
          }
        }
      });
      if (isInstall) {
        component = new PanelBodyContainer(getBundle("CustomHandleStep_Header_Install_Head", new String[0]), getBundle("CustomHandleStep_Header_Install_Content", new String[0]), panel);
      } else {
        component = new PanelBodyContainer(getBundle("CustomHandleStep_Header_Uninstall_Head", new String[0]), getBundle("CustomHandleStep_Header_Uninstall_Content", new String[0]), panel);
      }
      component.setPreferredSize(OperationWizardModel.PREFFERED_DIMENSION);
    }
    return component;
  }
  
  private void doHandleOperation()
  {
    restarter = null;
    if (handleOperation())
    {
      if (isInstall)
      {
        if (restarter != null) {
          presentInstallNeedsRestart();
        } else {
          presentInstallDone();
        }
      }
      else if (restarter != null) {
        presentUninstallNeedsRestart();
      } else {
        presentUninstallDone();
      }
    }
    else if (isInstall) {
      presentInstallFail(errorMessage);
    } else {
      presentUninstallFail(errorMessage);
    }
    done = true;
    fireChange();
  }
  
  private boolean passed = false;
  private String errorMessage = null;
  private boolean done = false;
  private boolean wasStored = false;
  
  private boolean handleOperation()
  {
    final OperationSupport localOperationSupport = (OperationSupport)model.getCustomHandledContainer().getSupport();
    assert (localOperationSupport != null);
    passed = false;
    
    Runnable local2 = new Runnable()
    {
      public void run()
      {
        try
        {
          ProgressHandle localProgressHandle = ProgressHandleFactory.createHandle(isInstall ? CustomHandleStep.this.getBundle("CustomHandleStep_Install_InstallingPlugins", new String[0]) : CustomHandleStep.this.getBundle("CustomHandleStep_Uninstall_UninstallingPlugins", new String[0]));
          
          JComponent localJComponent = ProgressHandleFactory.createProgressComponent(localProgressHandle);
          JLabel localJLabel1 = ProgressHandleFactory.createMainLabelComponent(localProgressHandle);
          JLabel localJLabel2 = ProgressHandleFactory.createDetailLabelComponent(localProgressHandle);
          
          localProgressHandle.setInitialDelay(0);
          panel.waitAndSetProgressComponents(localJLabel1, localJComponent, localJLabel2);
          
          restarter = localOperationSupport.doOperation(localProgressHandle);
          passed = true;
          panel.waitAndSetProgressComponents(localJLabel1, localJComponent, new JLabel(CustomHandleStep.this.getBundle("CustomHandleStep_Done", new String[0])));
        }
        catch (OperationException localOperationException)
        {
          log.log(Level.INFO, localOperationException.getMessage(), localOperationException);
          passed = false;
          errorMessage = localOperationException.getLocalizedMessage();
        }
      }
    };
    local2.run();
    
    return passed;
  }
  
  private void presentInstallDone()
  {
    component.setHeadAndContent(getBundle("CustomHandleStep_Header_InstallDone_Head", new String[0]), getBundle("CustomHandleStep_Header_InstallDone_Content", new String[0]));
    model.modifyOptionsForContinue(wd, isFinishPanel());
    panel.setBody(getBundle("CustomHandleStep_InstallDone_Text", new String[0]), model.getCustomHandledComponents());
  }
  
  private void presentInstallFail(String paramString)
  {
    component.setHeadAndContent(getBundle("CustomHandleStep_Header_InstallFail_Head", new String[0]), getBundle("CustomHandleStep_Header_InstallFail_Content", new String[0]));
    model.modifyOptionsForDoClose(wd);
    panel.setBody(getBundle("CustomHandleStep_InstallFail_Text", new String[] { paramString }), model.getCustomHandledComponents());
  }
  
  private void presentUninstallDone()
  {
    component.setHeadAndContent(getBundle("CustomHandleStep_Header_UninstallDone_Head", new String[0]), getBundle("CustomHandleStep_Header_UninstallDone_Content", new String[0]));
    model.modifyOptionsForContinue(wd, isFinishPanel());
    panel.setBody(getBundle("CustomHandleStep_UninstallDone_Text", new String[0]), model.getCustomHandledComponents());
  }
  
  private void presentUninstallFail(String paramString)
  {
    component.setHeadAndContent(getBundle("CustomHandleStep_Header_UninstallFail_Head", new String[0]), getBundle("CustomHandleStep_Header_UninstallFail_Content", new String[0]));
    model.modifyOptionsForDoClose(wd);
    panel.setBody(getBundle("CustomHandleStep_UninstallFail_Text", new String[] { paramString }), model.getCustomHandledComponents());
  }
  
  private void presentInstallNeedsRestart()
  {
    component.setHeadAndContent(getBundle("CustomHandleStep_Header_Install_Restart_Head", new String[0]), getBundle("CustomHandleStep_Header_Install_Restart_Content", new String[0]));
    model.modifyOptionsForContinue(wd, isFinishPanel());
    if (isFinishPanel()) {
      panel.setRestartButtonsVisible(true);
    }
    panel.setBody(getBundle("CustomHandleStep_InstallDone_Text", new String[0]), model.getCustomHandledComponents());
  }
  
  private void presentUninstallNeedsRestart()
  {
    component.setHeadAndContent(getBundle("CustomHandleStep_Header_Uninstall_Restart_Head", new String[0]), getBundle("CustomHandleStep_Header_Uninstall_Restart_Content", new String[0]));
    model.modifyOptionsForContinue(wd, isFinishPanel());
    if (isFinishPanel()) {
      panel.setRestartButtonsVisible(true);
    }
    panel.setBody(getBundle("CustomHandleStep_UninstallDone_Text", new String[0]), model.getCustomHandledComponents());
  }
  
  public HelpCtx getHelp()
  {
    return null;
  }
  
  public void readSettings(WizardDescriptor paramWizardDescriptor)
  {
    wd = paramWizardDescriptor;
    done = false;
    wasStored = false;
  }
  
  public void storeSettings(WizardDescriptor paramWizardDescriptor)
  {
    assert (!WizardDescriptor.PREVIOUS_OPTION.equals(paramWizardDescriptor.getValue())) : "Cannot invoke Back in this case.";
    if (wasStored) {
      return;
    }
    wasStored = true;
    if ((WizardDescriptor.CANCEL_OPTION.equals(paramWizardDescriptor.getValue())) || (WizardDescriptor.CLOSED_OPTION.equals(paramWizardDescriptor.getValue())) || (WizardDescriptor.NEXT_OPTION.equals(paramWizardDescriptor.getValue())))
    {
      model.getCustomHandledContainer().removeAll();
    }
    else if (restarter != null)
    {
      final OperationSupport localOperationSupport = (OperationSupport)model.getCustomHandledContainer().getSupport();
      assert (localOperationSupport != null) : ("OperationSupport cannot be null because OperationContainer contains elements: " + model.getCustomHandledContainer().listAll() + " and invalid elements " + model.getCustomHandledContainer().listInvalid());
      if (panel.restartNow())
      {
        try
        {
          localOperationSupport.doRestart(restarter, null);
        }
        catch (OperationException localOperationException)
        {
          log.log(Level.INFO, localOperationException.getMessage(), localOperationException);
        }
      }
      else
      {
        localOperationSupport.doRestartLater(restarter);
        model.getCustomHandledContainer().removeAll();
        
        Runnable local3 = new Runnable()
        {
          public void run()
          {
            try
            {
              localOperationSupport.doRestart(restarter, null);
            }
            catch (OperationException localOperationException)
            {
              log.log(Level.INFO, localOperationException.getMessage(), localOperationException);
            }
          }
        };
        InstallStep.notifyRestartNeeded(local3, getBundle(isInstall ? "CustomHandleStep_Install_RestartNeeded" : "CustomHandleStep_Uninstall_RestartNeeded", new String[0]));
        
        return;
      }
    }
    else if (WizardDescriptor.FINISH_OPTION.equals(paramWizardDescriptor.getValue()))
    {
      model.getCustomHandledContainer().removeAll();
    }
  }
  
  public boolean isValid()
  {
    return done;
  }
  
  public synchronized void addChangeListener(ChangeListener paramChangeListener)
  {
    listeners.add(paramChangeListener);
  }
  
  public synchronized void removeChangeListener(ChangeListener paramChangeListener)
  {
    listeners.remove(paramChangeListener);
  }
  
  private void fireChange()
  {
    ChangeEvent localChangeEvent = new ChangeEvent(this);
    ArrayList localArrayList;
    synchronized (this)
    {
      localArrayList = new ArrayList(listeners);
    }
    for (??? = localArrayList.iterator(); ((Iterator)???).hasNext();)
    {
      ChangeListener localChangeListener = (ChangeListener)((Iterator)???).next();
      localChangeListener.stateChanged(localChangeEvent);
    }
  }
  
  private String getBundle(String paramString, String... paramVarArgs)
  {
    return NbBundle.getMessage(CustomHandleStep.class, paramString, paramVarArgs);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.CustomHandleStep
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import org.netbeans.modules.autoupdate.ui.PluginManagerUI;
import org.openide.util.RequestProcessor.Task;

class InstallStep$1
  implements PropertyChangeListener
{
  InstallStep$1(InstallStep paramInstallStep) {}
  
  public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
  {
    if ("run-action".equals(paramPropertyChangeEvent.getPropertyName()))
    {
      RequestProcessor.Task localTask = InstallStep.access$000(this$0);
      PluginManagerUI.registerRunningTask(localTask);
      localTask.waitFinished();
      PluginManagerUI.unregisterRunningTask();
    }
    else if ("run-in-background".equals(paramPropertyChangeEvent.getPropertyName()))
    {
      InstallStep.access$100(this$0, true);
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.awt.Dialog;

class InstallStep$10
  implements Runnable
{
  InstallStep$10(InstallStep paramInstallStep, Dialog paramDialog) {}
  
  public void run()
  {
    val$dlg.setVisible(true);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.10
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.JLabel;
import org.netbeans.api.progress.ProgressHandle;

class InstallStep$11
  implements PropertyChangeListener
{
  InstallStep$11(InstallStep paramInstallStep) {}
  
  public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
  {
    assert ("text".equals(paramPropertyChangeEvent.getPropertyName())) : ("Listens onlo on text but was " + paramPropertyChangeEvent);
    if (paramPropertyChangeEvent.getOldValue() != paramPropertyChangeEvent.getNewValue())
    {
      InstallStep.access$408(this$0);
      if ((InstallStep.access$500(this$0)) && (InstallStep.access$600(this$0)) && 
        (InstallStep.access$400(this$0) < InstallStep.access$700(this$0) - 1))
      {
        InstallStep.access$702(this$0, InstallStep.access$700(this$0) - InstallStep.access$400(this$0));
        InstallStep.access$800(this$0).switchToDeterminate(InstallStep.access$700(this$0));
        InstallStep.access$502(this$0, false);
      }
      if (!InstallStep.access$500(this$0)) {
        InstallStep.access$800(this$0).progress(((JLabel)paramPropertyChangeEvent.getSource()).getText(), InstallStep.access$400(this$0) < InstallStep.access$700(this$0) - 1 ? InstallStep.access$400(this$0) : InstallStep.access$700(this$0) - 1);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.11
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.api.autoupdate.InstallSupport;
import org.netbeans.api.autoupdate.OperationException;
import org.netbeans.api.autoupdate.OperationSupport.Restarter;

final class InstallStep$12
  implements Runnable
{
  InstallStep$12(InstallSupport paramInstallSupport, OperationSupport.Restarter paramRestarter) {}
  
  public void run()
  {
    try
    {
      val$support.doRestart(val$r, null);
    }
    catch (OperationException localOperationException)
    {
      InstallStep.access$900().log(Level.INFO, localOperationException.getMessage(), localOperationException);
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.12
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

final class InstallStep$13
  implements ActionListener
{
  InstallStep$13(Runnable paramRunnable) {}
  
  public void actionPerformed(ActionEvent paramActionEvent)
  {
    val$onMouseClick.run();
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.13
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import org.netbeans.api.autoupdate.OperationException;
import org.netbeans.modules.autoupdate.ui.NetworkProblemPanel;

class InstallStep$14
  implements ActionListener
{
  InstallStep$14(InstallStep paramInstallStep, OperationException paramOperationException) {}
  
  public void actionPerformed(ActionEvent paramActionEvent)
  {
    NetworkProblemPanel localNetworkProblemPanel = new NetworkProblemPanel(val$ex.getLocalizedMessage());
    localNetworkProblemPanel.showNetworkProblemDialog();
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.14
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

class InstallStep$2
  implements Runnable
{
  InstallStep$2(InstallStep paramInstallStep) {}
  
  public void run()
  {
    InstallStep.access$200(this$0);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import org.openide.util.Cancellable;

class InstallStep$3
  implements Cancellable
{
  InstallStep$3(InstallStep paramInstallStep) {}
  
  public boolean cancel()
  {
    return InstallStep.access$300(this$0);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import org.openide.util.Cancellable;

class InstallStep$4
  implements Cancellable
{
  InstallStep$4(InstallStep paramInstallStep) {}
  
  public boolean cancel()
  {
    return InstallStep.access$300(this$0);
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.JLabel;
import org.netbeans.api.progress.ProgressHandle;

class InstallStep$5
  implements PropertyChangeListener
{
  InstallStep$5(InstallStep paramInstallStep) {}
  
  public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
  {
    assert ("text".equals(paramPropertyChangeEvent.getPropertyName())) : ("Listens onlo on text but was " + paramPropertyChangeEvent);
    if (paramPropertyChangeEvent.getOldValue() != paramPropertyChangeEvent.getNewValue())
    {
      InstallStep.access$408(this$0);
      if ((InstallStep.access$500(this$0)) && (InstallStep.access$600(this$0)) && 
        (InstallStep.access$400(this$0) < InstallStep.access$700(this$0) - 1))
      {
        InstallStep.access$702(this$0, InstallStep.access$700(this$0) - InstallStep.access$400(this$0));
        InstallStep.access$800(this$0).switchToDeterminate(InstallStep.access$700(this$0));
        InstallStep.access$502(this$0, false);
      }
      if (!InstallStep.access$500(this$0)) {
        InstallStep.access$800(this$0).progress(((JLabel)paramPropertyChangeEvent.getSource()).getText(), InstallStep.access$400(this$0) < InstallStep.access$700(this$0) - 1 ? InstallStep.access$400(this$0) : InstallStep.access$700(this$0) - 1);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import org.openide.util.Cancellable;

class InstallStep$6
  implements Cancellable
{
  InstallStep$6(InstallStep paramInstallStep) {}
  
  public boolean cancel()
  {
    InstallStep.access$300(this$0);
    return true;
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.6
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import org.openide.util.Cancellable;

class InstallStep$7
  implements Cancellable
{
  InstallStep$7(InstallStep paramInstallStep) {}
  
  public boolean cancel()
  {
    InstallStep.access$300(this$0);
    return true;
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.7
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.JLabel;
import org.netbeans.api.progress.ProgressHandle;

class InstallStep$8
  implements PropertyChangeListener
{
  InstallStep$8(InstallStep paramInstallStep) {}
  
  public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
  {
    assert ("text".equals(paramPropertyChangeEvent.getPropertyName())) : ("Listens onlo on text but was " + paramPropertyChangeEvent);
    if (paramPropertyChangeEvent.getOldValue() != paramPropertyChangeEvent.getNewValue())
    {
      InstallStep.access$408(this$0);
      if ((InstallStep.access$500(this$0)) && (InstallStep.access$600(this$0)) && 
        (InstallStep.access$400(this$0) < InstallStep.access$700(this$0) - 1))
      {
        InstallStep.access$702(this$0, InstallStep.access$700(this$0) - InstallStep.access$400(this$0));
        InstallStep.access$800(this$0).switchToDeterminate(InstallStep.access$700(this$0));
        InstallStep.access$502(this$0, false);
      }
      if (!InstallStep.access$500(this$0)) {
        InstallStep.access$800(this$0).progress(((JLabel)paramPropertyChangeEvent.getSource()).getText(), InstallStep.access$400(this$0) < InstallStep.access$700(this$0) - 1 ? InstallStep.access$400(this$0) : InstallStep.access$700(this$0) - 1);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.netbeans.modules.autoupdate.ui.wizards.InstallStep.8
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.netbeans.modules.autoupdate.ui.wizards;

import java.awt.even
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd