proguardgui

16:51:04.879 INFO  jd.cli.Main - Decompiling proguardgui.jar
package proguard.gui;

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

class OptimizationsDialog$3
  implements ActionListener
{
  private final OptimizationsDialog this$0;
  
  OptimizationsDialog$3(OptimizationsDialog paramOptimizationsDialog)
  {
    this$0 = paramOptimizationsDialog;
  }
  
  public void actionPerformed(ActionEvent paramActionEvent)
  {
    OptimizationsDialog.access$102(this$0, 0);
    this$0.hide();
  }
}

/* Location:
 * Qualified Name:     proguard.gui.OptimizationsDialog.3
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package proguard.gui;

import java.awt.Color;
import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.List;
import javax.swing.DefaultListModel;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.ListCellRenderer;
import proguard.ClassPath;
import proguard.ClassPathEntry;
import proguard.util.ListUtil;

class ClassPathPanel
  extends ListPanel
{
  private final JFrame owner;
  private final boolean inputAndOutput;
  private final JFileChooser chooser;
  private final FilterDialog filterDialog;
  
  public ClassPathPanel(JFrame paramJFrame, boolean paramBoolean)
  {
    firstSelectionButton = (paramBoolean ? 3 : 2);
    
    owner = paramJFrame;
    inputAndOutput = paramBoolean;
    
    list.setCellRenderer(new MyListCellRenderer());
    
    chooser = new JFileChooser("");
    chooser.setMultiSelectionEnabled(true);
    chooser.setFileSelectionMode(2);
    chooser.addChoosableFileFilter(new ExtensionFileFilter(msg("jarWarEarZipExtensions"), new String[] { ".jar", ".war", ".ear", ".zip" }));
    
    chooser.setApproveButtonText(msg("ok"));
    
    filterDialog = new FilterDialog(paramJFrame, msg("enterFilter"));
    
    addAddButton(paramBoolean, false);
    if (paramBoolean) {
      addAddButton(paramBoolean, true);
    }
    addEditButton();
    addFilterButton();
    addRemoveButton();
    addUpButton();
    addDownButton();
    
    enableSelectionButtons();
  }
  
  protected void addAddButton(boolean paramBoolean1, boolean paramBoolean2)
  {
    JButton localJButton = new JButton(msg(paramBoolean1 ? "addInput" : paramBoolean2 ? "addOutput" : "add"));
    
    localJButton.addActionListener(new ActionListener()
    {
      private final boolean val$isOutput;
      
      public void actionPerformed(ActionEvent paramAnonymousActionEvent)
      {
        chooser.setDialogTitle(ClassPathPanel.msg("addJars"));
        chooser.setSelectedFile(null);
        chooser.setSelectedFiles(null);
        
        int i = chooser.showOpenDialog(owner);
        if (i == 0)
        {
          File[] arrayOfFile = chooser.getSelectedFiles();
          ClassPathEntry[] arrayOfClassPathEntry = ClassPathPanel.this.classPathEntries(arrayOfFile, val$isOutput);
          
          addElements(arrayOfClassPathEntry);
        }
      }
    });
    addButton(tip(localJButton, paramBoolean1 ? "addInputTip" : paramBoolean2 ? "addOutputTip" : "addTip"));
  }
  
  protected void addEditButton()
  {
    JButton localJButton = new JButton(msg("edit"));
    localJButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramAnonymousActionEvent)
      {
        boolean bool = false;
        
        int[] arrayOfInt = list.getSelectedIndices();
        
        File[] arrayOfFile = new File[arrayOfInt.length];
        Object localObject;
        for (int i = 0; i < arrayOfFile.length; i++)
        {
          localObject = (ClassPathEntry)listModel.getElementAt(arrayOfInt[i]);
          
          bool = ((ClassPathEntry)localObject).isOutput();
          
          arrayOfFile[i] = ((ClassPathEntry)localObject).getFile();
        }
        chooser.setDialogTitle(ClassPathPanel.msg("chooseJars"));
        
        chooser.setSelectedFile(arrayOfFile[0].getAbsoluteFile());
        chooser.setSelectedFiles(arrayOfFile);
        
        i = chooser.showOpenDialog(owner);
        if (i == 0)
        {
          arrayOfFile = chooser.getSelectedFiles();
          localObject = ClassPathPanel.this.classPathEntries(arrayOfFile, bool);
          if (arrayOfInt.length == arrayOfFile.length)
          {
            setElementsAt((Object[])localObject, arrayOfInt);
          }
          else
          {
            removeElementsAt(arrayOfInt);
            
            addElements((Object[])localObject);
          }
        }
      }
    });
    addButton(tip(localJButton, "editTip"));
  }
  
  protected void addFilterButton()
  {
    JButton localJButton = new JButton(msg("filter"));
    localJButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramAnonymousActionEvent)
      {
        if (!list.isSelectionEmpty())
        {
          int[] arrayOfInt = list.getSelectedIndices();
          
          ClassPathPanel.this.getFiltersFrom(arrayOfInt[0]);
          
          int i = filterDialog.showDialog();
          if (i == 0) {
            ClassPathPanel.this.setFiltersAt(arrayOfInt);
          }
        }
      }
    });
    addButton(tip(localJButton, "filterTip"));
  }
  
  public void setClassPath(ClassPath paramClassPath)
  {
    listModel.clear();
    if (paramClassPath != null) {
      for (int i = 0; i < paramClassPath.size(); i++) {
        listModel.addElement(paramClassPath.get(i));
      }
    }
    enableSelectionButtons();
  }
  
  public ClassPath getClassPath()
  {
    int i = listModel.size();
    if (i == 0) {
      return null;
    }
    ClassPath localClassPath = new ClassPath();
    for (int j = 0; j < i; j++) {
      localClassPath.add((ClassPathEntry)listModel.get(j));
    }
    return localClassPath;
  }
  
  private ClassPathEntry[] classPathEntries(File[] paramArrayOfFile, boolean paramBoolean)
  {
    ClassPathEntry[] arrayOfClassPathEntry = new ClassPathEntry[paramArrayOfFile.length];
    for (int i = 0; i < arrayOfClassPathEntry.length; i++) {
      arrayOfClassPathEntry[i] = new ClassPathEntry(paramArrayOfFile[i], paramBoolean);
    }
    return arrayOfClassPathEntry;
  }
  
  private void getFiltersFrom(int paramInt)
  {
    ClassPathEntry localClassPathEntry = (ClassPathEntry)listModel.get(paramInt);
    
    filterDialog.setFilter(localClassPathEntry.getFilter());
    filterDialog.setJarFilter(localClassPathEntry.getJarFilter());
    filterDialog.setWarFilter(localClassPathEntry.getWarFilter());
    filterDialog.setEarFilter(localClassPathEntry.getEarFilter());
    filterDialog.setZipFilter(localClassPathEntry.getZipFilter());
  }
  
  private void setFiltersAt(int[] paramArrayOfInt)
  {
    for (int i = paramArrayOfInt.length - 1; i >= 0; i--)
    {
      ClassPathEntry localClassPathEntry = (ClassPathEntry)listModel.get(paramArrayOfInt[i]);
      localClassPathEntry.setFilter(filterDialog.getFilter());
      localClassPathEntry.setJarFilter(filterDialog.getJarFilter());
      localClassPathEntry.setWarFilter(filterDialog.getWarFilter());
      localClassPathEntry.setEarFilter(filterDialog.getEarFilter());
      localClassPathEntry.setZipFilter(filterDialog.getZipFilter());
    }
    list.setSelectedIndices(paramArrayOfInt);
  }
  
  private static JComponent tip(JComponent paramJComponent, String paramString)
  {
    paramJComponent.setToolTipText(msg(paramString));
    
    return paramJComponent;
  }
  
  private static String msg(String paramString)
  {
    return GUIResources.getMessage(paramString);
  }
  
  private class MyListCellRenderer
    implements ListCellRenderer
  {
    private static final String ARROW_IMAGE_FILE = "arrow.gif";
    private final JPanel cellPanel = new JPanel(new GridBagLayout());
    private final JLabel iconLabel = new JLabel("", 4);
    private final JLabel jarNameLabel = new JLabel("", 4);
    private final JLabel filterLabel = new JLabel("", 4);
    private final Icon arrowIcon;
    
    public MyListCellRenderer()
    {
      GridBagConstraints localGridBagConstraints1 = new GridBagConstraints();
      anchor = 17;
      insets = new Insets(1, 2, 1, 2);
      
      GridBagConstraints localGridBagConstraints2 = new GridBagConstraints();
      gridwidth = 0;
      fill = 2;
      weightx = 1.0D;
      anchor = 13;
      insets = insets;
      
      arrowIcon = new ImageIcon(Toolkit.getDefaultToolkit().getImage(getClass().getResource("arrow.gif")));
      
      cellPanel.add(iconLabel, localGridBagConstraints1);
      cellPanel.add(jarNameLabel, localGridBagConstraints1);
      cellPanel.add(filterLabel, localGridBagConstraints2);
    }
    
    public Component getListCellRendererComponent(JList paramJList, Object paramObject, int paramInt, boolean paramBoolean1, boolean paramBoolean2)
    {
      ClassPathEntry localClassPathEntry = (ClassPathEntry)paramObject;
      if ((inputAndOutput) && (localClassPathEntry.isOutput())) {
        iconLabel.setIcon(arrowIcon);
      } else {
        iconLabel.setIcon(null);
      }
      jarNameLabel.setText(localClassPathEntry.getName());
      
      StringBuffer localStringBuffer = null;
      localStringBuffer = appendFilter(localStringBuffer, localClassPathEntry.getZipFilter());
      localStringBuffer = appendFilter(localStringBuffer, localClassPathEntry.getEarFilter());
      localStringBuffer = appendFilter(localStringBuffer, localClassPathEntry.getWarFilter());
      localStringBuffer = appendFilter(localStringBuffer, localClassPathEntry.getJarFilter());
      localStringBuffer = appendFilter(localStringBuffer, localClassPathEntry.getFilter());
      if (localStringBuffer != null) {
        localStringBuffer.append(')');
      }
      filterLabel.setText(localStringBuffer != null ? localStringBuffer.toString() : "");
      if (paramBoolean1)
      {
        cellPanel.setBackground(paramJList.getSelectionBackground());
        jarNameLabel.setForeground(paramJList.getSelectionForeground());
        filterLabel.setForeground(paramJList.getSelectionForeground());
      }
      else
      {
        cellPanel.setBackground(paramJList.getBackground());
        jarNameLabel.setForeground(paramJList.getForeground());
        filterLabel.setForeground(paramJList.getForeground());
      }
      if (((!inputAndOutput) || (!localClassPathEntry.isOutput())) && (!localClassPathEntry.getFile().canRead())) {
        jarNameLabel.setForeground(Color.red);
      }
      cellPanel.setOpaque(true);
      
      return cellPanel;
    }
    
    private StringBuffer appendFilter(StringBuffer paramStringBuffer, List paramList)
    {
      if (paramStringBuffer != null) {
        paramStringBuffer.append(';');
      }
      if (paramList != null)
      {
        if (paramStringBuffer == null) {
          paramStringBuffer = new StringBuffer().append('(');
        }
        paramStringBuffer.append(ListUtil.commaSeparatedString(paramList, true));
      }
      return paramStringBuffer;
    }
  }
}

/* Location:
 * Qualified Name:     proguard.gui.ClassPathPanel
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package proguard.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JPanel;

class ClassSpecificationDialog$1
  implements ActionListener
{
  private final JPanel val$allowOptionPanel;
  private final JPanel val$annotationTypePanel;
  private final JPanel val$extendsAnnotationTypePanel;
  private final JButton val$advancedButton;
  private final ClassSpecificationDialog this$0;
  
  ClassSpecificationDialog$1(ClassSpecificationDialog paramClassSpecificationDialog, JPanel paramJPanel1, JPanel paramJPanel2, JPanel paramJPanel3, JButton paramJButton)
  {
    this$0 = paramClassSpecificationDialog;val$allowOptionPanel = paramJPanel1;val$annotationTypePanel = paramJPanel2;val$extendsAnnotationTypePanel = paramJPanel3;val$advancedButton = paramJButton;
  }
  
  public void actionPerformed(ActionEvent paramActionEvent)
  {
    boolean bool = !val$allowOptionPanel.isVisible();
    
    val$allowOptionPanel.setVisible(bool);
    val$annotationTypePanel.setVisible(bool);
    val$extendsAnnotationTypePanel.setVisible(bool);
    
    val$advancedButton.setText(ClassSpecificationDialog.access$000(bool ? "basic" : "advanced"));
    
    this$0.pack();
  }
}

/* Location:
 * Qualified Name:     proguard.gui.ClassSpecificationDialog.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package proguard.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import javax.swing.JFileChooser;
import proguard.ClassPathEntry;

class ClassPathPanel$1
  implements ActionListener
{
  private final boolean val$isOutput;
  private final ClassPathPanel this$0;
  
  ClassPathPanel$1(ClassPathPanel paramClassPathPanel, boolean paramBoolean)
  {
    this$0 = paramClassPathPanel;val$isOutput = paramBoolean;
  }
  
  public void actionPerformed(ActionEvent paramActionEvent)
  {
    ClassPathPanel.access$100(this$0).setDialogTitle(ClassPathPanel.access$000("addJars"));
    ClassPathPanel.access$100(this$0).setSelectedFile(null);
    ClassPathPanel.access$100(this$0).setSelectedFiles(null);
    
    int i = ClassPathPanel.access$100(this$0).showOpenDialog(ClassPathPanel.access$200(this$0));
    if (i == 0)
    {
      File[] arrayOfFile = ClassPathPanel.access$100(this$0).getSelectedFiles();
      ClassPathEntry[] arrayOfClassPathEntry = ClassPathPanel.access$300(this$0, arrayOfFile, val$isOutput);
      
      this$0.addElements(arrayOfClassPathEntry);
    }
  }
}

/* Location:
 * Qualified Name:     proguard.gui.ClassPathPanel.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package proguard.gui;

import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.border.Border;
import proguard.ClassSpecification;
import proguard.KeepClassSpecification;
import proguard.classfile.util.ClassUtil;

final class ClassSpecificationDialog
  extends JDialog
{
  public static final int CANCEL_OPTION = 1;
  public static final int APPROVE_OPTION = 0;
  private final JTextArea commentsTextArea = new JTextArea(4, 20);
  private final JRadioButton keepClassesAndMembersRadioButton = new JRadioButton(msg("keep"));
  private final JRadioButton keepClassMembersRadioButton = new JRadioButton(msg("keepClassMembers"));
  private final JRadioButton keepClassesWithMembersRadioButton = new JRadioButton(msg("keepClassesWithMembers"));
  private final JCheckBox allowShrinkingCheckBox = new JCheckBox(msg("allowShrinking"));
  private final JCheckBox allowOptimizationCheckBox = new JCheckBox(msg("allowOptimization"));
  private final JCheckBox allowObfuscationCheckBox = new JCheckBox(msg("allowObfuscation"));
  private final JRadioButton[] publicRadioButtons;
  private final JRadioButton[] finalRadioButtons;
  private final JRadioButton[] abstractRadioButtons;
  private final JRadioButton[] interfaceRadioButtons;
  private final JRadioButton[] annotationRadioButtons;
  private final JRadioButton[] enumRadioButtons;
  private final JRadioButton[] syntheticRadioButtons;
  private final JTextField annotationTypeTextField = new JTextField(20);
  private final JTextField classNameTextField = new JTextField(20);
  private final JTextField extendsAnnotationTypeTextField = new JTextField(20);
  private final JTextField extendsClassNameTextField = new JTextField(20);
  private final MemberSpecificationsPanel memberSpecificationsPanel;
  private int returnValue;
  
  public ClassSpecificationDialog(JFrame paramJFrame, boolean paramBoolean)
  {
    super(paramJFrame, msg("specifyClasses"), true);
    setResizable(true);
    
    GridBagConstraints localGridBagConstraints1 = new GridBagConstraints();
    anchor = 17;
    insets = new Insets(1, 2, 1, 2);
    
    GridBagConstraints localGridBagConstraints2 = new GridBagConstraints();
    fill = 2;
    weightx = 1.0D;
    anchor = 17;
    insets = insets;
    
    GridBagConstraints localGridBagConstraints3 = new GridBagConstraints();
    gridwidth = 0;
    anchor = 17;
    insets = insets;
    
    GridBagConstraints localGridBagConstraints4 = new GridBagConstraints();
    gridwidth = 0;
    fill = 2;
    weightx = 1.0D;
    anchor = 17;
    insets = insets;
    
    GridBagConstraints localGridBagConstraints5 = new GridBagConstraints();
    gridwidth = 0;
    fill = 2;
    weightx = 1.0D;
    weighty = 0.0D;
    anchor = 18;
    insets = insets;
    
    GridBagConstraints localGridBagConstraints6 = new GridBagConstraints();
    gridwidth = 0;
    fill = 1;
    weightx = 1.0D;
    weighty = 1.0D;
    anchor = 18;
    insets = insets;
    
    GridBagConstraints localGridBagConstraints7 = new GridBagConstraints();
    anchor = 10;
    insets = new Insets(2, 10, 2, 10);
    
    GridBagConstraints localGridBagConstraints8 = new GridBagConstraints();
    gridwidth = 0;
    anchor = 10;
    insets = insets;
    
    GridBagConstraints localGridBagConstraints9 = new GridBagConstraints();
    weightx = 1.0D;
    weighty = 1.0D;
    anchor = 16;
    insets = new Insets(4, 4, 8, 4);
    
    GridBagConstraints localGridBagConstraints10 = new GridBagConstraints();
    weightx = 1.0D;
    weighty = 1.0D;
    anchor = 14;
    insets = insets;
    
    GridBagConstraints localGridBagConstraints11 = new GridBagConstraints();
    gridwidth = 0;
    weighty = 1.0D;
    anchor = 14;
    insets = insets;
    
    GridBagLayout localGridBagLayout = new GridBagLayout();
    
    Border localBorder = BorderFactory.createEtchedBorder(0);
    
    JPanel localJPanel1 = new JPanel(localGridBagLayout);
    localJPanel1.setBorder(BorderFactory.createTitledBorder(localBorder, msg("comments")));
    
    JScrollPane localJScrollPane = new JScrollPane(commentsTextArea);
    localJScrollPane.setBorder(classNameTextField.getBorder());
    
    localJPanel1.add(tip(localJScrollPane, "commentsTip"), localGridBagConstraints4);
    
    ButtonGroup localButtonGroup = new ButtonGroup();
    localButtonGroup.add(keepClassesAndMembersRadioButton);
    localButtonGroup.add(keepClassMembersRadioButton);
    localButtonGroup.add(keepClassesWithMembersRadioButton);
    
    JPanel localJPanel2 = new JPanel(localGridBagLayout);
    localJPanel2.setBorder(BorderFactory.createTitledBorder(localBorder, msg("keepTitle")));
    
    localJPanel2.add(tip(keepClassesAndMembersRadioButton, "keepTip"), localGridBagConstraints4);
    localJPanel2.add(tip(keepClassMembersRadioButton, "keepClassMembersTip"), localGridBagConstraints4);
    localJPanel2.add(tip(keepClassesWithMembersRadioButton, "keepClassesWithMembersTip"), localGridBagConstraints4);
    
    JPanel localJPanel3 = new JPanel(localGridBagLayout);
    localJPanel3.setBorder(BorderFactory.createTitledBorder(localBorder, msg("allowTitle")));
    
    localJPanel3.add(tip(allowShrinkingCheckBox, "allowShrinkingTip"), localGridBagConstraints4);
    localJPanel3.add(tip(allowOptimizationCheckBox, "allowOptimizationTip"), localGridBagConstraints4);
    localJPanel3.add(tip(allowObfuscationCheckBox, "allowObfuscationTip"), localGridBagConstraints4);
    
    JPanel localJPanel4 = new JPanel(localGridBagLayout);
    localJPanel4.setBorder(BorderFactory.createTitledBorder(localBorder, msg("access")));
    
    localJPanel4.add(Box.createGlue(), localGridBagConstraints7);
    localJPanel4.add(tip(new JLabel(msg("required")), "requiredTip"), localGridBagConstraints7);
    localJPanel4.add(tip(new JLabel(msg("not")), "notTip"), localGridBagConstraints7);
    localJPanel4.add(tip(new JLabel(msg("dontCare")), "dontCareTip"), localGridBagConstraints7);
    localJPanel4.add(Box.createGlue(), localGridBagConstraints4);
    
    publicRadioButtons = addRadioButtonTriplet("Public", localJPanel4);
    finalRadioButtons = addRadioButtonTriplet("Final", localJPanel4);
    abstractRadioButtons = addRadioButtonTriplet("Abstract", localJPanel4);
    interfaceRadioButtons = addRadioButtonTriplet("Interface", localJPanel4);
    annotationRadioButtons = addRadioButtonTriplet("Annotation", localJPanel4);
    enumRadioButtons = addRadioButtonTriplet("Enum", localJPanel4);
    syntheticRadioButtons = addRadioButtonTriplet("Synthetic", localJPanel4);
    
    JPanel localJPanel5 = new JPanel(localGridBagLayout);
    localJPanel5.setBorder(BorderFactory.createTitledBorder(localBorder, msg("annotation")));
    
    localJPanel5.add(tip(annotationTypeTextField, "classNameTip"), localGridBagConstraints4);
    
    JPanel localJPanel6 = new JPanel(localGridBagLayout);
    localJPanel6.setBorder(BorderFactory.createTitledBorder(localBorder, msg("class")));
    
    localJPanel6.add(tip(classNameTextField, "classNameTip"), localGridBagConstraints4);
    
    JPanel localJPanel7 = new JPanel(localGridBagLayout);
    localJPanel7.setBorder(BorderFactory.createTitledBorder(localBorder, msg("extendsImplementsAnnotation")));
    
    localJPanel7.add(tip(extendsAnnotationTypeTextField, "classNameTip"), localGridBagConstraints4);
    
    JPanel localJPanel8 = new JPanel(localGridBagLayout);
    localJPanel8.setBorder(BorderFactory.createTitledBorder(localBorder, msg("extendsImplementsClass")));
    
    localJPanel8.add(tip(extendsClassNameTextField, "classNameTip"), localGridBagConstraints4);
    
    memberSpecificationsPanel = new MemberSpecificationsPanel(this, paramBoolean);
    memberSpecificationsPanel.setBorder(BorderFactory.createTitledBorder(localBorder, msg("classMembers")));
    
    JButton localJButton1 = new JButton(msg("basic"));
    localJButton1.addActionListener(new ActionListener()
    {
      private final JPanel val$allowOptionPanel;
      private final JPanel val$annotationTypePanel;
      private final JPanel val$extendsAnnotationTypePanel;
      private final JButton val$advancedButton;
      
      public void actionPerformed(ActionEvent paramAnonymousActionEvent)
      {
        boolean bool = !val$allowOptionPanel.isVisible();
        
        val$allowOptionPanel.setVisible(bool);
        val$annotationTypePanel.setVisible(bool);
        val$extendsAnnotationTypePanel.setVisible(bool);
        
        val$advancedButton.setText(ClassSpecificationDialog.msg(bool ? "basic" : "advanced"));
        
        pack();
      }
    });
    localJButton1.doClick();
    
    JButton localJButton2 = new JButton(msg("ok"));
    localJButton2.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramAnonymousActionEvent)
      {
        returnValue = 0;
        hide();
      }
    });
    JButton localJButton3 = new JButton(msg("cancel"));
    localJButton3.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramAnonymousActionEvent)
      {
        hide();
      }
    });
    JPanel localJPanel9 = new JPanel(localGridBagLayout);
    localJPanel9.add(tip(localJPanel1, "commentsTip"), localGridBagConstraints5);
    if (paramBoolean)
    {
      localJPanel9.add(tip(localJPanel2, "keepTitleTip"), localGridBagConstraints5);
      localJPanel9.add(tip(localJPanel3, "allowTitleTip"), localGridBagConstraints5);
    }
    localJPanel9.add(tip(localJPanel4, "accessTip"), localGridBagConstraints5);
    localJPanel9.add(tip(localJPanel5, "annotationTip"), localGridBagConstraints5);
    localJPanel9.add(tip(localJPanel6, "classTip"), localGridBagConstraints5);
    localJPanel9.add(tip(localJPanel7, "extendsImplementsAnnotationTip"), localGridBagConstraints5);
    localJPanel9.add(tip(localJPanel8, "extendsImplementsClassTip"), localGridBagConstraints5);
    localJPanel9.add(tip(memberSpecificationsPanel, "classMembersTip"), localGridBagConstraints6);
    
    localJPanel9.add(tip(localJButton1, "advancedTip"), localGridBagConstraints9);
    localJPanel9.add(localJButton2, localGridBagConstraints10);
    localJPanel9.add(localJButton3, localGridBagConstraints11);
    
    getContentPane().add(new JScrollPane(localJPanel9));
  }
  
  private JRadioButton[] addRadioButtonTriplet(String paramString, JPanel paramJPanel)
  {
    GridBagConstraints localGridBagConstraints1 = new GridBagConstraints();
    anchor = 17;
    insets = new Insets(2, 10, 2, 10);
    
    GridBagConstraints localGridBagConstraints2 = new GridBagConstraints();
    insets = insets;
    
    GridBagConstraints localGridBagConstraints3 = new GridBagConstraints();
    gridwidth = 0;
    weightx = 1.0D;
    
    JRadioButton localJRadioButton1 = new JRadioButton();
    JRadioButton localJRadioButton2 = new JRadioButton();
    JRadioButton localJRadioButton3 = new JRadioButton();
    
    ButtonGroup localButtonGroup = new ButtonGroup();
    localButtonGroup.add(localJRadioButton1);
    localButtonGroup.add(localJRadioButton2);
    localButtonGroup.add(localJRadioButton3);
    
    paramJPanel.add(new JLabel(paramString), localGridBagConstraints1);
    paramJPanel.add(localJRadioButton1, localGridBagConstraints2);
    paramJPanel.add(localJRadioButton2, localGridBagConstraints2);
    paramJPanel.add(localJRadioButton3, localGridBagConstraints2);
    paramJPanel.add(Box.createGlue(), localGridBagConstraints3);
    
    return new JRadioButton[] { localJRadioButton1, localJRadioButton2, localJRadioButton3 };
  }
  
  public void setKeepSpecification(KeepClassSpecification paramKeepClassSpecification)
  {
    boolean bool1 = markClasses;
    boolean bool2 = markConditionally;
    boolean bool3 = allowShrinking;
    boolean bool4 = allowOptimization;
    boolean bool5 = allowObfuscation;
    
    JRadioButton localJRadioButton = bool1 ? keepClassesAndMembersRadioButton : bool2 ? keepClassesWithMembersRadioButton : keepClassMembersRadioButton;
    
    localJRadioButton.setSelected(true);
    
    allowShrinkingCheckBox.setSelected(bool3);
    allowOptimizationCheckBox.setSelected(bool4);
    allowObfuscationCheckBox.setSelected(bool5);
    
    setClassSpecification(paramKeepClassSpecification);
  }
  
  public void setClassSpecification(ClassSpecification paramClassSpecification)
  {
    String str1 = comments;
    String str2 = annotationType;
    String str3 = className;
    String str4 = extendsAnnotationType;
    String str5 = extendsClassName;
    List localList1 = fieldSpecifications;
    List localList2 = methodSpecifications;
    
    commentsTextArea.setText(str1 == null ? "" : str1);
    
    setClassSpecificationRadioButtons(paramClassSpecification, 1, publicRadioButtons);
    setClassSpecificationRadioButtons(paramClassSpecification, 16, finalRadioButtons);
    setClassSpecificationRadioButtons(paramClassSpecification, 1024, abstractRadioButtons);
    setClassSpecificationRadioButtons(paramClassSpecification, 512, interfaceRadioButtons);
    setClassSpecificationRadioButtons(paramClassSpecification, 8192, annotationRadioButtons);
    setClassSpecificationRadioButtons(paramClassSpecification, 16384, enumRadioButtons);
    setClassSpecificationRadioButtons(paramClassSpecification, 4096, syntheticRadioButtons);
    
    annotationTypeTextField.setText(str2 == null ? "" : ClassUtil.externalType(str2));
    classNameTextField.setText(str3 == null ? "*" : ClassUtil.externalClassName(str3));
    extendsAnnotationTypeTextField.setText(str4 == null ? "" : ClassUtil.externalType(str4));
    extendsClassNameTextField.setText(str5 == null ? "" : ClassUtil.externalClassName(str5));
    
    memberSpecificationsPanel.setMemberSpecifications(localList1, localList2);
  }
  
  public KeepClassSpecification getKeepSpecification()
  {
    boolean bool1 = !keepClassMembersRadioButton.isSelected();
    boolean bool2 = keepClassesWithMembersRadioButton.isSelected();
    boolean bool3 = allowShrinkingCheckBox.isSelected();
    boolean bool4 = allowOptimizationCheckBox.isSelected();
    boolean bool5 = allowObfuscationCheckBox.isSelected();
    
    return new KeepClassSpecification(bool1, bool2, bool3, bool4, bool5, getClassSpecification());
  }
  
  public ClassSpecification getClassSpecification()
  {
    String str1 = commentsTextArea.getText();
    String str2 = annotationTypeTextField.getText();
    String str3 = classNameTextField.getText();
    String str4 = extendsAnnotationTypeTextField.getText();
    String str5 = extendsClassNameTextField.getText();
    
    ClassSpecification localClassSpecification = new ClassSpecification(str1.equals("") ? null : str1, 0, 0, str2.equals("") ? null : ClassUtil.internalType(str2), (str3.equals("")) || (str3.equals("*")) ? null : ClassUtil.internalClassName(str3), str4.equals("") ? null : ClassUtil.internalType(str4), str5.equals("") ? null : ClassUtil.internalClassName(str5));
    
    getClassSpecificationRadioButtons(localClassSpecification, 1, publicRadioButtons);
    getClassSpecificationRadioButtons(localClassSpecification, 16, finalRadioButtons);
    getClassSpecificationRadioButtons(localClassSpecification, 1024, abstractRadioButtons);
    getClassSpecificationRadioButtons(localClassSpecification, 512, interfaceRadioButtons);
    getClassSpecificationRadioButtons(localClassSpecification, 8192, annotationRadioButtons);
    getClassSpecificationRadioButtons(localClassSpecification, 16384, enumRadioButtons);
    getClassSpecificationRadioButtons(localClassSpecification, 4096, syntheticRadioButtons);
    
    fieldSpecifications = memberSpecificationsPanel.getMemberSpecifications(true);
    methodSpecifications = memberSpecificationsPanel.getMemberSpecifications(false);
    
    return localClassSpecification;
  }
  
  public int showDialog()
  {
    returnValue = 1;
    
    pack();
    setLocationRelativeTo(getOwner());
    show();
    
    return returnValue;
  }
  
  private void setClassSpecificationRadioButtons(ClassSpecification paramClassSpecification, int paramInt, JRadioButton[] paramArrayOfJRadioButton)
  {
    int i = (requiredUnsetAccessFlags & paramInt) != 0 ? 1 : (requiredSetAccessFlags & paramInt) != 0 ? 0 : 2;
    
    paramArrayOfJRadioButton[i].setSelected(true);
  }
  
  private void getClassSpecificationRadioButtons(ClassSpecification paramClassSpecification, int paramInt, JRadioButton[] paramArrayOfJRadioButton)
  {
    if (paramArrayOfJRadioButton[0].isSelected()) {
      requiredSetAccessFlags |= paramInt;
    } else if (paramArrayOfJRadioButton[1].isSelected()) {
      requiredUnsetAccessFlags |= paramInt;
    }
  }
  
  private static JComponent tip(JComponent paramJComponent, String paramString)
  {
    paramJComponent.setToolTipText(msg(paramString));
    
    return paramJComponent;
  }
  
  private static String msg(String paramString)
  {
    return GUIResources.getMessage(paramString);
  }
}

/* Location:
 * Qualified Name:     proguard.gui.ClassSpecificationDialog
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package proguard.gui;

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

class ClassSpecificationDialog$2
  implements ActionListener
{
  private final ClassSpecificationDialog this$0;
  
  ClassSpecificationDialog$2(ClassSpecificationDialog paramClassSpecificationDialog)
  {
    this$0 = paramClassSpecificationDialog;
  }
  
  public void actionPerformed(ActionEvent paramActionEvent)
  {
    ClassSpecificationDialog.access$102(this$0, 0);
    this$0.hide();
  }
}

/* Location:
 * Qualified Name:     proguard.gui.ClassSpecificationDialog.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package proguard.gui;

import java.io.File;
import javax.swing.filechooser.FileFilter;

final class ExtensionFileFilter
  extends FileFilter
{
  private final String description;
  private final String[] extensions;
  
  public ExtensionFileFilter(String paramString, String[] paramArrayOfString)
  {
    description = paramString;
    extensions = paramArrayOfString;
  }
  
  public String getDescription()
  {
    return description;
  }
  
  public boolean accept(File paramFile)
  {
    if (paramFile.isDirectory()) {
      return true;
    }
    String str = paramFile.getName().toLowerCase();
    for (int i = 0; i < extensions.length; i++) {
      if (str.endsWith(extensions[i])) {
        return true;
      }
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     proguard.gui.ExtensionFileFilter
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package proguard.gui;

import java.awt.Component;
import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.border.Border;
import proguard.optimize.Optimizer;
import proguard.util.FixedStringMatcher;
import proguard.util.ListParser;
import proguard.util.NameParser;
import proguard.util.StringMatcher;

final class OptimizationsDialog
  extends JDialog
{
  public static final int CANCEL_OPTION = 1;
  public static final int APPROVE_OPTION = 0;
  private final JCheckBox[] optimizationCheckBoxes = new JCheckBox[Optimizer.OPTIMIZATION_NAMES.length];
  private int returnValue;
  
  public OptimizationsDialog(JFrame paramJFrame)
  {
    super(paramJFrame, msg("selectOptimizations"), true);
    setResizable(true);
    
    GridBagConstraints localGridBagConstraints1 = new GridBagConstraints();
    gridwidth = 0;
    anchor = 17;
    insets = new Insets(1, 2, 1, 2);
    
    GridBagConstraints localGridBagConstraints2 = new GridBagConstraints();
    gridwidth = 0;
    fill = 2;
    weightx = 1.0D;
    anchor = 17;
    insets = insets;
    
    GridBagConstraints localGridBagConstraints3 = new GridBagConstraints();
    gridwidth = 0;
    fill = 2;
    weightx = 1.0D;
    weighty = 0.0D;
    anchor = 18;
    insets = insets;
    
    GridBagConstraints localGridBagConstraints4 = new GridBagConstraints();
    weighty = 1.0D;
    anchor = 16;
    insets = new Insets(4, 4, 8, 4);
    
    GridBagConstraints localGridBagConstraints5 = new GridBagConstraints();
    weightx = 1.0D;
    weighty = 1.0D;
    anchor = 14;
    insets = insets;
    
    GridBagConstraints localGridBagConstraints6 = new GridBagConstraints();
    gridwidth = 0;
    weighty = 1.0D;
    anchor = 14;
    insets = insets;
    
    GridBagLayout localGridBagLayout = new GridBagLayout();
    
    Border localBorder = BorderFactory.createEtchedBorder(0);
    
    JPanel localJPanel1 = new JPanel(localGridBagLayout);
    JPanel localJPanel2 = null;
    Object localObject1 = null;
    for (int i = 0; i < Optimizer.OPTIMIZATION_NAMES.length; i++)
    {
      localObject2 = Optimizer.OPTIMIZATION_NAMES[i];
      
      localObject3 = ((String)localObject2).substring(0, ((String)localObject2).indexOf('/'));
      if ((localJPanel2 == null) || (!((String)localObject3).equals(localObject1)))
      {
        localJPanel2 = new JPanel(localGridBagLayout);
        localJPanel2.setBorder(BorderFactory.createTitledBorder(localBorder, msg((String)localObject3)));
        localJPanel1.add(localJPanel2, localGridBagConstraints3);
        
        localObject1 = localObject3;
      }
      localObject4 = new JCheckBox((String)localObject2);
      optimizationCheckBoxes[i] = localObject4;
      
      localJPanel2.add(tip((JComponent)localObject4, ((String)localObject2).replace('/', '_') + "Tip"), localGridBagConstraints2);
    }
    JButton localJButton = new JButton(msg("selectAll"));
    localJButton.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramAnonymousActionEvent)
      {
        for (int i = 0; i < optimizationCheckBoxes.length; i++) {
          optimizationCheckBoxes[i].setSelected(true);
        }
      }
    });
    Object localObject2 = new JButton(msg("selectNone"));
    ((JButton)localObject2).addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramAnonymousActionEvent)
      {
        for (int i = 0; i < optimizationCheckBoxes.length; i++) {
          optimizationCheckBoxes[i].setSelected(false);
        }
      }
    });
    Object localObject3 = new JButton(msg("ok"));
    ((JButton)localObject3).addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramAnonymousActionEvent)
      {
        returnValue = 0;
        hide();
      }
    });
    Object localObject4 = new JButton(msg("cancel"));
    ((JButton)localObject4).addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent paramAnonymousActionEvent)
      {
        hide();
      }
    });
    localJPanel1.add(localJButton, localGridBagConstraints4);
    localJPanel1.add((Component)localObject2, localGridBagConstraints4);
    localJPanel1.add((Component)localObject3, localGridBagConstraints5);
    localJPanel1.add((Component)localObject4, localGridBagConstraints6);
    
    getContentPane().add(new JScrollPane(localJPanel1));
  }
  
  public void setFilter(String paramString)
  {
    FixedStringMatcher localFixedStringMatcher = (paramString != null) && (paramString.length() > 0) ? new ListParser(new NameParser()).parse(paramString) : new FixedStringMatcher("");
    for (int i = 0; i < Optimizer.OPTIMIZATION_NAMES.length; i++) {
      optimizationCheckBoxes[i].setSelected(localFixedStringMatcher.matches(Optimizer.OPTIMIZATION_NAMES[i]));
    }
  }
  
  public String getFilter()
  {
    return new FilterBuilder(optimizationCheckBoxes, '/').buildFilter();
  }
  
  public int showDialog()
  {
    returnValue = 1;
    
    pack();
    setLocationRelativeTo(getOwner());
    show();
    
    return returnValue;
  }
  
  private static JComponent tip(JComponent paramJComponent, String paramString)
  {
    paramJComponent.setToolTipText(msg(paramString));
    
    return paramJComponent;
  }
  
  private static String msg(String paramString)
  {
    return GUIResources.getMessage(paramString);
  }
}

/* Location:
 * Qualified Name:     proguard.gui.OptimizationsDialog
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package proguard.gui;

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

class OptimizationsDialog$4
  implements ActionListener
{
  private final OptimizationsDialog this$0;
  
  OptimizationsDialog$4(OptimizationsDialog paramOptimizationsDialog)
  {
    this$0 = paramOptimizationsDialog;
  }
  
  public void actionPerformed(ActionEvent paramActionEvent)
  {
    this$0.hide();
  }
}

/* Location:
 * Qualified Name:     proguard.gui.OptimizationsDialog.4
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package proguard.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JList;
import proguard.ClassSpecification;

class ClassSpecificationsPanel$2
  implements ActionListener
{
  private final ClassSpecificationsPanel this$0;
  
  ClassSpecificationsPanel$2(ClassSpecificationsPanel paramClassSpecificationsPanel)
  {
    this$0 = paramClas
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