sa-jdi

16:51:54.828 INFO  jd.cli.Main - Decompiling sa-jdi.jar
package com.sun.java.swing.action;

public class AboutAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "about-command";
  public static final String VALUE_NAME = "About...";
  public static final String VALUE_SMALL_ICON = "general/About16.gif";
  public static final String VALUE_LARGE_ICON = "general/About24.gif";
  
  public AboutAction()
  {
    this("general/About16.gif");
  }
  
  public AboutAction(String iconPath)
  {
    super("About...", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "about-command");
    putValue("ShortDescription", "About...");
    putValue("LongDescription", "System information and version of the application.");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(65);
  public static final String VALUE_SHORT_DESCRIPTION = "About...";
  public static final String VALUE_LONG_DESCRIPTION = "System information and version of the application.";
}

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

import java.util.HashMap;
import javax.swing.Action;
import javax.swing.ImageIcon;

public abstract class ActionManager
{
  private HashMap actions;
  
  protected ActionManager()
  {
    actions = new HashMap();
    addActions();
  }
  
  public static ActionManager getInstance()
  {
    return manager;
  }
  
  protected abstract void addActions();
  
  protected void addAction(String cmdname, Action action)
  {
    actions.put(cmdname, action);
  }
  
  public Action getAction(String key)
  {
    return (Action)actions.get(key);
  }
  
  public DelegateAction getDelegateAction(String name)
  {
    Action a = getAction(name);
    if ((a instanceof DelegateAction)) {
      return (DelegateAction)a;
    }
    return null;
  }
  
  public StateChangeAction getStateChangeAction(String name)
  {
    Action a = getAction(name);
    if ((a instanceof StateChangeAction)) {
      return (StateChangeAction)a;
    }
    return null;
  }
  
  public static ImageIcon getIcon(String name)
  {
    return utilities.getIcon(name);
  }
  
  public void setActionEnabled(String name, boolean enabled)
  {
    Action action = getAction(name);
    if (action != null) {
      action.setEnabled(enabled);
    }
  }
  
  private static ActionUtilities utilities = new ActionUtilities();
  protected static ActionManager manager;
}

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

import java.net.URL;
import javax.swing.ImageIcon;

class ActionUtilities
{
  public static final String IMAGE_DIR = "/toolbarButtonGraphics/";
  
  public ImageIcon getIcon(String name)
  {
    String imagePath = "/toolbarButtonGraphics/" + name;
    URL url = getClass().getResource(imagePath);
    if (url != null) {
      return new ImageIcon(url);
    }
    return null;
  }
}

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

import javax.swing.KeyStroke;

public class AlignCenterAction
  extends StateChangeAction
{
  public static final String VALUE_COMMAND = "align-center-command";
  public static final String VALUE_NAME = "Center";
  public static final String VALUE_SMALL_ICON = "text/AlignCenter16.gif";
  public static final String VALUE_LARGE_ICON = "text/AlignCenter24.gif";
  
  public AlignCenterAction()
  {
    this("text/AlignCenter16.gif");
  }
  
  public AlignCenterAction(String iconPath)
  {
    super("Center", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "align-center-command");
    putValue("ShortDescription", "Center");
    putValue("LongDescription", "Adjust the placement of text to the center of the line");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(78);
  public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(69, 2);
  public static final String VALUE_SHORT_DESCRIPTION = "Center";
  public static final String VALUE_LONG_DESCRIPTION = "Adjust the placement of text to the center of the line";
}

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

import javax.swing.KeyStroke;

public class AlignLeftAction
  extends StateChangeAction
{
  public static final String VALUE_COMMAND = "align-left-command";
  public static final String VALUE_NAME = "Left Align";
  public static final String VALUE_SMALL_ICON = "text/AlignLeft16.gif";
  public static final String VALUE_LARGE_ICON = "text/AlignLeft24.gif";
  
  public AlignLeftAction()
  {
    this("text/AlignLeft16.gif");
  }
  
  public AlignLeftAction(String iconPath)
  {
    super("Left Align", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "align-left-command");
    putValue("ShortDescription", "Left Align");
    putValue("LongDescription", "Adjust the placement of text along the left edge");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(76);
  public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(76, 2);
  public static final String VALUE_SHORT_DESCRIPTION = "Left Align";
  public static final String VALUE_LONG_DESCRIPTION = "Adjust the placement of text along the left edge";
}

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

import javax.swing.KeyStroke;

public class AlignRightAction
  extends StateChangeAction
{
  public static final String VALUE_COMMAND = "align-right-command";
  public static final String VALUE_NAME = "Right Align";
  public static final String VALUE_SMALL_ICON = "text/AlignRight16.gif";
  public static final String VALUE_LARGE_ICON = "text/AlignRight24.gif";
  
  public AlignRightAction()
  {
    this("text/AlignRight16.gif");
  }
  
  public AlignRightAction(String iconPath)
  {
    super("Right Align", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "align-right-command");
    putValue("ShortDescription", "Right Align");
    putValue("LongDescription", "Adjust the placement of text along the right edge");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(82);
  public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(82, 2);
  public static final String VALUE_SHORT_DESCRIPTION = "Right Align";
  public static final String VALUE_LONG_DESCRIPTION = "Adjust the placement of text along the right edge";
}

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

import javax.swing.KeyStroke;

public class ApplyAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "apply-command";
  public static final String VALUE_NAME = "Apply";
  
  public ApplyAction()
  {
    this(VALUE_SMALL_ICON);
  }
  
  public ApplyAction(String iconPath)
  {
    super("Apply", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "apply-command");
    putValue("ShortDescription", "Apply the activity");
    putValue("LongDescription", "Apply the activity");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final String VALUE_SMALL_ICON = null;
  public static final String VALUE_LARGE_ICON = null;
  public static final Integer VALUE_MNEMONIC = new Integer(65);
  public static final KeyStroke VALUE_ACCELERATOR = null;
  public static final String VALUE_SHORT_DESCRIPTION = "Apply the activity";
  public static final String VALUE_LONG_DESCRIPTION = "Apply the activity";
}

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

import javax.swing.KeyStroke;

public class BackAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "back-command";
  public static final String VALUE_NAME = "< Back";
  
  public BackAction()
  {
    this(VALUE_SMALL_ICON);
  }
  
  public BackAction(String iconPath)
  {
    super("< Back", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "back-command");
    putValue("ShortDescription", "Select previous item");
    putValue("LongDescription", "Select previous item");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final String VALUE_SMALL_ICON = null;
  public static final String VALUE_LARGE_ICON = null;
  public static final Integer VALUE_MNEMONIC = new Integer(66);
  public static final KeyStroke VALUE_ACCELERATOR = null;
  public static final String VALUE_SHORT_DESCRIPTION = "Select previous item";
  public static final String VALUE_LONG_DESCRIPTION = "Select previous item";
}

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

import javax.swing.KeyStroke;

public class CancelAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "cancel-command";
  public static final String VALUE_NAME = "Cancel";
  
  public CancelAction()
  {
    this(VALUE_SMALL_ICON);
  }
  
  public CancelAction(String iconPath)
  {
    super("Cancel", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "cancel-command");
    putValue("ShortDescription", "Cancels the action");
    putValue("LongDescription", "Cancels the action");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final String VALUE_SMALL_ICON = null;
  public static final String VALUE_LARGE_ICON = null;
  public static final Integer VALUE_MNEMONIC = new Integer(67);
  public static final KeyStroke VALUE_ACCELERATOR = null;
  public static final String VALUE_SHORT_DESCRIPTION = "Cancels the action";
  public static final String VALUE_LONG_DESCRIPTION = "Cancels the action";
}

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

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.AbstractAction;
import javax.swing.Icon;

public abstract class DelegateAction
  extends AbstractAction
{
  private ActionListener listener;
  
  public DelegateAction(String name, Icon icon)
  {
    super(name, icon);
  }
  
  public void addActionListener(ActionListener listener)
  {
    this.listener = listener;
  }
  
  public void removeActionListener(ActionListener listener)
  {
    this.listener = null;
  }
  
  public ActionListener[] getActionListeners()
  {
    return new ActionListener[] { listener };
  }
  
  public void actionPerformed(ActionEvent evt)
  {
    if (listener != null) {
      listener.actionPerformed(evt);
    }
  }
}

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

import javax.swing.KeyStroke;

public class ExitAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "exit-command";
  public static final String VALUE_NAME = "Exit";
  
  public ExitAction()
  {
    super("Exit", ActionManager.getIcon(VALUE_SMALL_ICON));
    putValue("ActionCommandKey", "exit-command");
    putValue("ShortDescription", "Exits the application");
    putValue("LongDescription", "Exits the application");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final String VALUE_SMALL_ICON = null;
  public static final String VALUE_LARGE_ICON = null;
  public static final Integer VALUE_MNEMONIC = new Integer(88);
  public static final KeyStroke VALUE_ACCELERATOR = null;
  public static final String VALUE_SHORT_DESCRIPTION = "Exits the application";
  public static final String VALUE_LONG_DESCRIPTION = "Exits the application";
}

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

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;

public class FileMenu
  extends AbstractAction
{
  public static final String VALUE_COMMAND = "file-menu-command";
  public static final String VALUE_NAME = "File";
  
  public FileMenu()
  {
    super("File");
    putValue("ActionCommandKey", "file-menu-command");
    putValue("ShortDescription", "File operations");
    putValue("LongDescription", "File operations");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(70);
  public static final String VALUE_SHORT_DESCRIPTION = "File operations";
  public static final String VALUE_LONG_DESCRIPTION = "File operations";
  
  public void actionPerformed(ActionEvent actionevent) {}
}

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

import javax.swing.KeyStroke;

public class FinishAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "finish-command";
  public static final String VALUE_NAME = "Finish";
  
  public FinishAction()
  {
    this(VALUE_SMALL_ICON);
  }
  
  public FinishAction(String iconPath)
  {
    super("Finish", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "finish-command");
    putValue("ShortDescription", "Finish the activity");
    putValue("LongDescription", "Finish the activity");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final String VALUE_SMALL_ICON = null;
  public static final String VALUE_LARGE_ICON = null;
  public static final Integer VALUE_MNEMONIC = new Integer(70);
  public static final KeyStroke VALUE_ACCELERATOR = null;
  public static final String VALUE_SHORT_DESCRIPTION = "Finish the activity";
  public static final String VALUE_LONG_DESCRIPTION = "Finish the activity";
}

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

import javax.swing.KeyStroke;

public class HelpAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "help-command";
  public static final String VALUE_NAME = "Help";
  public static final String VALUE_SMALL_ICON = "general/Help16.gif";
  public static final String VALUE_LARGE_ICON = "general/Help24.gif";
  
  public HelpAction()
  {
    this("general/Help16.gif");
  }
  
  public HelpAction(String iconPath)
  {
    super("Help", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "help-command");
    putValue("ShortDescription", "Help...");
    putValue("LongDescription", "Provide information which may aid the user.");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(72);
  public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(112, 0);
  public static final String VALUE_SHORT_DESCRIPTION = "Help...";
  public static final String VALUE_LONG_DESCRIPTION = "Provide information which may aid the user.";
}

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

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;

public class HelpMenu
  extends AbstractAction
{
  public static final String VALUE_COMMAND = "help-menu-command";
  public static final String VALUE_NAME = "Help";
  
  public HelpMenu()
  {
    super("Help");
    putValue("ActionCommandKey", "help-menu-command");
    putValue("ShortDescription", "Help operations");
    putValue("LongDescription", "Help operations");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(72);
  public static final String VALUE_SHORT_DESCRIPTION = "Help operations";
  public static final String VALUE_LONG_DESCRIPTION = "Help operations";
  
  public void actionPerformed(ActionEvent actionevent) {}
}

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

import javax.swing.KeyStroke;

public class NewAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "new-command";
  public static final String VALUE_NAME = "New";
  public static final String VALUE_SMALL_ICON = "general/New16.gif";
  public static final String VALUE_LARGE_ICON = "general/New24.gif";
  
  public NewAction()
  {
    this("general/New16.gif");
  }
  
  public NewAction(String iconPath)
  {
    super("New", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "new-command");
    putValue("ShortDescription", "Create a new object.");
    putValue("LongDescription", "Create a new object.");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(78);
  public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(78, 2);
  public static final String VALUE_SHORT_DESCRIPTION = "Create a new object.";
  public static final String VALUE_LONG_DESCRIPTION = "Create a new object.";
}

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

import javax.swing.KeyStroke;

public class NextAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "next-command";
  public static final String VALUE_NAME = "Next >";
  
  public NextAction()
  {
    this(VALUE_SMALL_ICON);
  }
  
  public NextAction(String iconPath)
  {
    super("Next >", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "next-command");
    putValue("ShortDescription", "Select next item");
    putValue("LongDescription", "Select next item");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final String VALUE_SMALL_ICON = null;
  public static final String VALUE_LARGE_ICON = null;
  public static final Integer VALUE_MNEMONIC = new Integer(78);
  public static final KeyStroke VALUE_ACCELERATOR = null;
  public static final String VALUE_SHORT_DESCRIPTION = "Select next item";
  public static final String VALUE_LONG_DESCRIPTION = "Select next item";
}

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

import javax.swing.KeyStroke;

public class OkAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "ok-command";
  public static final String VALUE_NAME = "OK";
  
  public OkAction()
  {
    this(VALUE_SMALL_ICON);
  }
  
  public OkAction(String iconPath)
  {
    super("OK", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "ok-command");
    putValue("ShortDescription", "Acknowleges the action");
    putValue("LongDescription", "Acknowleges the action");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final String VALUE_SMALL_ICON = null;
  public static final String VALUE_LARGE_ICON = null;
  public static final Integer VALUE_MNEMONIC = new Integer(79);
  public static final KeyStroke VALUE_ACCELERATOR = null;
  public static final String VALUE_SHORT_DESCRIPTION = "Acknowleges the action";
  public static final String VALUE_LONG_DESCRIPTION = "Acknowleges the action";
}

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

import javax.swing.KeyStroke;

public class OpenAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "open-command";
  public static final String VALUE_NAME = "Open...";
  public static final String VALUE_SMALL_ICON = "general/Open16.gif";
  public static final String VALUE_LARGE_ICON = "general/Open24.gif";
  
  public OpenAction()
  {
    this("general/Open16.gif");
  }
  
  public OpenAction(String iconPath)
  {
    super("Open...", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "open-command");
    putValue("ShortDescription", "Open the specified object.");
    putValue("LongDescription", "Open the specified object.");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(79);
  public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(79, 2);
  public static final String VALUE_SHORT_DESCRIPTION = "Open the specified object.";
  public static final String VALUE_LONG_DESCRIPTION = "Open the specified object.";
}

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

import javax.swing.KeyStroke;

public class SaveAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "save-command";
  public static final String VALUE_NAME = "Save";
  public static final String VALUE_SMALL_ICON = "general/Save16.gif";
  public static final String VALUE_LARGE_ICON = "general/Save24.gif";
  
  public SaveAction()
  {
    this("general/Save16.gif");
  }
  
  public SaveAction(String iconPath)
  {
    super("Save", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "save-command");
    putValue("ShortDescription", "Commit changes to a permanent storage area");
    putValue("LongDescription", "Commit changes to a permanent storage area");
    putValue("MnemonicKey", VALUE_MNEMONIC);
    putValue("AcceleratorKey", VALUE_ACCELERATOR);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(83);
  public static final KeyStroke VALUE_ACCELERATOR = KeyStroke.getKeyStroke(83, 2);
  public static final String VALUE_SHORT_DESCRIPTION = "Commit changes to a permanent storage area";
  public static final String VALUE_LONG_DESCRIPTION = "Commit changes to a permanent storage area";
}

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

public class SaveAsAction
  extends DelegateAction
{
  public static final String VALUE_COMMAND = "save-as-command";
  public static final String VALUE_NAME = "Save As";
  public static final String VALUE_SMALL_ICON = "general/SaveAs16.gif";
  public static final String VALUE_LARGE_ICON = "general/SaveAs24.gif";
  
  public SaveAsAction()
  {
    this("general/SaveAs16.gif");
  }
  
  public SaveAsAction(String iconPath)
  {
    super("Save As", ActionManager.getIcon(iconPath));
    putValue("ActionCommandKey", "save-as-command");
    putValue("ShortDescription", "Save as a new file");
    putValue("LongDescription", "Saves the current object as another object");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(65);
  public static final String VALUE_SHORT_DESCRIPTION = "Save as a new file";
  public static final String VALUE_LONG_DESCRIPTION = "Saves the current object as another object";
}

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

import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.Icon;

public abstract class StateChangeAction
  extends DelegateAction
  implements ItemListener
{
  protected boolean selected;
  private ItemListener listener;
  
  public StateChangeAction(String name)
  {
    super(name, null);
    selected = false;
  }
  
  public StateChangeAction(String name, Icon icon)
  {
    super(name, icon);
    selected = false;
  }
  
  public boolean isSelected()
  {
    return selected;
  }
  
  public synchronized void setSelected(boolean newValue)
  {
    boolean oldValue = selected;
    if (oldValue != newValue)
    {
      selected = newValue;
      firePropertyChange("selected", Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
    }
  }
  
  public void setItemListener(ItemListener listener)
  {
    this.listener = listener;
  }
  
  public ItemListener getItemListener()
  {
    return listener;
  }
  
  public void itemStateChanged(ItemEvent evt)
  {
    if (evt.getStateChange() == 1) {
      setSelected(true);
    } else {
      setSelected(false);
    }
    if (listener != null) {
      listener.itemStateChanged(evt);
    }
  }
}

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

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;

public class ViewMenu
  extends AbstractAction
{
  public static final String VALUE_COMMAND = "view-menu-command";
  public static final String VALUE_NAME = "View";
  
  public ViewMenu()
  {
    super("View");
    putValue("ActionCommandKey", "view-menu-command");
    putValue("ShortDescription", "View operations");
    putValue("LongDescription", "View operations");
    putValue("MnemonicKey", VALUE_MNEMONIC);
  }
  
  public static final Integer VALUE_MNEMONIC = new Integer(86);
  public static final String VALUE_SHORT_DESCRIPTION = "View operations";
  public static final String VALUE_LONG_DESCRIPTION = "View operations";
  
  public void actionPerformed(ActionEvent actionevent) {}
}

/* Location:
 * Qualified Name:     com.sun.java.swing.action.ViewMenu
 * 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.ActionManager;
import com.sun.java.swing.action.StateChangeAction;
import javax.swing.Action;
import javax.swing.ButtonGroup;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JRadioButtonMenuItem;

public abstract class CommonMenuBar
  extends JMenuBar
{
  protected ActionManager manager;
  private StatusBar statusBar;
  
  protected CommonMenuBar(ActionManager manager)
  {
    this(manager, StatusBar.getInstance());
  }
  
  protected CommonMenuBar(ActionManager manager, StatusBar status)
  {
    this.manager = manager;
    statusBar = status;
    configureMenu();
  }
  
  protected abstract void configureMenu();
  
  protected void configureToggleMenuItem(JMenuItem menuItem, Action action)
  {
    configureMenuItem(menuItem, action);
    action.addPropertyChangeListener(new ToggleActionPropertyChangeListener(menuItem));
  }
  
  protected void configureMenuItem(JMenuItem menuItem, Action action)
  {
    menuItem.addMouseListener(statusBar);
  }
  
  protected JMenu createMenu(String name, char mnemonic)
  {
    JMenu menu = new JMenu(name);
    menu.setMnemonic(mnemonic);
    return menu;
  }
  
  protected void addMenuItem(JMenu menu, Action action)
  {
    JMenuItem menuItem = menu.add(action);
    configureMenuItem(menuItem, action);
  }
  
  protected void addCheckBoxMenuItem(JMenu menu, StateChangeAction a)
  {
    addCheckBoxMenuItem(menu, a, false);
  }
  
  protected void addCheckBoxMenuItem(JMenu menu, StateChangeAction a, boolean selected)
  {
    JCheckBoxMenuItem mi = new JCheckBoxMenuItem(a);
    mi.addItemListener(a);
    mi.setSelected(selected);
    menu.add(mi);
    configureToggleMenuItem(mi, a);
  }
  
  protected void addRadioButtonMenuItem(JMenu menu, ButtonGroup group, StateChangeAction a)
  {
    addRadioButtonMenuItem(menu, group, a, false);
  }
  
  protected void addRadioButtonMenuItem(JMenu menu, ButtonGroup group, StateChangeAction a, boolean selected)
  {
    JRadioButtonMenuItem mi = new JRadioButtonMenuItem(a);
    mi.addItemListener(a);
    mi.setSelected(selected);
    menu.add(mi);
    if (group != null) {
      group.add(mi);
    }
    configureToggleMenuItem(mi, a);
  }
}

/* Location:
 * Qualified Name:     com.sun.java.swing.ui.CommonMenuBar
 * 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.ActionManager;
import com.sun.java.swing.action.StateChangeAction;
import java.awt.Dimension;
import java.awt.Insets;
import javax.swing.AbstractButton;
import javax.swing.Action;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JToggleButton;
import javax.swing.JToolBar;

public abstract class CommonToolBar
  extends JToolBar
{
  protected ActionManager manager;
  private Dimension buttonSize;
  private Insets buttonInsets;
  private StatusBar statusBar;
  
  protected CommonToolBar(ActionManager manager)
  {
    this(manager, StatusBar.getInstance());
  }
  
  protected CommonToolBar(ActionManager manager, StatusBar status)
  {
    this.manager = manager;
    statusBar = status;
    buttonSize = new Dimension(CommonUI.buttconPrefSize);
    buttonInsets = new Insets(0, 0, 0, 0);
    addComponents();
  }
  
  protected abstract void addComponents();
  
  protected void addButton(Action action)
  {
    JButton button = add(action);
    configureButton(button, action);
  }
  
  protected void addToggleButton(StateChangeAction a)
  {
    addToggleButton(a, null);
  }
  
  protected void addToggleButton(StateChangeAction a, ButtonGroup group)
  {
    JToggleButton button = new JToggleButton(a);
    button.addItemListener(a);
    button.setSelected(a.isSelected());
    if (group != null) {
      group.add(button);
    }
    add(button);
    configureToggleButton(button, a);
  }
  
  protected void configureToggleButton(JToggleButton button, Action action)
  {
    configureButton(button, action);
    action.addPropertyChangeListener(new ToggleActionPropertyChangeListener(button));
  }
  
  protected void configureButton(AbstractButton button, Action action)
  {
    button.setToolTipText((String)action.getValue("Name"));
    button.setText("");
    button.addMouseListener(statusBar);
  }
}

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

class CommonUI$1 {}

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

import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.PlainDocument;

class CommonUI$NumberDocument
  extends PlainDocument
{
  CommonUI$NumberDocument(CommonUI.1 x0)
  {
    this();
  }
  
  private CommonUI$NumberDocument() {}
  
  public void insertString(int offs, String str, AttributeSet atts)
    throws BadLocationException
  {
    if (!Character.isDigit(str.charAt(0))) {
      return;
    }
    super.insertString(offs, str, atts);
  }
}

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

import java.awt.Component;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.ActionListener;
import java.awt.event.KeyListener;
import java.util.StringTokenizer;
import java.util.Vector;
import javax.swing.Action;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.border.Border;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.PlainDocument;

public class CommonUI
{
  public static final int BUTTON_WIDTH = 100;
  public static final int BUTTON_HEIGHT = 26;
  public static final int BUTTCON_WIDTH = 28;
  public static final int BUTTCON_HEIGHT = 28;
  public static final int SM_BUTTON_WIDTH = 72;
  public static final int SM_BUTTON_HEIGHT = 26;
  public static final int LABEL_WIDTH = 100;
  public static final int LABEL_HEIGHT = 20;
  public static final int TEXT_WIDTH = 150;
  public static final int TEXT_HEIGHT = 20;
  
  private static class NumberDocument
    extends PlainDocument
  {
    NumberDocument(CommonUI.1 x0)
    {
      this();
    }
    
    private NumberDocument() {}
    
    public void insertString(int offs, String str, AttributeSet atts)
      throws BadLocationException
    {
      if (!Character.isDigit(str.charAt(0))) {
        return;
      }
      super.insertString(offs, str, atts);
    }
  }
  
  public static JLabel createLabel(String text, int mnemonic, Component comp)
  {
    JLabel label = new JLabel("  " + text);
    label.setMinimumSize(labelPrefSize);
    if (mnemonic != -1) {
      label.setDisplayedMnemonic(mnemonic);
    }
    if (comp != null) {
      label.setLabelFor(comp);
    }
    if (text.length() == 0) {
      label.setPreferredSize(labelPrefSize);
    }
    return label;
  }
  
  public static JLabel createLabel(String text)
  {
    return createLabel(text, -1, null);
  }
  
  public static JTextField createTextField(String text, KeyListener listener, boolean numbers)
  {
    JTextField field = new JTextField(text);
    field.setMinimumSize(textPrefSize);
    if (text.length() == 0) {
      field.setPreferredSize(textPrefSize);
    }
    if (listener != null) {
      field.addKeyListener(listener);
    }
    if (numbers) {
      field.setDocument(new NumberDocument(null));
    }
    return field;
  }
  
  public static JTextField createTextField(String text, boolean numbers)
  {
    return createTextField(text, null, numbers);
  }
  
  public static JTextField createTextField(String text, KeyListener listener)
  {
    return createTextField(text, listener, false);
  }
  
  public static JTextField createTextField(String text)
  {
    return createTextField(text, null, false);
  }
  
  public static JRadioButton createRadioButton(String text, int mnemonic, ActionListener listener, boolean selected)
  {
    JRadioButton button = new JRadioButton(text);
    button.setMnemonic(mnemonic);
    button.setSelected(selected);
    button.setMinimumSize(labelPrefSize);
    if (listener != null) {
      button.addActionListener(listener);
    }
    if (text.length() == 0) {
      button.setPreferredSize(labelPrefSize);
    }
    return button;
  }
  
  public static JRadioButton createRadioButton(String text, int mnemonic, boolean selected)
  {
    return createRadioButton(text, mnemonic, null, selected);
  }
  
  public static JRadioButton createRadioButton(String text, int mnemonic, ActionListener listener)
  {
    return createRadioButton(text, mnemonic, listener, false);
  }
  
  public static JRadioButton createRadioButton(String text, int mnemonic)
  {
    return createRadioButton(text, mnemonic, null, false);
  }
  
  public static JRadioButton createRadioButton(String text)
  {
    return createRadioButton(text, -1, null, false);
  }
  
  public static JCheckBox createCheckBox(String text, int mnemonic, ActionListener listener, boolean selected)
  {
    JCheckBox checkbox = new JCheckBox(text);
    checkbox.setMinimumSize(labelPrefSize);
    if (mnemonic != -1) {
      checkbox.setMnemonic(mnemonic);
    }
    checkbox.setSelected(selected);
    if (text.length() == 0) {
      checkbox.setPreferredSize(labelPrefSize);
    }
    if (listener != null) {
      checkbox.addActionListener(listener);
    }
    return checkbox;
  }
  
  public static JCheckBox createCheckBox(String text, int mnemonic, ActionListener listener)
  {
    return createCheckBox(text, mnemonic, listener, false);
  }
  
  public static JCheckBox createCheckBox(String text, int mnemonic, boolean selected)
  {
    return createCheckBox(text, mnemonic, null, selected);
  }
  
  public static JCheckBox createCheckBox(String text, int mnemonic)
  {
    return createCheckBox(text, mnemonic, null, false);
  }
  
  public static JCheckBox createCheckBox(String text)
  {
    return createCheckBox(text, -1, null, false);
  }
  
  public static JComboBox createComboBox(Object[] items, ActionListener listener, boolean editable)
  {
    JComboBox comboBox = new JComboBox(items);
    if (listener != null) {
      comboBox.addActionListener(listener);
    }
    comboBox.setEditable(editable);
    return comboBox;
  }
  
  public static JComboBox createComboBox(Object[] items, boolean editable)
  {
    return createComboBox(items, null, editable);
  }
  
  public static JComboBox createComboBox(Vector items, ActionListener listener, boolean editable)
  {
    JComboBox comboBox = new JComboBox(items);
    if (listener != null) {
      comboBox.addActionListener(listener);
    }
    comboBox.setEditable(editable);
    return comboBox;
  }
  
  public static JComboBox createComboBox(Vector items, boolean editable)
  {
    return createComboBox(items, null, editable);
  }
  
  public static JButton createButton(Action action)
  {
    JButton button = new JButton(action);
    setButtonSize(button, buttonPrefSize);
    return button;
  }
  
  public static JButton createButton(String text, ActionListener listener, int mnemonic)
  {
    JButton button = new JButton(text);
    if (listener != null) {
      button.addActionListener(listener);
    }
    if (mnemonic != -1) {
      button.setMnemonic(mnemonic);
    }
    setButtonSize(button, buttonPrefSize);
    return button;
  }
  
  private static void setButtonSize(JButton button, Dimension size)
  {
    String text = button.getText();
    button.setMinimumSize(size);
    if (text.length() == 0)
    {
      button.setPreferredSize(size);
    }
    else
    {
      Dimension psize = button.getPreferredSize();
      if (width < width) {
        button.setPreferredSize(size);
      }
    }
  }
  
  public static JButton createButton(String text, ActionListener listener)
  {
    return createButton(text, listener, -1);
  }
  
  public static JButton createSmallButton(String text, ActionListener listener, int mnemonic)
  {
    JButton button = createButton(text, listener, mnemonic);
    setButtonSize(button, smbuttonPrefSize);
    return button;
  }
  
  public static JButton createSmallButton(String text, ActionListener listener)
  {
    return createSmallButton(text, listener, -1);
  }
  
  public static Border createBorder(String text)
  {
    Border border = BorderFactory.createEtchedBorder();
    return BorderFactory.createTitledBorder(border, text, 0, 2);
  }
  
  public static Border createBorder()
  {
    return BorderFactory.createEmptyBorder(4, 4, 4, 4);
  }
  
  public stat
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-2017. Infinite Loop Ltd