jaccess

16:36:54.498 INFO  jd.cli.Main - Decompiling jaccess.jar
package com.sun.java.accessibility.util;

import java.awt.Window;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.PrintStream;
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
import javax.accessibility.AccessibleRole;
import javax.accessibility.AccessibleState;
import javax.accessibility.AccessibleStateSet;

class AccessibilityEventMonitor$AccessibilityEventListener
  implements TopLevelWindowListener, PropertyChangeListener
{
  public AccessibilityEventMonitor$AccessibilityEventListener()
  {
    EventQueueMonitor.addTopLevelWindowListener(this);
  }
  
  protected void installListeners()
  {
    Window[] arrayOfWindow = EventQueueMonitor.getTopLevelWindows();
    if (arrayOfWindow != null) {
      for (int i = 0; i < arrayOfWindow.length; i++) {
        if ((arrayOfWindow[i] instanceof Accessible)) {
          installListeners(arrayOfWindow[i]);
        }
      }
    }
  }
  
  protected void installListeners(Accessible paramAccessible)
  {
    installListeners(paramAccessible.getAccessibleContext());
  }
  
  private void installListeners(AccessibleContext paramAccessibleContext)
  {
    if (paramAccessibleContext != null)
    {
      AccessibleStateSet localAccessibleStateSet1 = paramAccessibleContext.getAccessibleStateSet();
      if (!localAccessibleStateSet1.contains(AccessibleState.TRANSIENT))
      {
        paramAccessibleContext.addPropertyChangeListener(this);
        
        AccessibleStateSet localAccessibleStateSet2 = paramAccessibleContext.getAccessibleStateSet();
        if (localAccessibleStateSet2.contains(_AccessibleState.MANAGES_DESCENDANTS)) {
          return;
        }
        AccessibleRole localAccessibleRole = paramAccessibleContext.getAccessibleRole();
        if ((localAccessibleRole == AccessibleRole.LIST) || (localAccessibleRole == AccessibleRole.TREE)) {
          return;
        }
        if (localAccessibleRole == AccessibleRole.TABLE)
        {
          Accessible localAccessible1 = paramAccessibleContext.getAccessibleChild(0);
          if (localAccessible1 != null)
          {
            AccessibleContext localAccessibleContext = localAccessible1.getAccessibleContext();
            if (localAccessibleContext != null)
            {
              localAccessibleRole = localAccessibleContext.getAccessibleRole();
              if ((localAccessibleRole != null) && (localAccessibleRole != AccessibleRole.TABLE)) {
                return;
              }
            }
          }
        }
        int i = paramAccessibleContext.getAccessibleChildrenCount();
        for (int j = 0; j < i; j++)
        {
          Accessible localAccessible2 = paramAccessibleContext.getAccessibleChild(j);
          if (localAccessible2 != null) {
            installListeners(localAccessible2);
          }
        }
      }
    }
  }
  
  protected void removeListeners()
  {
    Window[] arrayOfWindow = EventQueueMonitor.getTopLevelWindows();
    if (arrayOfWindow != null) {
      for (int i = 0; i < arrayOfWindow.length; i++) {
        if ((arrayOfWindow[i] instanceof Accessible)) {
          removeListeners(arrayOfWindow[i]);
        }
      }
    }
  }
  
  protected void removeListeners(Accessible paramAccessible)
  {
    removeListeners(paramAccessible.getAccessibleContext());
  }
  
  private void removeListeners(AccessibleContext paramAccessibleContext)
  {
    if (paramAccessibleContext != null)
    {
      AccessibleStateSet localAccessibleStateSet = paramAccessibleContext.getAccessibleStateSet();
      if (!localAccessibleStateSet.contains(AccessibleState.TRANSIENT))
      {
        paramAccessibleContext.removePropertyChangeListener(this);
        if (localAccessibleStateSet.contains(_AccessibleState.MANAGES_DESCENDANTS)) {
          return;
        }
        AccessibleRole localAccessibleRole = paramAccessibleContext.getAccessibleRole();
        if ((localAccessibleRole == AccessibleRole.LIST) || (localAccessibleRole == AccessibleRole.TABLE) || (localAccessibleRole == AccessibleRole.TREE)) {
          return;
        }
        int i = paramAccessibleContext.getAccessibleChildrenCount();
        for (int j = 0; j < i; j++)
        {
          Accessible localAccessible = paramAccessibleContext.getAccessibleChild(j);
          if (localAccessible != null) {
            removeListeners(localAccessible);
          }
        }
      }
    }
  }
  
  public void topLevelWindowCreated(Window paramWindow)
  {
    if ((paramWindow instanceof Accessible)) {
      installListeners(paramWindow);
    }
  }
  
  public void topLevelWindowDestroyed(Window paramWindow)
  {
    if ((paramWindow instanceof Accessible)) {
      removeListeners(paramWindow);
    }
  }
  
  public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
  {
    Object[] arrayOfObject = AccessibilityEventMonitor.listenerList.getListenerList();
    for (int i = arrayOfObject.length - 2; i >= 0; i -= 2) {
      if (arrayOfObject[i] == PropertyChangeListener.class) {
        ((PropertyChangeListener)arrayOfObject[(i + 1)]).propertyChange(paramPropertyChangeEvent);
      }
    }
    String str = paramPropertyChangeEvent.getPropertyName();
    if (str.compareTo("AccessibleChild") == 0)
    {
      Object localObject1 = paramPropertyChangeEvent.getOldValue();
      Object localObject2 = paramPropertyChangeEvent.getNewValue();
      if (((localObject1 == null ? 1 : 0) ^ (localObject2 == null ? 1 : 0)) != 0)
      {
        Accessible localAccessible;
        if (localObject1 != null)
        {
          if ((localObject1 instanceof Accessible))
          {
            localAccessible = (Accessible)localObject1;
            removeListeners(localAccessible.getAccessibleContext());
          }
          else if ((localObject1 instanceof AccessibleContext))
          {
            removeListeners((AccessibleContext)localObject1);
          }
        }
        else if (localObject2 != null) {
          if ((localObject2 instanceof Accessible))
          {
            localAccessible = (Accessible)localObject2;
            installListeners(localAccessible.getAccessibleContext());
          }
          else if ((localObject2 instanceof AccessibleContext))
          {
            installListeners((AccessibleContext)localObject2);
          }
        }
      }
      else
      {
        System.out.println("ERROR in usage of PropertyChangeEvents for: " + paramPropertyChangeEvent.toString());
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.java.accessibility.util.AccessibilityEventMonitor.AccessibilityEventListener
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.accessibility.util;

import java.awt.Window;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.PrintStream;
import javax.accessibility.Accessible;
import javax.accessibility.AccessibleContext;
import javax.accessibility.AccessibleRole;
import javax.accessibility.AccessibleState;
import javax.accessibility.AccessibleStateSet;
import jdk.Exported;

@Exported
public class AccessibilityEventMonitor
{
  protected static final AccessibilityListenerList listenerList = new AccessibilityListenerList();
  protected static final AccessibilityEventListener accessibilityListener = new AccessibilityEventListener();
  
  public static void addPropertyChangeListener(PropertyChangeListener paramPropertyChangeListener)
  {
    if (listenerList.getListenerCount(PropertyChangeListener.class) == 0) {
      accessibilityListener.installListeners();
    }
    listenerList.add(PropertyChangeListener.class, paramPropertyChangeListener);
  }
  
  public static void removePropertyChangeListener(PropertyChangeListener paramPropertyChangeListener)
  {
    listenerList.remove(PropertyChangeListener.class, paramPropertyChangeListener);
    if (listenerList.getListenerCount(PropertyChangeListener.class) == 0) {
      accessibilityListener.removeListeners();
    }
  }
  
  static class AccessibilityEventListener
    implements TopLevelWindowListener, PropertyChangeListener
  {
    public AccessibilityEventListener()
    {
      EventQueueMonitor.addTopLevelWindowListener(this);
    }
    
    protected void installListeners()
    {
      Window[] arrayOfWindow = EventQueueMonitor.getTopLevelWindows();
      if (arrayOfWindow != null) {
        for (int i = 0; i < arrayOfWindow.length; i++) {
          if ((arrayOfWindow[i] instanceof Accessible)) {
            installListeners(arrayOfWindow[i]);
          }
        }
      }
    }
    
    protected void installListeners(Accessible paramAccessible)
    {
      installListeners(paramAccessible.getAccessibleContext());
    }
    
    private void installListeners(AccessibleContext paramAccessibleContext)
    {
      if (paramAccessibleContext != null)
      {
        AccessibleStateSet localAccessibleStateSet1 = paramAccessibleContext.getAccessibleStateSet();
        if (!localAccessibleStateSet1.contains(AccessibleState.TRANSIENT))
        {
          paramAccessibleContext.addPropertyChangeListener(this);
          
          AccessibleStateSet localAccessibleStateSet2 = paramAccessibleContext.getAccessibleStateSet();
          if (localAccessibleStateSet2.contains(_AccessibleState.MANAGES_DESCENDANTS)) {
            return;
          }
          AccessibleRole localAccessibleRole = paramAccessibleContext.getAccessibleRole();
          if ((localAccessibleRole == AccessibleRole.LIST) || (localAccessibleRole == AccessibleRole.TREE)) {
            return;
          }
          if (localAccessibleRole == AccessibleRole.TABLE)
          {
            Accessible localAccessible1 = paramAccessibleContext.getAccessibleChild(0);
            if (localAccessible1 != null)
            {
              AccessibleContext localAccessibleContext = localAccessible1.getAccessibleContext();
              if (localAccessibleContext != null)
              {
                localAccessibleRole = localAccessibleContext.getAccessibleRole();
                if ((localAccessibleRole != null) && (localAccessibleRole != AccessibleRole.TABLE)) {
                  return;
                }
              }
            }
          }
          int i = paramAccessibleContext.getAccessibleChildrenCount();
          for (int j = 0; j < i; j++)
          {
            Accessible localAccessible2 = paramAccessibleContext.getAccessibleChild(j);
            if (localAccessible2 != null) {
              installListeners(localAccessible2);
            }
          }
        }
      }
    }
    
    protected void removeListeners()
    {
      Window[] arrayOfWindow = EventQueueMonitor.getTopLevelWindows();
      if (arrayOfWindow != null) {
        for (int i = 0; i < arrayOfWindow.length; i++) {
          if ((arrayOfWindow[i] instanceof Accessible)) {
            removeListeners(arrayOfWindow[i]);
          }
        }
      }
    }
    
    protected void removeListeners(Accessible paramAccessible)
    {
      removeListeners(paramAccessible.getAccessibleContext());
    }
    
    private void removeListeners(AccessibleContext paramAccessibleContext)
    {
      if (paramAccessibleContext != null)
      {
        AccessibleStateSet localAccessibleStateSet = paramAccessibleContext.getAccessibleStateSet();
        if (!localAccessibleStateSet.contains(AccessibleState.TRANSIENT))
        {
          paramAccessibleContext.removePropertyChangeListener(this);
          if (localAccessibleStateSet.contains(_AccessibleState.MANAGES_DESCENDANTS)) {
            return;
          }
          AccessibleRole localAccessibleRole = paramAccessibleContext.getAccessibleRole();
          if ((localAccessibleRole == AccessibleRole.LIST) || (localAccessibleRole == AccessibleRole.TABLE) || (localAccessibleRole == AccessibleRole.TREE)) {
            return;
          }
          int i = paramAccessibleContext.getAccessibleChildrenCount();
          for (int j = 0; j < i; j++)
          {
            Accessible localAccessible = paramAccessibleContext.getAccessibleChild(j);
            if (localAccessible != null) {
              removeListeners(localAccessible);
            }
          }
        }
      }
    }
    
    public void topLevelWindowCreated(Window paramWindow)
    {
      if ((paramWindow instanceof Accessible)) {
        installListeners(paramWindow);
      }
    }
    
    public void topLevelWindowDestroyed(Window paramWindow)
    {
      if ((paramWindow instanceof Accessible)) {
        removeListeners(paramWindow);
      }
    }
    
    public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
    {
      Object[] arrayOfObject = AccessibilityEventMonitor.listenerList.getListenerList();
      for (int i = arrayOfObject.length - 2; i >= 0; i -= 2) {
        if (arrayOfObject[i] == PropertyChangeListener.class) {
          ((PropertyChangeListener)arrayOfObject[(i + 1)]).propertyChange(paramPropertyChangeEvent);
        }
      }
      String str = paramPropertyChangeEvent.getPropertyName();
      if (str.compareTo("AccessibleChild") == 0)
      {
        Object localObject1 = paramPropertyChangeEvent.getOldValue();
        Object localObject2 = paramPropertyChangeEvent.getNewValue();
        if (((localObject1 == null ? 1 : 0) ^ (localObject2 == null ? 1 : 0)) != 0)
        {
          Accessible localAccessible;
          if (localObject1 != null)
          {
            if ((localObject1 instanceof Accessible))
            {
              localAccessible = (Accessible)localObject1;
              removeListeners(localAccessible.getAccessibleContext());
            }
            else if ((localObject1 instanceof AccessibleContext))
            {
              removeListeners((AccessibleContext)localObject1);
            }
          }
          else if (localObject2 != null) {
            if ((localObject2 instanceof Accessible))
            {
              localAccessible = (Accessible)localObject2;
              installListeners(localAccessible.getAccessibleContext());
            }
            else if ((localObject2 instanceof AccessibleContext))
            {
              installListeners((AccessibleContext)localObject2);
            }
          }
        }
        else
        {
          System.out.println("ERROR in usage of PropertyChangeEvents for: " + paramPropertyChangeEvent.toString());
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.java.accessibility.util.AccessibilityEventMonitor
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.accessibility.util;

import java.util.EventListener;
import jdk.Exported;

@Exported
public class AccessibilityListenerList
{
  private static final Object[] NULL_ARRAY = new Object[0];
  protected transient Object[] listenerList = NULL_ARRAY;
  
  public Object[] getListenerList()
  {
    return listenerList;
  }
  
  public int getListenerCount()
  {
    return listenerList.length / 2;
  }
  
  public int getListenerCount(Class paramClass)
  {
    int i = 0;
    Object[] arrayOfObject = listenerList;
    for (int j = 0; j < arrayOfObject.length; j += 2) {
      if (paramClass == (Class)arrayOfObject[j]) {
        i++;
      }
    }
    return i;
  }
  
  public synchronized void add(Class paramClass, EventListener paramEventListener)
  {
    if (!paramClass.isInstance(paramEventListener)) {
      throw new IllegalArgumentException("Listener " + paramEventListener + " is not of type " + paramClass);
    }
    if (paramEventListener == null) {
      throw new IllegalArgumentException("Listener " + paramEventListener + " is null");
    }
    if (listenerList == NULL_ARRAY)
    {
      listenerList = new Object[] { paramClass, paramEventListener };
    }
    else
    {
      int i = listenerList.length;
      Object[] arrayOfObject = new Object[i + 2];
      System.arraycopy(listenerList, 0, arrayOfObject, 0, i);
      
      arrayOfObject[i] = paramClass;
      arrayOfObject[(i + 1)] = paramEventListener;
      
      listenerList = arrayOfObject;
    }
  }
  
  public synchronized void remove(Class paramClass, EventListener paramEventListener)
  {
    if (!paramClass.isInstance(paramEventListener)) {
      throw new IllegalArgumentException("Listener " + paramEventListener + " is not of type " + paramClass);
    }
    if (paramEventListener == null) {
      throw new IllegalArgumentException("Listener " + paramEventListener + " is null");
    }
    int i = -1;
    for (int j = listenerList.length - 2; j >= 0; j -= 2) {
      if ((listenerList[j] == paramClass) && (listenerList[(j + 1)] == paramEventListener))
      {
        i = j;
        break;
      }
    }
    if (i != -1)
    {
      Object[] arrayOfObject = new Object[listenerList.length - 2];
      
      System.arraycopy(listenerList, 0, arrayOfObject, 0, i);
      if (i < arrayOfObject.length) {
        System.arraycopy(listenerList, i + 2, arrayOfObject, i, arrayOfObject.length - i);
      }
      listenerList = (arrayOfObject.length == 0 ? NULL_ARRAY : arrayOfObject);
    }
  }
  
  public String toString()
  {
    Object[] arrayOfObject = listenerList;
    String str = "EventListenerList: ";
    str = str + arrayOfObject.length / 2 + " listeners: ";
    for (int i = 0; i <= arrayOfObject.length - 2; i += 2)
    {
      str = str + " type " + ((Class)arrayOfObject[i]).getName();
      str = str + " listener " + arrayOfObject[(i + 1)];
    }
    return str;
  }
}

/* Location:
 * Qualified Name:     com.sun.java.accessibility.util.AccessibilityListenerList
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.accessibility.util;

import java.awt.Adjustable;
import java.awt.Component;
import java.awt.Container;
import java.awt.KeyboardFocusManager;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.awt.event.ContainerEvent;
import java.awt.event.ContainerListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.TextEvent;
import java.awt.event.TextListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.io.PrintStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import javax.swing.JMenu;
import javax.swing.JPopupMenu;
import javax.swing.JRootPane;
import javax.swing.MenuElement;
import javax.swing.MenuSelectionManager;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

class AWTEventMonitor$AWTEventsListener
  implements TopLevelWindowListener, ActionListener, AdjustmentListener, ComponentListener, ContainerListener, FocusListener, ItemListener, KeyListener, MouseListener, MouseMotionListener, TextListener, WindowListener, ChangeListener
{
  private Class[] actionListeners;
  private Method removeActionMethod;
  private Method addActionMethod;
  private Object[] actionArgs;
  private Class[] itemListeners;
  private Method removeItemMethod;
  private Method addItemMethod;
  private Object[] itemArgs;
  private Class[] textListeners;
  private Method removeTextMethod;
  private Method addTextMethod;
  private Object[] textArgs;
  private Class[] windowListeners;
  private Method removeWindowMethod;
  private Method addWindowMethod;
  private Object[] windowArgs;
  
  public AWTEventMonitor$AWTEventsListener()
  {
    String str = System.getProperty("java.version");
    if (str != null) {
      AWTEventMonitor.access$002(str.compareTo("1.4") >= 0);
    }
    initializeIntrospection();
    installListeners();
    if (AWTEventMonitor.access$000()) {
      MenuSelectionManager.defaultManager().addChangeListener(this);
    }
    EventQueueMonitor.addTopLevelWindowListener(this);
  }
  
  private boolean initializeIntrospection()
  {
    try
    {
      actionListeners = new Class[1];
      actionArgs = new Object[1];
      actionListeners[0] = Class.forName("java.awt.event.ActionListener");
      actionArgs[0] = this;
      
      itemListeners = new Class[1];
      itemArgs = new Object[1];
      itemListeners[0] = Class.forName("java.awt.event.ItemListener");
      itemArgs[0] = this;
      
      textListeners = new Class[1];
      textArgs = new Object[1];
      textListeners[0] = Class.forName("java.awt.event.TextListener");
      textArgs[0] = this;
      
      windowListeners = new Class[1];
      windowArgs = new Object[1];
      windowListeners[0] = Class.forName("java.awt.event.WindowListener");
      windowArgs[0] = this;
      
      return true;
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      System.out.println("EXCEPTION - Class 'java.awt.event.*' not in CLASSPATH");
    }
    return false;
  }
  
  protected void installListeners()
  {
    Window[] arrayOfWindow = EventQueueMonitor.getTopLevelWindows();
    if (arrayOfWindow != null) {
      for (int i = 0; i < arrayOfWindow.length; i++) {
        installListeners(arrayOfWindow[i]);
      }
    }
  }
  
  protected void installListeners(int paramInt)
  {
    Window[] arrayOfWindow = EventQueueMonitor.getTopLevelWindows();
    if (arrayOfWindow != null) {
      for (int i = 0; i < arrayOfWindow.length; i++) {
        installListeners(arrayOfWindow[i], paramInt);
      }
    }
  }
  
  protected void installListeners(Component paramComponent)
  {
    installListeners(paramComponent, 3);
    installListeners(paramComponent, 4);
    if (AWTEventMonitor.access$100() != null) {
      installListeners(paramComponent, 2);
    }
    if (AWTEventMonitor.access$200() != null) {
      installListeners(paramComponent, 6);
    }
    if (AWTEventMonitor.access$300() != null) {
      installListeners(paramComponent, 7);
    }
    if (AWTEventMonitor.access$400() != null) {
      installListeners(paramComponent, 8);
    }
    if (AWTEventMonitor.access$500() != null) {
      installListeners(paramComponent, 11);
    }
    if (AWTEventMonitor.access$600() != null) {
      installListeners(paramComponent, 0);
    }
    if (AWTEventMonitor.access$700() != null) {
      installListeners(paramComponent, 1);
    }
    if (AWTEventMonitor.access$800() != null) {
      installListeners(paramComponent, 5);
    }
    if (AWTEventMonitor.access$900() != null) {
      installListeners(paramComponent, 10);
    }
  }
  
  public void stateChanged(ChangeEvent paramChangeEvent)
  {
    processFocusGained();
  }
  
  private void processFocusGained()
  {
    Component localComponent1 = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
    if (localComponent1 == null) {
      return;
    }
    MenuSelectionManager.defaultManager().removeChangeListener(this);
    MenuSelectionManager.defaultManager().addChangeListener(this);
    if ((localComponent1 instanceof JRootPane))
    {
      MenuElement[] arrayOfMenuElement = MenuSelectionManager.defaultManager().getSelectedPath();
      if (arrayOfMenuElement.length > 1)
      {
        Component localComponent2 = arrayOfMenuElement[(arrayOfMenuElement.length - 2)].getComponent();
        Component localComponent3 = arrayOfMenuElement[(arrayOfMenuElement.length - 1)].getComponent();
        if (((localComponent3 instanceof JPopupMenu)) || ((localComponent3 instanceof JMenu))) {
          AWTEventMonitor.access$1002(localComponent3);
        } else if ((localComponent2 instanceof JPopupMenu)) {
          AWTEventMonitor.access$1002(localComponent2);
        }
      }
    }
    else
    {
      AWTEventMonitor.access$1002(localComponent1);
    }
  }
  
  protected void installListeners(Component paramComponent, int paramInt)
  {
    switch (paramInt)
    {
    case 0: 
      try
      {
        removeActionMethod = paramComponent.getClass().getMethod("removeActionListener", actionListeners);
        
        addActionMethod = paramComponent.getClass().getMethod("addActionListener", actionListeners);
        try
        {
          removeActionMethod.invoke(paramComponent, actionArgs);
          addActionMethod.invoke(paramComponent, actionArgs);
        }
        catch (InvocationTargetException localInvocationTargetException1)
        {
          System.out.println("Exception: " + localInvocationTargetException1.toString());
        }
        catch (IllegalAccessException localIllegalAccessException1)
        {
          System.out.println("Exception: " + localIllegalAccessException1.toString());
        }
      }
      catch (NoSuchMethodException localNoSuchMethodException1) {}catch (SecurityException localSecurityException1)
      {
        System.out.println("Exception: " + localSecurityException1.toString());
      }
    case 1: 
      if ((paramComponent instanceof Adjustable))
      {
        ((Adjustable)paramComponent).removeAdjustmentListener(this);
        ((Adjustable)paramComponent).addAdjustmentListener(this);
      }
      break;
    case 2: 
      paramComponent.removeComponentListener(this);
      paramComponent.addComponentListener(this);
      break;
    case 3: 
      if ((paramComponent instanceof Container))
      {
        ((Container)paramComponent).removeContainerListener(this);
        ((Container)paramComponent).addContainerListener(this);
      }
      break;
    case 4: 
      paramComponent.removeFocusListener(this);
      paramComponent.addFocusListener(this);
      if (AWTEventMonitor.access$000()) {
        processFocusGained();
      } else if ((paramComponent != AWTEventMonitor.access$1000()) && (paramComponent.hasFocus())) {
        AWTEventMonitor.access$1002(paramComponent);
      }
      break;
    case 5: 
      try
      {
        removeItemMethod = paramComponent.getClass().getMethod("removeItemListener", itemListeners);
        
        addItemMethod = paramComponent.getClass().getMethod("addItemListener", itemListeners);
        try
        {
          removeItemMethod.invoke(paramComponent, itemArgs);
          addItemMethod.invoke(paramComponent, itemArgs);
        }
        catch (InvocationTargetException localInvocationTargetException2)
        {
          System.out.println("Exception: " + localInvocationTargetException2.toString());
        }
        catch (IllegalAccessException localIllegalAccessException2)
        {
          System.out.println("Exception: " + localIllegalAccessException2.toString());
        }
      }
      catch (NoSuchMethodException localNoSuchMethodException2) {}catch (SecurityException localSecurityException2)
      {
        System.out.println("Exception: " + localSecurityException2.toString());
      }
    case 6: 
      paramComponent.removeKeyListener(this);
      paramComponent.addKeyListener(this);
      break;
    case 7: 
      paramComponent.removeMouseListener(this);
      paramComponent.addMouseListener(this);
      break;
    case 8: 
      paramComponent.removeMouseMotionListener(this);
      paramComponent.addMouseMotionListener(this);
      break;
    case 10: 
      try
      {
        removeTextMethod = paramComponent.getClass().getMethod("removeTextListener", textListeners);
        
        addTextMethod = paramComponent.getClass().getMethod("addTextListener", textListeners);
        try
        {
          removeTextMethod.invoke(paramComponent, textArgs);
          addTextMethod.invoke(paramComponent, textArgs);
        }
        catch (InvocationTargetException localInvocationTargetException3)
        {
          System.out.println("Exception: " + localInvocationTargetException3.toString());
        }
        catch (IllegalAccessException localIllegalAccessException3)
        {
          System.out.println("Exception: " + localIllegalAccessException3.toString());
        }
      }
      catch (NoSuchMethodException localNoSuchMethodException3) {}catch (SecurityException localSecurityException3)
      {
        System.out.println("Exception: " + localSecurityException3.toString());
      }
    case 11: 
      try
      {
        removeWindowMethod = paramComponent.getClass().getMethod("removeWindowListener", windowListeners);
        
        addWindowMethod = paramComponent.getClass().getMethod("addWindowListener", windowListeners);
        try
        {
          removeWindowMethod.invoke(paramComponent, windowArgs);
          addWindowMethod.invoke(paramComponent, windowArgs);
        }
        catch (InvocationTargetException localInvocationTargetException4)
        {
          System.out.println("Exception: " + localInvocationTargetException4.toString());
        }
        catch (IllegalAccessException localIllegalAccessException4)
        {
          System.out.println("Exception: " + localIllegalAccessException4.toString());
        }
      }
      catch (NoSuchMethodException localNoSuchMethodException4) {}catch (SecurityException localSecurityException4)
      {
        System.out.println("Exception: " + localSecurityException4.toString());
      }
    case 9: 
    default: 
      return;
    }
    if ((paramComponent instanceof Container))
    {
      int i = ((Container)paramComponent).getComponentCount();
      for (int j = 0; j < i; j++) {
        installListeners(((Container)paramComponent).getComponent(j), paramInt);
      }
    }
  }
  
  protected void removeListeners(int paramInt)
  {
    Window[] arrayOfWindow = EventQueueMonitor.getTopLevelWindows();
    if (arrayOfWindow != null) {
      for (int i = 0; i < arrayOfWindow.length; i++) {
        removeListeners(arrayOfWindow[i], paramInt);
      }
    }
  }
  
  protected void removeListeners(Component paramComponent)
  {
    if (AWTEventMonitor.access$100() != null) {
      removeListeners(paramComponent, 2);
    }
    if (AWTEventMonitor.access$200() != null) {
      removeListeners(paramComponent, 6);
    }
    if (AWTEventMonitor.access$300() != null) {
      removeListeners(paramComponent, 7);
    }
    if (AWTEventMonitor.access$400() != null) {
      removeListeners(paramComponent, 8);
    }
    if (AWTEventMonitor.access$500() != null) {
      removeListeners(paramComponent, 11);
    }
    if (AWTEventMonitor.access$600() != null) {
      removeListeners(paramComponent, 0);
    }
    if (AWTEventMonitor.access$700() != null) {
      removeListeners(paramComponent, 1);
    }
    if (AWTEventMonitor.access$800() != null) {
      removeListeners(paramComponent, 5);
    }
    if (AWTEventMonitor.access$900() != null) {
      removeListeners(paramComponent, 10);
    }
  }
  
  protected void removeListeners(Component paramComponent, int paramInt)
  {
    switch (paramInt)
    {
    case 0: 
      try
      {
        removeActionMethod = paramComponent.getClass().getMethod("removeActionListener", actionListeners);
        try
        {
          removeActionMethod.invoke(paramComponent, actionArgs);
        }
        catch (InvocationTargetException localInvocationTargetException1)
        {
          System.out.println("Exception: " + localInvocationTargetException1.toString());
        }
        catch (IllegalAccessException localIllegalAccessException1)
        {
          System.out.println("Exception: " + localIllegalAccessException1.toString());
        }
      }
      catch (NoSuchMethodException localNoSuchMethodException1) {}catch (SecurityException localSecurityException1)
      {
        System.out.println("Exception: " + localSecurityException1.toString());
      }
    case 1: 
      if ((paramComponent instanceof Adjustable)) {
        ((Adjustable)paramComponent).removeAdjustmentListener(this);
      }
      break;
    case 2: 
      paramComponent.removeComponentListener(this);
      break;
    case 5: 
      try
      {
        removeItemMethod = paramComponent.getClass().getMethod("removeItemListener", itemListeners);
        try
        {
          removeItemMethod.invoke(paramComponent, itemArgs);
        }
        catch (InvocationTargetException localInvocationTargetException2)
        {
          System.out.println("Exception: " + localInvocationTargetException2.toString());
        }
        catch (IllegalAccessException localIllegalAccessException2)
        {
          System.out.println("Exception: " + localIllegalAccessException2.toString());
        }
      }
      catch (NoSuchMethodException localNoSuchMethodException2) {}catch (SecurityException localSecurityException2)
      {
        System.out.println("Exception: " + localSecurityException2.toString());
      }
    case 6: 
      paramComponent.removeKeyListener(this);
      break;
    case 7: 
      paramComponent.removeMouseListener(this);
      break;
    case 8: 
      paramComponent.removeMouseMotionListener(this);
      break;
    case 10: 
      try
      {
        removeTextMethod = paramComponent.getClass().getMethod("removeTextListener", textListeners);
        try
        {
          removeTextMethod.invoke(paramComponent, textArgs);
        }
        catch (InvocationTargetException localInvocationTargetException3)
        {
          System.out.println("Exception: " + localInvocationTargetException3.toString());
        }
        catch (IllegalAccessException localIllegalAccessException3)
        {
          System.out.println("Exception: " + localIllegalAccessException3.toString());
        }
      }
      catch (NoSuchMethodException localNoSuchMethodException3) {}catch (SecurityException localSecurityException3)
      {
        System.out.println("Exception: " + localSecurityException3.toString());
      }
    case 11: 
      try
      {
        removeWindowMethod = paramComponent.getClass().getMethod("removeWindowListener", windowListeners);
        try
        {
          removeWindowMethod.invoke(paramComponent, windowArgs);
        }
        catch (InvocationTargetException localInvocationTargetException4)
        {
          System.out.println("Exception: " + localInvocationTargetException4.toString());
        }
        catch (IllegalAccessException localIllegalAccessException4)
        {
          System.out.println("Exception: " + localIllegalAccessException4.toString());
        }
      }
      catch (NoSuchMethodException localNoSuchMethodException4) {}catch (SecurityException localSecurityException4)
      {
        System.out.println("Exception: " + localSecurityException4.toString());
      }
    case 3: 
    case 4: 
    case 9: 
    default: 
      return;
    }
    if ((paramComponent instanceof Container))
    {
      int i = ((Container)paramComponent).getComponentCount();
      for (int j = 0; j < i; j++) {
        removeListeners(((Container)paramComponent).getComponent(j), paramInt);
      }
    }
  }
  
  public void topLevelWindowCreated(Window paramWindow)
  {
    installListeners(paramWindow);
  }
  
  public void topLevelWindowDestroyed(Window paramWindow) {}
  
  public void actionPerformed(ActionEvent paramActionEvent)
  {
    if (AWTEventMonitor.access$600() != null) {
      AWTEventMonitor.access$600().actionPerformed(paramActionEvent);
    }
  }
  
  public void adjustmentValueChanged(AdjustmentEvent paramAdjustmentEvent)
  {
    if (AWTEventMonitor.access$700() != null) {
      AWTEventMonitor.access$700().adjustmentValueChanged(paramAdjustmentEvent);
    }
  }
  
  public void componentHidden(ComponentEvent paramComponentEvent)
  {
    if (AWTEventMonitor.access$100() != null) {
      AWTEventMonitor.access$100().componentHidden(paramComponentEvent);
    }
  }
  
  public void componentMoved(ComponentEvent paramComponentEvent)
  {
    if (AWTEventMonitor.access$100() != null) {
      AWTEventMonitor.access$100().componentMoved(paramComponentEvent);
    }
  }
  
  public void componentResized(ComponentEvent paramComponentEvent)
  {
    if (AWTEventMonitor.access$100() != null) {
      AWTEventMonitor.access$100().componentResized(paramComponentEvent);
    }
  }
  
  public void componentShown(ComponentEvent paramComponentEvent)
  {
    if (AWTEventMonitor.access$100() != null) {
      AWTEventMonitor.access$100().componentShown(paramComponentEvent);
    }
  }
  
  public void componentAdded(ContainerEvent paramContainerEvent)
  {
    installListeners(paramContainerEvent.getChild());
    if (AWTEventMonitor.access$1100() != null) {
      AWTEventMonitor.access$1100().componentAdded(paramContainerEvent);
    }
  }
  
  public void componentRemoved(ContainerEvent paramContainerEvent)
  {
    removeListeners(paramContainerEvent.getChild());
    if (AWTEventMonitor.access$1100() != null) {
      AWTEventMonitor.access$1100().componentRemoved(paramContainerEvent);
    }
  }
  
  public void focusGained(FocusEvent paramFocusEvent)
  {
    AWTEventMonitor.access$1002((Component)paramFocusEvent.getSource());
    if (AWTEventMonitor.access$1200() != null) {
      AWTEventMonitor.access$1200().focusGained(paramFocusEvent);
    }
  }
  
  public void focusLost(FocusEvent paramFocusEvent)
  {
    AWTEventMonitor.access$1002(null);
    if (AWTEventMonitor.access$1200() != null) {
      AWTEventMonitor.access$1200().focusLost(paramFocusEvent);
    }
  }
  
  public void itemStateChanged(ItemEvent paramItemEvent)
  {
    if (AWTEventMonitor.access$800() != null) {
      AWTEventMonitor.access$800().itemStateChanged(paramItemEvent);
    }
  }
  
  public void keyPressed(KeyEvent paramKeyEvent)
  {
    if (AWTEventMonitor.access$200() != null) {
      AWTEventMonitor.access$200().keyPressed(paramKeyEvent);
    }
  }
  
  public void keyReleased(KeyEvent paramKeyEvent)
  {
    if (AWTEventMonitor.access$200() != null) {
      AWTEventMonitor.access$200().keyReleased(paramKeyEvent);
    }
  }
  
  public void keyTyped(KeyEvent paramKeyEvent)
  {
    if (AWTEventMonitor.access$200() != null) {
      AWTEventMonitor.access$200().keyTyped(paramKeyEvent);
    }
  }
  
  public void mouseClicked(MouseEvent paramMouseEvent)
  {
    if (AWTEventMonitor.access$300() != null) {
      AWTEventMonitor.access$300().mouseClicked(paramMouseEvent);
    }
  }
  
  public void mouseEntered(MouseEvent paramMouseEvent)
  {
    if (AWTEventMonitor.access$300() != null) {
      AWTEventMonitor.access$300().mouseEntered(paramMouseEvent);
    }
  }
  
  public void mouseExited(MouseEvent paramMouseEvent)
  {
    if (AWTEventMonitor.access$300() != null) {
      AWTEventMonitor.access$300().mouseExited(paramMouseEvent);
    }
  }
  
  public void mousePressed(MouseEvent paramMouseEvent)
  {
    if (AWTEventMonitor.access$300() != null) {
      AWTEventMonitor.access$300().mousePressed(paramMouseEvent);
    }
  }
  
  public void mouseReleased(MouseEvent paramMouseEvent)
  {
    if (AWTEventMonitor.access$300() != null) {
      AWTEventMonitor.access$300().mouseReleased(paramMouseEvent);
    }
  }
  
  public void mouseDragged(MouseEvent paramMouseEvent)
  {
    if (AWTEventMonitor.access$400() != null) {
      AWTEventMonitor.access$400().mouseDragged(paramMouseEvent);
    }
  }
  
  public void mouseMoved(MouseEvent paramMouseEvent)
  {
    if (AWTEventMonitor.access$400() != null) {
      AWTEventMonitor.access$400().mouseMoved(paramMouseEvent);
    }
  }
  
  public void textValueChanged(TextEvent paramTextEvent)
  {
    if (AWTEventMonitor.access$900() != null) {
      AWTEventMonitor.access$900().textValueChanged(paramTextEvent);
    }
  }
  
  public void windowOpened(WindowEvent paramWindowEvent)
  {
    if (AWTEventMonitor.access$500() != null) {
      AWTEventMonitor.access$500().windowOpened(paramWindowEvent);
    }
  }
  
  public void windowClosing(WindowEvent paramWindowEvent)
  {
    if (AWTEventMonitor.access$500() != null) {
      AWTEventMonitor.access$500().windowClosing(paramWindowEvent);
    }
  }
  
  public void windowClosed(WindowEvent paramWindowEvent)
  {
 
1 2 3 4 5 6 7

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