sa-jdi

ic JScrollPane createListPane(JList list, String text)
  {
    JScrollPane pane = new JScrollPane(list);
    pane.setBorder(BorderFactory.createCompoundBorder(createBorder(text), BorderFactory.createLoweredBevelBorder()));
    return pane;
  }
  
  public static void centerComponent(Component source, Component parent)
  {
    Dimension dim = source.getSize();
    Rectangle rect;
    Rectangle rect;
    if (parent != null)
    {
      rect = parent.getBounds();
    }
    else
    {
      Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
      rect = new Rectangle(0, 0, width, height);
    }
    int x = x + (width - width) / 2;
    int y = y + (height - height) / 2;
    source.setLocation(x, y);
  }
  
  public static void centerComponent(Component source)
  {
    centerComponent(source, null);
  }
  
  public static JFrame getParentFrame(Component source)
  {
    for (Container parent = source.getParent(); (parent != null) && 
          (!(parent instanceof JFrame)); parent = parent.getParent()) {}
    if (parent == null) {
      return null;
    }
    return (JFrame)parent;
  }
  
  public static Integer msToSec(Integer ms)
  {
    int value = ms.intValue();
    value /= 1000;
    return new Integer(value);
  }
  
  public static Integer secToMs(Integer sec)
  {
    int value = sec.intValue();
    value *= 1000;
    return new Integer(value);
  }
  
  public static String stringFromStringArray(String[] strings, String delim)
  {
    String string = "";
    String separator;
    String separator;
    if ((delim == null) || (delim.equals(""))) {
      separator = " ";
    } else {
      separator = delim;
    }
    for (int i = 0; i < strings.length; i++)
    {
      string = string + strings[i];
      string = string + separator;
    }
    return string;
  }
  
  public static String stringFromStringArray(String[] strings)
  {
    return stringFromStringArray(strings, "");
  }
  
  public static String[] stringArrayFromString(String string, String delim)
  {
    StringTokenizer st;
    StringTokenizer st;
    if ((delim == null) || (delim.equals(""))) {
      st = new StringTokenizer(string);
    } else {
      st = new StringTokenizer(string, delim);
    }
    int numTokens = st.countTokens();
    String[] strings = new String[numTokens];
    int index = 0;
    while (st.hasMoreTokens()) {
      strings[(index++)] = st.nextToken();
    }
    return strings;
  }
  
  public static String[] stringArrayFromString(String string)
  {
    return stringArrayFromString(string, "");
  }
  
  public static void setWaitCursor(Component comp)
  {
    comp.setCursor(Cursor.getPredefinedCursor(3));
  }
  
  public static void setDefaultCursor(Component comp)
  {
    comp.setCursor(Cursor.getPredefinedCursor(0));
  }
  
  public static Dimension buttonPrefSize = new Dimension(100, 26);
  public static Dimension buttconPrefSize = new Dimension(28, 28);
  public static Dimension smbuttonPrefSize = new Dimension(72, 26);
  public static Dimension labelPrefSize = new Dimension(100, 20);
  public static Dimension textPrefSize = new Dimension(150, 20);
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.CommonUI
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

import com.sun.java.swing.action.CancelAction;
import com.sun.java.swing.action.DelegateAction;
import com.sun.java.swing.action.OkAction;
import java.awt.event.ActionListener;
import javax.swing.JPanel;

public class OkCancelButtonPanel
  extends JPanel
{
  public static final String OK_COMMAND = "ok-command";
  public static final String CANCEL_COMMAND = "cancel-command";
  
  public OkCancelButtonPanel(ActionListener listener)
  {
    DelegateAction okAction = new OkAction();
    okAction.addActionListener(listener);
    DelegateAction cancelAction = new CancelAction();
    cancelAction.addActionListener(listener);
    add(CommonUI.createButton(okAction));
    add(CommonUI.createButton(cancelAction));
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.OkCancelButtonPanel
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JDialog;
import javax.swing.JPanel;

public class OkCancelDialog
  extends JDialog
  implements ActionListener
{
  private boolean okPressed;
  
  public OkCancelDialog(String title, JPanel panel)
  {
    this(title, panel, true);
  }
  
  public OkCancelDialog(String title, JPanel panel, boolean modal)
  {
    setTitle(title);
    setModal(modal);
    Container pane = getContentPane();
    pane.setLayout(new BorderLayout());
    pane.add(panel, "Center");
    pane.add(new OkCancelButtonPanel(this), "South");
    pack();
    CommonUI.centerComponent(this);
  }
  
  public boolean isOk()
  {
    return okPressed;
  }
  
  public void actionPerformed(ActionEvent evt)
  {
    String command = evt.getActionCommand();
    if (command.equals("ok-command"))
    {
      okPressed = true;
      setVisible(false);
      dispose();
    }
    else if (command.equals("cancel-command"))
    {
      okPressed = false;
      setVisible(false);
      dispose();
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.OkCancelDialog
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.MediaTracker;
import java.awt.Toolkit;
import java.awt.Window;
import java.net.URL;
import javax.swing.ImageIcon;

public class SplashScreen
  extends Window
{
  private ImageIcon screen;
  
  public SplashScreen(Frame f)
  {
    super(f);
    setBackground(Color.white);
    URL url = getClass().getResource("/images/SplashScreen.jpg");
    if (url != null)
    {
      screen = new ImageIcon(url);
      MediaTracker mt = new MediaTracker(this);
      mt.addImage(screen.getImage(), 0);
      try
      {
        mt.waitForAll();
      }
      catch (Exception ex) {}
    }
  }
  
  public void setVisible(boolean val)
  {
    if (screen == null) {
      return;
    }
    if (val)
    {
      setSize(screen.getIconWidth(), screen.getIconHeight());
      setLocation(65036, 65036);
      super.setVisible(true);
      Dimension d = getToolkit().getScreenSize();
      Insets i = getInsets();
      int w = screen.getIconWidth() + left + right;
      int h = screen.getIconHeight() + top + bottom;
      setSize(w, h);
      setLocation(width / 2 - w / 2, height / 2 - h / 2);
    }
    else
    {
      super.setVisible(false);
    }
  }
  
  public void paint(Graphics g)
  {
    if (screen != null)
    {
      Dimension d = getSize();
      g.setColor(Color.black);
      g.drawRect(0, 0, width - 1, height - 1);
      g.drawImage(screen.getImage(), 1, 1, this);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.SplashScreen
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.FontMetrics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.AbstractButton;
import javax.swing.Action;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.Timer;

public class StatusBar
  extends JPanel
  implements ActionListener, MouseListener
{
  private static final int PROGRESS_MAX = 100;
  private static final int PROGRESS_MIN = 0;
  private JLabel label;
  private Dimension preferredSize;
  private JProgressBar progressBar;
  private Timer timer;
  private boolean forward;
  private static StatusBar statusBar;
  
  public StatusBar()
  {
    setLayout(new FlowLayout(0));
    setBorder(BorderFactory.createEtchedBorder());
    progressBar = new JProgressBar(0, 0, 100);
    progressBar.setPreferredSize(new Dimension(60, progressBar.getPreferredSize().height + 2));
    progressBar.setVisible(false);
    label = new JLabel("                                                                                        ");
    preferredSize = new Dimension(getWidth(label.getText()), 2 * getFontHeight());
    add(progressBar);
    add(label);
  }
  
  public static StatusBar getInstance()
  {
    if (statusBar == null) {
      statusBar = new StatusBar();
    }
    return statusBar;
  }
  
  public static void setInstance(StatusBar sb)
  {
    statusBar = sb;
  }
  
  protected int getWidth(String s)
  {
    FontMetrics fm = getFontMetrics(getFont());
    if (fm == null) {
      return 0;
    }
    return fm.stringWidth(s);
  }
  
  protected int getFontHeight()
  {
    FontMetrics fm = getFontMetrics(getFont());
    if (fm == null) {
      return 0;
    }
    return fm.getHeight();
  }
  
  public Dimension getPreferredSize()
  {
    return preferredSize;
  }
  
  public void setMessage(String message)
  {
    label.setText(message);
    label.repaint();
  }
  
  public void startBusyBar()
  {
    forward = true;
    if (timer == null)
    {
      setMessage("");
      progressBar.setVisible(true);
      timer = new Timer(15, this);
      timer.start();
    }
  }
  
  public void stopBusyBar()
  {
    if (timer != null)
    {
      timer.stop();
      timer = null;
    }
    setMessage("");
    progressBar.setVisible(false);
    progressBar.setValue(0);
  }
  
  public void actionPerformed(ActionEvent evt)
  {
    int value = progressBar.getValue();
    if (forward)
    {
      if (value < 100)
      {
        progressBar.setValue(value + 1);
      }
      else
      {
        forward = false;
        progressBar.setValue(value - 1);
      }
    }
    else if (value > 0)
    {
      progressBar.setValue(value - 1);
    }
    else
    {
      forward = true;
      progressBar.setValue(value + 1);
    }
  }
  
  public void mouseClicked(MouseEvent mouseevent) {}
  
  public void mousePressed(MouseEvent mouseevent) {}
  
  public void mouseReleased(MouseEvent mouseevent) {}
  
  public void mouseExited(MouseEvent evt)
  {
    setMessage("");
  }
  
  public void mouseEntered(MouseEvent evt)
  {
    if ((evt.getSource() instanceof AbstractButton))
    {
      AbstractButton button = (AbstractButton)evt.getSource();
      Action action = button.getAction();
      if (action != null)
      {
        String message = (String)action.getValue("LongDescription");
        setMessage(message);
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.StatusBar
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

final class TabsDlg$1
  implements ActionListener
{
  public void actionPerformed(ActionEvent evt)
  {
    System.exit(0);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.TabsDlg.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

final class TabsDlg$2
  implements ActionListener
{
  public void actionPerformed(ActionEvent evt)
  {
    System.exit(0);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.TabsDlg.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

class TabsDlg$ApplyListener
  implements ActionListener
{
  private final TabsDlg this$0;
  
  TabsDlg$ApplyListener(TabsDlg x0, TabsDlg.1 x1)
  {
    this(x0);
  }
  
  private TabsDlg$ApplyListener(TabsDlg paramTabsDlg) {}
  
  public void actionPerformed(ActionEvent evt)
  {
    if (TabsDlg.access$000(this$0) != null)
    {
      TabsDlg.access$000(this$0).actionPerformed(evt);
      this$0.enableApplyButton(false);
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.TabsDlg.ApplyListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

class TabsDlg$CancelListener
  implements ActionListener
{
  private final TabsDlg this$0;
  
  TabsDlg$CancelListener(TabsDlg x0, TabsDlg.1 x1)
  {
    this(x0);
  }
  
  private TabsDlg$CancelListener(TabsDlg paramTabsDlg) {}
  
  public void actionPerformed(ActionEvent evt)
  {
    if (TabsDlg.access$100(this$0) != null) {
      TabsDlg.access$100(this$0).actionPerformed(evt);
    }
    this$0.setVisible(false);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.TabsDlg.CancelListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

class TabsDlg$OkListener
  implements ActionListener
{
  private final TabsDlg this$0;
  
  TabsDlg$OkListener(TabsDlg x0, TabsDlg.1 x1)
  {
    this(x0);
  }
  
  private TabsDlg$OkListener(TabsDlg paramTabsDlg) {}
  
  public void actionPerformed(ActionEvent evt)
  {
    if (TabsDlg.access$200(this$0) != null) {
      TabsDlg.access$200(this$0).actionPerformed(evt);
    }
    this$0.setVisible(false);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.TabsDlg.OkListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

import com.sun.java.swing.action.ApplyAction;
import com.sun.java.swing.action.CancelAction;
import com.sun.java.swing.action.DelegateAction;
import com.sun.java.swing.action.OkAction;
import java.awt.AWTEventMulticaster;
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Vector;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTabbedPane;

public class TabsDlg
  extends JDialog
{
  private JTabbedPane tabsPanel;
  private DelegateAction okAction;
  private DelegateAction cancelAction;
  private DelegateAction applyAction;
  private ActionListener okListener;
  private ActionListener cancelListener;
  private ActionListener applyListener;
  private static TabsDlg tabsDlg;
  
  private class ApplyListener
    implements ActionListener
  {
    ApplyListener(TabsDlg.1 x1)
    {
      this();
    }
    
    private ApplyListener() {}
    
    public void actionPerformed(ActionEvent evt)
    {
      if (applyListener != null)
      {
        applyListener.actionPerformed(evt);
        enableApplyButton(false);
      }
    }
  }
  
  private class CancelListener
    implements ActionListener
  {
    CancelListener(TabsDlg.1 x1)
    {
      this();
    }
    
    private CancelListener() {}
    
    public void actionPerformed(ActionEvent evt)
    {
      if (cancelListener != null) {
        cancelListener.actionPerformed(evt);
      }
      setVisible(false);
    }
  }
  
  private class OkListener
    implements ActionListener
  {
    OkListener(TabsDlg.1 x1)
    {
      this();
    }
    
    private OkListener() {}
    
    public void actionPerformed(ActionEvent evt)
    {
      if (okListener != null) {
        okListener.actionPerformed(evt);
      }
      setVisible(false);
    }
  }
  
  public TabsDlg(String title, Vector panels)
  {
    super(new JFrame(), title, true);
    okListener = null;
    cancelListener = null;
    applyListener = null;
    Container pane = getContentPane();
    pane.setLayout(new BorderLayout());
    tabsPanel = new JTabbedPane();
    int numPanels = panels.size();
    for (int i = 0; i < numPanels; i++)
    {
      JPanel panel = (JPanel)panels.elementAt(i);
      tabsPanel.addTab(panel.getName(), panel);
    }
    pane.add(tabsPanel, "Center");
    pane.add(createButtonPanel(), "South");
    pack();
    CommonUI.centerComponent(this);
  }
  
  public static void main(String[] args)
  {
    JPanel p1 = new JPanel();
    p1.add(new JButton("One"));
    p1.setName("One");
    JPanel p2 = new JPanel();
    p2.add(new JButton("Two"));
    p2.setName("Two");
    JPanel p3 = new JPanel();
    p3.add(new JButton("Three"));
    p3.setName("Three");
    JPanel p4 = new JPanel();
    p4.add(new JButton("Four"));
    p4.setName("Four");
    Vector panels = new Vector();
    panels.addElement(p1);
    panels.addElement(p2);
    panels.addElement(p3);
    panels.addElement(p4);
    tabsDlg = new TabsDlg("Test Dialog", panels);
    tabsDlg.addOkListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        System.exit(0);
      }
    });
    tabsDlg.addCancelListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        System.exit(0);
      }
    });
    tabsDlg.setVisible(true);
  }
  
  private JPanel createButtonPanel()
  {
    JPanel panel = new JPanel();
    okAction = new OkAction();
    cancelAction = new CancelAction();
    applyAction = new ApplyAction();
    okAction.addActionListener(new OkListener(null));
    cancelAction.addActionListener(new CancelListener(null));
    applyAction.addActionListener(new ApplyListener(null));
    panel.add(CommonUI.createButton(okAction));
    panel.add(CommonUI.createButton(cancelAction));
    panel.add(CommonUI.createButton(applyAction));
    JPanel p2 = new JPanel(new BorderLayout());
    p2.add(panel, "Center");
    p2.add(new JSeparator(), "North");
    return p2;
  }
  
  public void enableApplyButton(boolean enabled)
  {
    applyAction.setEnabled(enabled);
  }
  
  public synchronized void addOkListener(ActionListener l)
  {
    okListener = AWTEventMulticaster.add(okListener, l);
  }
  
  public synchronized void removeOkListener(ActionListener l)
  {
    okListener = AWTEventMulticaster.remove(okListener, l);
  }
  
  public synchronized void addCancelListener(ActionListener l)
  {
    cancelListener = AWTEventMulticaster.add(cancelListener, l);
  }
  
  public synchronized void removeCancelListener(ActionListener l)
  {
    cancelListener = AWTEventMulticaster.remove(cancelListener, l);
  }
  
  public synchronized void addApplyListener(ActionListener l)
  {
    applyListener = AWTEventMulticaster.add(applyListener, l);
  }
  
  public synchronized void removeApplyListener(ActionListener l)
  {
    applyListener = AWTEventMulticaster.remove(applyListener, l);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.TabsDlg
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.AbstractButton;

public class ToggleActionPropertyChangeListener
  implements PropertyChangeListener
{
  private AbstractButton button;
  
  public ToggleActionPropertyChangeListener(AbstractButton button)
  {
    this.button = button;
  }
  
  public void propertyChange(PropertyChangeEvent evt)
  {
    String propertyName = evt.getPropertyName();
    if (propertyName.equals("selected"))
    {
      Boolean selected = (Boolean)evt.getNewValue();
      button.setSelected(selected.booleanValue());
    }
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.ToggleActionPropertyChangeListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

final class WizardDlg$1
  implements ActionListener
{
  public void actionPerformed(ActionEvent evt)
  {
    System.exit(0);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.WizardDlg.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

final class WizardDlg$2
  implements ActionListener
{
  public void actionPerformed(ActionEvent evt)
  {
    System.exit(0);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.WizardDlg.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

class WizardDlg$BackListener
  implements ActionListener
{
  private final WizardDlg this$0;
  
  WizardDlg$BackListener(WizardDlg x0, WizardDlg.1 x1)
  {
    this(x0);
  }
  
  private WizardDlg$BackListener(WizardDlg paramWizardDlg) {}
  
  public void actionPerformed(ActionEvent evt)
  {
    WizardDlg.access$210(this$0);
    if (WizardDlg.access$200(this$0) < 1) {
      WizardDlg.access$202(this$0, 1);
    } else {
      WizardDlg.access$500(this$0).previous(WizardDlg.access$400(this$0));
    }
    if (WizardDlg.access$800(this$0) != null) {
      WizardDlg.access$800(this$0).actionPerformed(evt);
    }
    WizardDlg.access$700(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.WizardDlg.BackListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

class WizardDlg$CancelListener
  implements ActionListener
{
  private final WizardDlg this$0;
  
  WizardDlg$CancelListener(WizardDlg x0, WizardDlg.1 x1)
  {
    this(x0);
  }
  
  private WizardDlg$CancelListener(WizardDlg paramWizardDlg) {}
  
  public void actionPerformed(ActionEvent evt)
  {
    if (WizardDlg.access$000(this$0) != null) {
      WizardDlg.access$000(this$0).actionPerformed(evt);
    }
    this$0.setVisible(false);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.WizardDlg.CancelListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

class WizardDlg$FinishListener
  implements ActionListener
{
  private final WizardDlg this$0;
  
  WizardDlg$FinishListener(WizardDlg x0, WizardDlg.1 x1)
  {
    this(x0);
  }
  
  private WizardDlg$FinishListener(WizardDlg paramWizardDlg) {}
  
  public void actionPerformed(ActionEvent evt)
  {
    if (WizardDlg.access$100(this$0) != null) {
      WizardDlg.access$100(this$0).actionPerformed(evt);
    }
    this$0.setVisible(false);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.WizardDlg.FinishListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

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

class WizardDlg$NextListener
  implements ActionListener
{
  private final WizardDlg this$0;
  
  WizardDlg$NextListener(WizardDlg x0, WizardDlg.1 x1)
  {
    this(x0);
  }
  
  private WizardDlg$NextListener(WizardDlg paramWizardDlg) {}
  
  public void actionPerformed(ActionEvent evt)
  {
    WizardDlg.access$208(this$0);
    if (WizardDlg.access$200(this$0) > WizardDlg.access$300(this$0)) {
      WizardDlg.access$202(this$0, WizardDlg.access$300(this$0));
    } else {
      WizardDlg.access$500(this$0).next(WizardDlg.access$400(this$0));
    }
    if (WizardDlg.access$600(this$0) != null) {
      WizardDlg.access$600(this$0).actionPerformed(evt);
    }
    WizardDlg.access$700(this$0);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.WizardDlg.NextListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.java.swing.ui;

import com.sun.java.swing.action.BackAction;
import com.sun.java.swing.action.CancelAction;
import com.sun.java.swing.action.DelegateAction;
import com.sun.java.swing.action.FinishAction;
import com.sun.java.swing.action.NextAction;
import java.awt.AWTEventMulticaster;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Vector;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSeparator;

public class WizardDlg
  extends JDialog
{
  private CardLayout panesLayout;
  private JPanel panesPanel;
  private DelegateAction backAction;
  private DelegateAction nextAction;
  private DelegateAction finishAction;
  private DelegateAction cancelAction;
  private ActionListener finishListener;
  private ActionListener cancelListener;
  private ActionListener nextListener;
  private ActionListener backListener;
  private int numCards;
  private int cardShowing;
  private String title;
  private Vector panels;
  private Vector images;
  private static WizardDlg wizardDlg;
  
  private class CancelListener
    implements ActionListener
  {
    CancelListener(WizardDlg.1 x1)
    {
      this();
    }
    
    private CancelListener() {}
    
    public void actionPerformed(ActionEvent evt)
    {
      if (cancelListener != null) {
        cancelListener.actionPerformed(evt);
      }
      setVisible(false);
    }
  }
  
  private class FinishListener
    implements ActionListener
  {
    FinishListener(WizardDlg.1 x1)
    {
      this();
    }
    
    private FinishListener() {}
    
    public void actionPerformed(ActionEvent evt)
    {
      if (finishListener != null) {
        finishListener.actionPerformed(evt);
      }
      setVisible(false);
    }
  }
  
  private class NextListener
    implements ActionListener
  {
    NextListener(WizardDlg.1 x1)
    {
      this();
    }
    
    private NextListener() {}
    
    public void actionPerformed(ActionEvent evt)
    {
      WizardDlg.access$208(WizardDlg.this);
      if (cardShowing > numCards) {
        cardShowing = numCards;
      } else {
        panesLayout.next(panesPanel);
      }
      if (nextListener != null) {
        nextListener.actionPerformed(evt);
      }
      WizardDlg.this.enableBackNextButtons();
    }
  }
  
  private class BackListener
    implements ActionListener
  {
    BackListener(WizardDlg.1 x1)
    {
      this();
    }
    
    private BackListener() {}
    
    public void actionPerformed(ActionEvent evt)
    {
      WizardDlg.access$210(WizardDlg.this);
      if (cardShowing < 1) {
        cardShowing = 1;
      } else {
        panesLayout.previous(panesPanel);
      }
      if (backListener != null) {
        backListener.actionPerformed(evt);
      }
      WizardDlg.this.enableBackNextButtons();
    }
  }
  
  public WizardDlg(JFrame frame, String title, Vector panels, Vector images)
  {
    super(frame, title, true);
    this.title = title;
    this.images = images;
    Container pane = getContentPane();
    pane.setLayout(new BorderLayout());
    panesLayout = new CardLayout();
    panesPanel = new JPanel(panesLayout);
    pane.add(panesPanel, "Center");
    pane.add(createButtonPanel(), "South");
    setPanels(panels);
    pack();
    CommonUI.centerComponent(this);
  }
  
  public WizardDlg(JFrame frame, String title, Vector panels)
  {
    this(frame, title, panels, null);
  }
  
  public WizardDlg(String title, Vector panels)
  {
    this(new JFrame(), title, panels, null);
  }
  
  public void setPanels(Vector panels)
  {
    numCards = panels.size();
    cardShowing = 1;
    this.panels = panels;
    panesPanel.removeAll();
    for (int i = 0; i < numCards; i++) {
      panesPanel.add((JPanel)panels.elementAt(i), new Integer(i).toString());
    }
    validate();
    enableBackNextButtons();
  }
  
  public void reset()
  {
    cardShowing = 1;
    panesLayout.first(panesPanel);
    enableBackNextButtons();
  }
  
  public void setWestPanel(JPanel panel)
  {
    Container pane = getContentPane();
    pane.add(panel, "West");
  }
  
  public static void main(String[] args)
  {
    JPanel p1 = new JPanel();
    p1.add(new JButton("One"));
    JPanel p2 = new JPanel();
    p2.add(new JButton("Two"));
    JPanel p3 = new JPanel();
    p3.add(new JButton("Three"));
    JPanel p4 = new JPanel();
    p4.add(new JButton("Four"));
    Vector panels = new Vector();
    panels.addElement(p1);
    panels.addElement(p2);
    panels.addElement(p3);
    panels.addElement(p4);
    wizardDlg = new WizardDlg("Test Dialog", panels);
    wizardDlg.addFinishListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        System.exit(0);
      }
    });
    wizardDlg.addCancelListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        System.exit(0);
      }
    });
    wizardDlg.setVisible(true);
  }
  
  private JPanel createButtonPanel()
  {
    JPanel panel = new JPanel();
    backAction = new BackAction();
    nextAction = new NextAction();
    finishAction = new FinishAction();
    cancelAction = new CancelAction();
    backAction.setEnabled(false);
    finishAction.setEnabled(false);
    backAction.addActionListener(new BackListener(null));
    nextAction.addActionListener(new NextListener(null));
    finishAction.addActionListener(new FinishListener(null));
    cancelAction.addActionListener(new CancelListener(null));
    panel.add(CommonUI.createButton(backAction));
    panel.add(CommonUI.createButton(nextAction));
    panel.add(CommonUI.createButton(finishAction));
    panel.add(CommonUI.createButton(cancelAction));
    JPanel p2 = new JPanel(new BorderLayout());
    p2.add(panel, "Center");
    p2.add(new JSeparator(), "North");
    return p2;
  }
  
  private void enableBackNextButtons()
  {
    if (cardShowing == 1)
    {
      backAction.setEnabled(false);
      finishAction.setEnabled(false);
      if (numCards > 1)
      {
        nextAction.setEnabled(true);
      }
      else
      {
        finishAction.setEnabled(true);
        nextAction.setEnabled(false);
      }
    }
    else if (cardShowing == numCards)
    {
      nextAction.setEnabled(false);
      finishAction.setEnabled(true);
      if (numCards > 1) {
        backAction.setEnabled(true);
      } else {
        backAction.setEnabled(false);
      }
    }
    else
    {
      backAction.setEnabled(true);
      nextAction.setEnabled(true);
      finishAction.setEnabled(false);
    }
    setTitle();
  }
  
  private void setTitle()
  {
    JPanel panel = (JPanel)panels.elementAt(cardShowing - 1);
    String newTitle = title;
    String panelTitle = panel.getName();
    if ((panelTitle != null) && (panelTitle.equals("")))
    {
      newTitle = newTitle + " - ";
      newTitle = newTitle + panelTitle;
    }
    super.setTitle(newTitle);
  }
  
  public synchronized void addFinishListener(ActionListener l)
  {
    finishListener = AWTEventMulticaster.add(finishListener, l);
  }
  
  public synchronized void removeFinishListener(ActionListener l)
  {
    finishListener = AWTEventMulticaster.remove(finishListener, l);
  }
  
  public synchronized void addCancelListener(ActionListener l)
  {
    cancelListener = AWTEventMulticaster.add(cancelListener, l);
  }
  
  public synchronized void removeCancelListener(ActionListener l)
  {
    cancelListener = AWTEventMulticaster.remove(cancelListener, l);
  }
  
  public synchronized void addNextListener(ActionListener l)
  {
    nextListener = AWTEventMulticaster.add(nextListener, l);
  }
  
  public synchronized void removeNextListener(ActionListener l)
  {
    nextListener = AWTEventMulticaster.remove(nextListener, l);
  }
  
  public synchronized void addBackListener(ActionListener l)
  {
    backListener = AWTEventMulticaster.add(backListener, l);
  }
  
  public synchronized void removeBackListener(ActionListener l)
  {
    backListener = AWTEventMulticaster.remove(backListener, l);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.WizardDlg
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm;

public abstract class AbstractInstruction
  implements Instruction
{
  protected final String name;
  
  public AbstractInstruction(String name)
  {
    this.name = name;
  }
  
  public String getName()
  {
    return name;
  }
  
  public boolean isIllegal()
  {
    return false;
  }
  
  public boolean isArithmetic()
  {
    return false;
  }
  
  public boolean isLogical()
  {
    return false;
  }
  
  public boolean isShift()
  {
    return false;
  }
  
  public boolean isMove()
  {
    return false;
  }
  
  public boolean isBranch()
  {
    return false;
  }
  
  public boolean isCall()
  {
    return false;
  }
  
  public boolean isReturn()
  {
    return false;
  }
  
  public boolean isLoad()
  {
    return false;
  }
  
  public boolean isStore()
  {
    return false;
  }
  
  public boolean isFloat()
  {
    return false;
  }
  
  public boolean isTrap()
  {
    return false;
  }
  
  public boolean isNoop()
  {
    return false;
  }
  
  public String asString(long currentPc, SymbolFinder symFinder)
  {
    return name;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.AbstractInstruction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm;

public abstract class Address
  extends Operand
{
  public boolean isAddress()
  {
    return true;
  }
  
  public abstract String toString();
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.Address
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.amd64;

import sun.jvm.hotspot.asm.Register;

public class AMD64FloatRegister
  extends Register
{
  public AMD64FloatRegister(int number)
  {
    super(number);
  }
  
  public int getNumber()
  {
    return number;
  }
  
  public int getNumberOfRegisters()
  {
    return AMD64FloatRegisters.getNumRegisters();
  }
  
  public boolean isFloat()
  {
    return true;
  }
  
  public boolean isFramePointer()
  {
    return false;
  }
  
  public boolean isStackPointer()
  {
    return false;
  }
  
  public boolean isValid()
  {
    return (number >= 0) && (number < AMD64FloatRegisters.getNumRegisters());
  }
  
  public String toString()
  {
    return AMD64FloatRegisters.getRegisterName(number);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.amd64.AMD64FloatRegister
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.amd64;

import sun.jvm.hotspot.utilities.Assert;

public class AMD64FloatRegisters
{
  public static int getNumRegisters()
  {
    return 16;
  }
  
  public static AMD64FloatRegister getRegister(int regNum)
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that((regNum > -1) && (regNum < 16), "invalid float register number!");
    }
    return registers[regNum];
  }
  
  public static String getRegisterName(int i)
  {
    return "XMM(" + i + ")";
  }
  
  public static final AMD64FloatRegister XMM0 = new AMD64FloatRegister(0);
  public static final AMD64FloatRegister XMM1 = new AMD64FloatRegister(1);
  public static final AMD64FloatRegister XMM2 = new AMD64FloatRegister(2);
  public static final AMD64FloatRegister XMM3 = new AMD64FloatRegister(3);
  public static final AMD64FloatRegister XMM4 = new AMD64FloatRegister(4);
  public static final AMD64FloatRegister XMM5 = new AMD64FloatRegister(5);
  public static final AMD64FloatRegister XMM6 = new AMD64FloatRegister(6);
  public static final AMD64FloatRegister XMM7 = new AMD64FloatRegister(7);
  public static final AMD64FloatRegister XMM8 = new AMD64FloatRegister(8);
  public static final AMD64FloatRegister XMM9 = new AMD64FloatRegister(9);
  public static final AMD64FloatRegister XMM10 = new AMD64FloatRegister(10);
  public static final AMD64FloatRegister XMM11 = new AMD64FloatRegister(11);
  public static final AMD64FloatRegister XMM12 = new AMD64FloatRegister(12);
  public static final AMD64FloatRegister XMM13 = new AMD64FloatRegister(13);
  public static final AMD64FloatRegister XMM14 = new AMD64FloatRegister(14);
  public static final AMD64FloatRegister XMM15 = new AMD64FloatRegister(15);
  public static final int NUM_REGIXMMERS = 16;
  private static final AMD64FloatRegister[] registers = { XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15 };
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.amd64.AMD64FloatRegisters
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.amd64;

import sun.jvm.hotspot.asm.CPUHelper;
import sun.jvm.hotspot.asm.Disassembler;
import sun.jvm.hotspot.asm.Register;

public class AMD64Helper
  implements CPUHelper
{
  public Disassembler createDisassembler(long startPc, byte[] code)
  {
    return null;
  }
  
  public Register getIntegerRegister(int num)
  {
    return AMD64Registers.getRegister(num);
  }
  
  public Register getFloatRegister(int num)
  {
    return AMD64FloatRegisters.getRegister(num);
  }
  
  public Register getStackPointer()
  {
    return AMD64Registers.RSP;
  }
  
  public Register getFramePointer()
  {
    return AMD64Registers.RBP;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.amd64.AMD64Helper
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.amd64;

import sun.jvm.hotspot.asm.Register;

public class AMD64Register
  extends Register
{
  protected String name;
  
  public AMD64Register(int num, String name)
  {
    super(num);
    this.name = name;
  }
  
  public int getNumberOfRegisters()
  {
    return AMD64Registers.getNumberOfRegisters();
  }
  
  public String toString()
  {
    return name;
  }
  
  public boolean isFramePointer()
  {
    return number == 5;
  }
  
  public boolean isStackPointer()
  {
    return number == 4;
  }
  
  public boolean isFloat()
  {
    return false;
  }
  
  public boolean isSegmentPointer()
  {
    return false;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.asm.amd64.AMD64Register
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.asm.amd64;

import sun.jvm.hotspot.utilities.Assert;

public class AMD64Registers
{
  public static final int NUM_REGISTERS = 16;
  public static final AMD64Register RAX = new AMD64Register(0, "rax");
  public static final AMD64Register RCX = new AMD64Register(1, "rcx");
  public static final AMD64Register RDX = new AMD64Register(2, "rdx");
  public static final AMD64Register RBX = new AMD64Register(3, "rbx");
  public static final AMD64Register RSP = new AMD64Register(4, "rsp");
  public static final AMD64Register RBP = new AMD64Register(5, "rbp");
  public static final AMD64Register RSI = new AMD64Register(6, "rsi");
  public static final AMD64Register RDI = new AMD64Register(7, "rdi");
  public static final AMD64Register R8 = new AMD64Register(8, "r8");
  public static final AMD64Register R9 = new AMD64Register(9, "r9");
  public static final AMD64Register R10 = new AMD64Register(10, "r10");
  public static final AMD64Register R11 = new AMD64Register(11, "r11");
  public static final AMD64Register R12 = new AMD64Register(12, "r12");
  public static final AMD64Register R13 = new AMD64Register(13, "r13");
  public static final AMD64Register R14 = new AMD64Register(14, "r14");
  public static final AMD64Register R15 = new AMD64Register(15, "r15");
  private static final AMD64Register[] registers = { RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI, R8, R9, R10, R11, R12, R13, R14, R15 };
  
  public static int getNumberOfRegisters()
  {
    return 16;
  }
  
  public static AMD64Register getRegister(int regNum)
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that((regNum > -1) && (regNum < 16), "invalid integer register number!");
    }
    return registers[regNum];
  }
  
  public static String getRegisterName(int regNum)
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that((regNum > -1) && (regNum < 16), "invalid integer register number!");
    }
    return registers[regNum].toString();
  }
}

/* Location:
 *
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114

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-2019. Infinite Loop Ltd