jcommon-1.0.12

void setContributors(List contributors)
  {
    this.contributors = contributors;
  }
  
  public String toString()
  {
    StringBuffer result = new StringBuffer();
    result.append(getName());
    result.append(" version ");
    result.append(getVersion());
    result.append(".\n");
    result.append(getCopyright());
    result.append(".\n");
    result.append("\n");
    result.append("For terms of use, see the licence below.\n");
    result.append("\n");
    result.append("FURTHER INFORMATION:");
    result.append(getInfo());
    result.append("\n");
    result.append("CONTRIBUTORS:");
    if (contributors != null)
    {
      Iterator iterator = contributors.iterator();
      while (iterator.hasNext())
      {
        Contributor contributor = (Contributor)iterator.next();
        result.append(contributor.getName());
        result.append(" (");
        result.append(contributor.getEmail());
        result.append(").");
      }
    }
    else
    {
      result.append("None");
    }
    result.append("\n");
    result.append("OTHER LIBRARIES USED BY ");
    result.append(getName());
    result.append(":");
    Library[] libraries = getLibraries();
    if (libraries.length != 0) {
      for (int i = 0; i < libraries.length; i++)
      {
        Library lib = libraries[i];
        result.append(lib.getName());
        result.append(" ");
        result.append(lib.getVersion());
        result.append(" (");
        result.append(lib.getInfo());
        result.append(").");
      }
    } else {
      result.append("None");
    }
    result.append("\n");
    result.append(getName());
    result.append(" LICENCE TERMS:");
    result.append("\n");
    result.append(getLicenceText());
    
    return result.toString();
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.ProjectInfo
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about.resources;

import java.util.ListResourceBundle;
import javax.swing.KeyStroke;

public class AboutResources
  extends ListResourceBundle
{
  public Object[][] getContents()
  {
    return CONTENTS;
  }
  
  private static final Object[][] CONTENTS = { { "about-frame.tab.about", "About" }, { "about-frame.tab.system", "System" }, { "about-frame.tab.contributors", "Developers" }, { "about-frame.tab.licence", "Licence" }, { "about-frame.tab.libraries", "Libraries" }, { "contributors-table.column.name", "Name:" }, { "contributors-table.column.contact", "Contact:" }, { "libraries-table.column.name", "Name:" }, { "libraries-table.column.version", "Version:" }, { "libraries-table.column.licence", "Licence:" }, { "libraries-table.column.info", "Other Information:" }, { "system-frame.title", "System Properties" }, { "system-frame.button.close", "Close" }, { "system-frame.button.close.mnemonic", new Character('C') }, { "system-frame.menu.file", "File" }, { "system-frame.menu.file.mnemonic", new Character('F') }, { "system-frame.menu.file.close", "Close" }, { "system-frame.menu.file.close.mnemonic", new Character('C') }, { "system-frame.menu.edit", "Edit" }, { "system-frame.menu.edit.mnemonic", new Character('E') }, { "system-frame.menu.edit.copy", "Copy" }, { "system-frame.menu.edit.copy.mnemonic", new Character('C') }, { "system-properties-table.column.name", "Property Name:" }, { "system-properties-table.column.value", "Value:" }, { "system-properties-panel.popup-menu.copy", "Copy" }, { "system-properties-panel.popup-menu.copy.accelerator", KeyStroke.getKeyStroke(67, 2) } };
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.resources.AboutResources
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about.resources;

import java.util.ListResourceBundle;
import javax.swing.KeyStroke;

public class AboutResources_de
  extends ListResourceBundle
{
  public Object[][] getContents()
  {
    return CONTENTS;
  }
  
  private static final Object[][] CONTENTS = { { "about-frame.tab.about", "�ber" }, { "about-frame.tab.system", "System" }, { "about-frame.tab.contributors", "Entwickler" }, { "about-frame.tab.licence", "Lizenz" }, { "about-frame.tab.libraries", "Bibliotheken" }, { "contributors-table.column.name", "Name:" }, { "contributors-table.column.contact", "Kontakt:" }, { "libraries-table.column.name", "Name:" }, { "libraries-table.column.version", "Version:" }, { "libraries-table.column.licence", "Lizenz:" }, { "libraries-table.column.info", "Zus. Information:" }, { "system-frame.title", "Systemeigenschaften" }, { "system-frame.button.close", "Schlie�en" }, { "system-frame.button.close.mnemonic", new Character('C') }, { "system-frame.menu.file", "Datei" }, { "system-frame.menu.file.mnemonic", new Character('D') }, { "system-frame.menu.file.close", "Beenden" }, { "system-frame.menu.file.close.mnemonic", new Character('B') }, { "system-frame.menu.edit", "Bearbeiten" }, { "system-frame.menu.edit.mnemonic", new Character('B') }, { "system-frame.menu.edit.copy", "Kopieren" }, { "system-frame.menu.edit.copy.mnemonic", new Character('K') }, { "system-properties-table.column.name", "Eigenschaft:" }, { "system-properties-table.column.value", "Wert:" }, { "system-properties-panel.popup-menu.copy", "Kopieren" }, { "system-properties-panel.popup-menu.copy.accelerator", KeyStroke.getKeyStroke(67, 2) } };
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.resources.AboutResources_de
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about.resources;

import java.util.ListResourceBundle;
import javax.swing.KeyStroke;

public class AboutResources_es
  extends ListResourceBundle
{
  public Object[][] getContents()
  {
    return CONTENTS;
  }
  
  private static final Object[][] CONTENTS = { { "about-frame.tab.about", "Acerca" }, { "about-frame.tab.system", "Sistema" }, { "about-frame.tab.contributors", "Desarrolladores" }, { "about-frame.tab.licence", "Licencia" }, { "about-frame.tab.libraries", "Bibliotecas" }, { "contributors-table.column.name", "Nombre:" }, { "contributors-table.column.contact", "Contacto:" }, { "libraries-table.column.name", "Nombre::" }, { "libraries-table.column.version", "Versi�n:" }, { "libraries-table.column.licence", "Licencia:" }, { "libraries-table.column.info", "Otra Informaci?n:" }, { "system-frame.title", "propiedades del Sistema" }, { "system-frame.button.close", "Cerrar" }, { "system-frame.menu.file", "Archivo" }, { "system-frame.menu.file.mnemonic", new Character('F') }, { "system-frame.menu.file.close", "Cerrar" }, { "system-frame.menu.file.close.mnemonic", new Character('C') }, { "system-frame.menu.edit", "Edici?n" }, { "system-frame.menu.edit.mnemonic", new Character('E') }, { "system-frame.menu.edit.copy", "Copiar" }, { "system-frame.menu.edit.copy.mnemonic", new Character('C') }, { "system-properties-table.column.name", "Nombre de Propiedad:" }, { "system-properties-table.column.value", "Valor:" }, { "system-properties-panel.popup-menu.copy", "Copiar" }, { "system-properties-panel.popup-menu.copy.accelerator", KeyStroke.getKeyStroke(67, 2) } };
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.resources.AboutResources_es
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about.resources;

import java.util.ListResourceBundle;
import javax.swing.KeyStroke;

public class AboutResources_fr
  extends ListResourceBundle
{
  public Object[][] getContents()
  {
    return CONTENTS;
  }
  
  private static final Object[][] CONTENTS = { { "about-frame.tab.about", "A propos de" }, { "about-frame.tab.system", "Syst�me" }, { "about-frame.tab.contributors", "D�veloppeurs" }, { "about-frame.tab.licence", "Licence" }, { "about-frame.tab.libraries", "Biblioth�que" }, { "contributors-table.column.name", "Nom:" }, { "contributors-table.column.contact", "Contact:" }, { "libraries-table.column.name", "Nom:" }, { "libraries-table.column.version", "Version:" }, { "libraries-table.column.licence", "Licence:" }, { "libraries-table.column.info", "Autre Renseignement:" }, { "system-frame.title", "Propri�t�s du Syst�me" }, { "system-frame.button.close", "Fermer" }, { "system-frame.menu.file", "Fichier" }, { "system-frame.menu.file.mnemonic", new Character('F') }, { "system-frame.menu.file.close", "Fermer" }, { "system-frame.menu.file.close.mnemonic", new Character('C') }, { "system-frame.menu.edit", "Edition" }, { "system-frame.menu.edit.mnemonic", new Character('E') }, { "system-frame.menu.edit.copy", "Copier" }, { "system-frame.menu.edit.copy.mnemonic", new Character('C') }, { "system-properties-table.column.name", "Nom de la Propri�t�:" }, { "system-properties-table.column.value", "Valeur:" }, { "system-properties-panel.popup-menu.copy", "Copier" }, { "system-properties-panel.popup-menu.copy.accelerator", KeyStroke.getKeyStroke(67, 2) } };
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.resources.AboutResources_fr
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about.resources;

import java.util.ListResourceBundle;
import javax.swing.KeyStroke;

public class AboutResources_pl
  extends ListResourceBundle
{
  public Object[][] getContents()
  {
    return CONTENTS;
  }
  
  private static final Object[][] CONTENTS = { { "about-frame.tab.about", "Informacja o" }, { "about-frame.tab.system", "System" }, { "about-frame.tab.contributors", "Tw�rcy" }, { "about-frame.tab.licence", "Licencja" }, { "about-frame.tab.libraries", "Biblioteki" }, { "contributors-table.column.name", "Nazwa:" }, { "contributors-table.column.contact", "Kontakt:" }, { "libraries-table.column.name", "Nazwa:" }, { "libraries-table.column.version", "Wersja:" }, { "libraries-table.column.licence", "Licencja:" }, { "libraries-table.column.info", "Inne informacje:" }, { "system-frame.title", "W?a?ciwo?ci systemowe" }, { "system-frame.button.close", "Zamknij" }, { "system-frame.button.close.mnemonic", new Character('Z') }, { "system-frame.menu.file", "Plik" }, { "system-frame.menu.file.mnemonic", new Character('P') }, { "system-frame.menu.file.close", "Zamknij" }, { "system-frame.menu.file.close.mnemonic", new Character('K') }, { "system-frame.menu.edit", "Edycja" }, { "system-frame.menu.edit.mnemonic", new Character('E') }, { "system-frame.menu.edit.copy", "Kopiuj" }, { "system-frame.menu.edit.copy.mnemonic", new Character('C') }, { "system-properties-table.column.name", "Nazwa w?a?ciwo?ci:" }, { "system-properties-table.column.value", "Warto??:" }, { "system-properties-panel.popup-menu.copy", "Kopiuj" }, { "system-properties-panel.popup-menu.copy.accelerator", KeyStroke.getKeyStroke(67, 2) } };
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.resources.AboutResources_pl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about;

import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import org.jfree.ui.SortableTable;

public class SystemProperties
{
  public static SortableTable createSystemPropertiesTable()
  {
    SystemPropertiesTableModel properties = new SystemPropertiesTableModel();
    SortableTable table = new SortableTable(properties);
    
    TableColumnModel model = table.getColumnModel();
    TableColumn column = model.getColumn(0);
    column.setPreferredWidth(200);
    column = model.getColumn(1);
    column.setPreferredWidth(350);
    
    table.setAutoResizeMode(2);
    return table;
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.SystemProperties
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ResourceBundle;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;

public class SystemPropertiesFrame
  extends JFrame
  implements ActionListener
{
  private static final String COPY_COMMAND = "COPY";
  private static final String CLOSE_COMMAND = "CLOSE";
  private SystemPropertiesPanel panel;
  
  public SystemPropertiesFrame(boolean menu)
  {
    String baseName = "org.jfree.ui.about.resources.AboutResources";
    ResourceBundle resources = ResourceBundle.getBundle("org.jfree.ui.about.resources.AboutResources");
    
    String title = resources.getString("system-frame.title");
    setTitle(title);
    
    setDefaultCloseOperation(2);
    if (menu) {
      setJMenuBar(createMenuBar(resources));
    }
    JPanel content = new JPanel(new BorderLayout());
    panel = new SystemPropertiesPanel();
    panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    
    content.add(panel, "Center");
    
    JPanel buttonPanel = new JPanel(new BorderLayout());
    buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
    
    String label = resources.getString("system-frame.button.close");
    Character mnemonic = (Character)resources.getObject("system-frame.button.close.mnemonic");
    JButton closeButton = new JButton(label);
    closeButton.setMnemonic(mnemonic.charValue());
    
    closeButton.setActionCommand("CLOSE");
    closeButton.addActionListener(this);
    
    buttonPanel.add(closeButton, "East");
    content.add(buttonPanel, "South");
    
    setContentPane(content);
  }
  
  public void actionPerformed(ActionEvent e)
  {
    String command = e.getActionCommand();
    if (command.equals("CLOSE")) {
      dispose();
    } else if (command.equals("COPY")) {
      panel.copySystemPropertiesToClipboard();
    }
  }
  
  private JMenuBar createMenuBar(ResourceBundle resources)
  {
    JMenuBar menuBar = new JMenuBar();
    
    String label = resources.getString("system-frame.menu.file");
    Character mnemonic = (Character)resources.getObject("system-frame.menu.file.mnemonic");
    JMenu fileMenu = new JMenu(label, true);
    fileMenu.setMnemonic(mnemonic.charValue());
    
    label = resources.getString("system-frame.menu.file.close");
    mnemonic = (Character)resources.getObject("system-frame.menu.file.close.mnemonic");
    JMenuItem closeItem = new JMenuItem(label, mnemonic.charValue());
    closeItem.setActionCommand("CLOSE");
    
    closeItem.addActionListener(this);
    fileMenu.add(closeItem);
    
    label = resources.getString("system-frame.menu.edit");
    mnemonic = (Character)resources.getObject("system-frame.menu.edit.mnemonic");
    JMenu editMenu = new JMenu(label);
    editMenu.setMnemonic(mnemonic.charValue());
    
    label = resources.getString("system-frame.menu.edit.copy");
    mnemonic = (Character)resources.getObject("system-frame.menu.edit.copy.mnemonic");
    JMenuItem copyItem = new JMenuItem(label, mnemonic.charValue());
    copyItem.setActionCommand("COPY");
    copyItem.addActionListener(this);
    editMenu.add(copyItem);
    
    menuBar.add(fileMenu);
    menuBar.add(editMenu);
    return menuBar;
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.SystemPropertiesFrame
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about;

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

class SystemPropertiesPanel$1
  implements ActionListener
{
  private final SystemPropertiesPanel this$0;
  
  SystemPropertiesPanel$1(SystemPropertiesPanel this$0)
  {
    this.this$0 = this$0;
  }
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.copySystemPropertiesToClipboard();
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.SystemPropertiesPanel.1
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JPopupMenu;

class SystemPropertiesPanel$PopupListener
  extends MouseAdapter
{
  private final SystemPropertiesPanel this$0;
  
  public SystemPropertiesPanel$PopupListener(SystemPropertiesPanel this$0)
  {
    this.this$0 = this$0;
  }
  
  public void mousePressed(MouseEvent e)
  {
    maybeShowPopup(e);
  }
  
  public void mouseReleased(MouseEvent e)
  {
    maybeShowPopup(e);
  }
  
  private void maybeShowPopup(MouseEvent e)
  {
    if (e.isPopupTrigger()) {
      this$0.getCopyPopupMenu().show(this$0.getTable(), e.getX(), e.getY());
    }
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.SystemPropertiesPanel.PopupListener
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about;

import java.awt.BorderLayout;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ResourceBundle;
import javax.accessibility.AccessibleContext;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.KeyStroke;
import javax.swing.ListSelectionModel;

public class SystemPropertiesPanel
  extends JPanel
{
  private JTable table;
  private JPopupMenu copyPopupMenu;
  private JMenuItem copyMenuItem;
  private PopupListener copyPopupListener;
  
  public SystemPropertiesPanel()
  {
    String baseName = "org.jfree.ui.about.resources.AboutResources";
    ResourceBundle resources = ResourceBundle.getBundle("org.jfree.ui.about.resources.AboutResources");
    
    setLayout(new BorderLayout());
    table = SystemProperties.createSystemPropertiesTable();
    add(new JScrollPane(table));
    
    copyPopupMenu = new JPopupMenu();
    
    String label = resources.getString("system-properties-panel.popup-menu.copy");
    KeyStroke accelerator = (KeyStroke)resources.getObject("system-properties-panel.popup-menu.copy.accelerator");
    
    copyMenuItem = new JMenuItem(label);
    copyMenuItem.setAccelerator(accelerator);
    copyMenuItem.getAccessibleContext().setAccessibleDescription(label);
    copyMenuItem.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent e)
      {
        copySystemPropertiesToClipboard();
      }
    });
    copyPopupMenu.add(copyMenuItem);
    
    copyPopupListener = new PopupListener();
    table.addMouseListener(copyPopupListener);
  }
  
  public void copySystemPropertiesToClipboard()
  {
    StringBuffer buffer = new StringBuffer();
    ListSelectionModel selection = table.getSelectionModel();
    int firstRow = selection.getMinSelectionIndex();
    int lastRow = selection.getMaxSelectionIndex();
    if ((firstRow != -1) && (lastRow != -1)) {
      for (int r = firstRow; r <= lastRow; r++)
      {
        for (int c = 0; c < table.getColumnCount(); c++)
        {
          buffer.append(table.getValueAt(r, c));
          if (c != 2) {
            buffer.append("\t");
          }
        }
        buffer.append("\n");
      }
    }
    StringSelection ss = new StringSelection(buffer.toString());
    Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();
    cb.setContents(ss, ss);
  }
  
  protected final JPopupMenu getCopyPopupMenu()
  {
    return copyPopupMenu;
  }
  
  protected final JTable getTable()
  {
    return table;
  }
  
  private class PopupListener
    extends MouseAdapter
  {
    public PopupListener() {}
    
    public void mousePressed(MouseEvent e)
    {
      maybeShowPopup(e);
    }
    
    public void mouseReleased(MouseEvent e)
    {
      maybeShowPopup(e);
    }
    
    private void maybeShowPopup(MouseEvent e)
    {
      if (e.isPopupTrigger()) {
        getCopyPopupMenu().show(getTable(), e.getX(), e.getY());
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.SystemPropertiesPanel
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about;

public class SystemPropertiesTableModel$SystemProperty
{
  private String name;
  private String value;
  
  public SystemPropertiesTableModel$SystemProperty(String name, String value)
  {
    this.name = name;
    this.value = value;
  }
  
  public String getName()
  {
    return name;
  }
  
  public String getValue()
  {
    return value;
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.SystemPropertiesTableModel.SystemProperty
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about;

import java.util.Comparator;

public class SystemPropertiesTableModel$SystemPropertyComparator
  implements Comparator
{
  private boolean ascending;
  
  public SystemPropertiesTableModel$SystemPropertyComparator(boolean ascending)
  {
    this.ascending = ascending;
  }
  
  public int compare(Object o1, Object o2)
  {
    if (((o1 instanceof SystemPropertiesTableModel.SystemProperty)) && ((o2 instanceof SystemPropertiesTableModel.SystemProperty)))
    {
      SystemPropertiesTableModel.SystemProperty sp1 = (SystemPropertiesTableModel.SystemProperty)o1;
      SystemPropertiesTableModel.SystemProperty sp2 = (SystemPropertiesTableModel.SystemProperty)o2;
      if (ascending) {
        return sp1.getName().compareTo(sp2.getName());
      }
      return sp2.getName().compareTo(sp1.getName());
    }
    return 0;
  }
  
  public boolean equals(Object o)
  {
    if (this == o) {
      return true;
    }
    if (!(o instanceof SystemPropertyComparator)) {
      return false;
    }
    SystemPropertyComparator systemPropertyComparator = (SystemPropertyComparator)o;
    if (ascending != ascending) {
      return false;
    }
    return true;
  }
  
  public int hashCode()
  {
    return ascending ? 1 : 0;
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.SystemPropertiesTableModel.SystemPropertyComparator
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.about;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.ResourceBundle;
import java.util.Set;
import org.jfree.ui.SortableTableModel;

public class SystemPropertiesTableModel
  extends SortableTableModel
{
  private List properties;
  private String nameColumnLabel;
  private String valueColumnLabel;
  
  protected static class SystemProperty
  {
    private String name;
    private String value;
    
    public SystemProperty(String name, String value)
    {
      this.name = name;
      this.value = value;
    }
    
    public String getName()
    {
      return name;
    }
    
    public String getValue()
    {
      return value;
    }
  }
  
  protected static class SystemPropertyComparator
    implements Comparator
  {
    private boolean ascending;
    
    public SystemPropertyComparator(boolean ascending)
    {
      this.ascending = ascending;
    }
    
    public int compare(Object o1, Object o2)
    {
      if (((o1 instanceof SystemPropertiesTableModel.SystemProperty)) && ((o2 instanceof SystemPropertiesTableModel.SystemProperty)))
      {
        SystemPropertiesTableModel.SystemProperty sp1 = (SystemPropertiesTableModel.SystemProperty)o1;
        SystemPropertiesTableModel.SystemProperty sp2 = (SystemPropertiesTableModel.SystemProperty)o2;
        if (ascending) {
          return sp1.getName().compareTo(sp2.getName());
        }
        return sp2.getName().compareTo(sp1.getName());
      }
      return 0;
    }
    
    public boolean equals(Object o)
    {
      if (this == o) {
        return true;
      }
      if (!(o instanceof SystemPropertyComparator)) {
        return false;
      }
      SystemPropertyComparator systemPropertyComparator = (SystemPropertyComparator)o;
      if (ascending != ascending) {
        return false;
      }
      return true;
    }
    
    public int hashCode()
    {
      return ascending ? 1 : 0;
    }
  }
  
  public SystemPropertiesTableModel()
  {
    properties = new ArrayList();
    try
    {
      Properties p = System.getProperties();
      Iterator iterator = p.keySet().iterator();
      while (iterator.hasNext())
      {
        String name = (String)iterator.next();
        String value = System.getProperty(name);
        SystemProperty sp = new SystemProperty(name, value);
        properties.add(sp);
      }
    }
    catch (SecurityException se) {}
    Collections.sort(properties, new SystemPropertyComparator(true));
    
    String baseName = "org.jfree.ui.about.resources.AboutResources";
    ResourceBundle resources = ResourceBundle.getBundle("org.jfree.ui.about.resources.AboutResources");
    
    nameColumnLabel = resources.getString("system-properties-table.column.name");
    valueColumnLabel = resources.getString("system-properties-table.column.value");
  }
  
  public boolean isSortable(int column)
  {
    if (column == 0) {
      return true;
    }
    return false;
  }
  
  public int getRowCount()
  {
    return properties.size();
  }
  
  public int getColumnCount()
  {
    return 2;
  }
  
  public String getColumnName(int column)
  {
    if (column == 0) {
      return nameColumnLabel;
    }
    return valueColumnLabel;
  }
  
  public Object getValueAt(int row, int column)
  {
    SystemProperty sp = (SystemProperty)properties.get(row);
    if (column == 0) {
      return sp.getName();
    }
    if (column == 1) {
      return sp.getValue();
    }
    return null;
  }
  
  public void sortByColumn(int column, boolean ascending)
  {
    if (isSortable(column))
    {
      super.sortByColumn(column, ascending);
      Collections.sort(properties, new SystemPropertyComparator(ascending));
    }
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.about.SystemPropertiesTableModel
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.action;

import javax.swing.AbstractAction;

public abstract class AbstractActionDowngrade
  extends AbstractAction
  implements ActionDowngrade
{
  public static final String ACCELERATOR_KEY = "AcceleratorKey";
  public static final String MNEMONIC_KEY = "MnemonicKey";
}

/* Location:
 * Qualified Name:     org.jfree.ui.action.AbstractActionDowngrade
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.action;

import java.awt.Component;
import java.io.File;
import javax.swing.JFileChooser;
import org.jfree.ui.ExtensionFileFilter;
import org.jfree.util.StringUtils;

public abstract class AbstractFileSelectionAction
  extends AbstractActionDowngrade
{
  private JFileChooser fileChooser;
  private Component parent;
  
  public AbstractFileSelectionAction(Component parent)
  {
    this.parent = parent;
  }
  
  protected abstract String getFileExtension();
  
  protected abstract String getFileDescription();
  
  protected File getCurrentDirectory()
  {
    return new File(".");
  }
  
  protected File performSelectFile(File selectedFile, int dialogType, boolean appendExtension)
  {
    if (fileChooser == null) {
      fileChooser = createFileChooser();
    }
    fileChooser.setSelectedFile(selectedFile);
    fileChooser.setDialogType(dialogType);
    int option = fileChooser.showDialog(parent, null);
    if (option == 0)
    {
      File selFile = fileChooser.getSelectedFile();
      String selFileName = selFile.getAbsolutePath();
      if (!StringUtils.endsWithIgnoreCase(selFileName, getFileExtension())) {
        selFileName = selFileName + getFileExtension();
      }
      return new File(selFileName);
    }
    return null;
  }
  
  protected JFileChooser createFileChooser()
  {
    JFileChooser fc = new JFileChooser();
    fc.addChoosableFileFilter(new ExtensionFileFilter(getFileDescription(), getFileExtension()));
    
    fc.setMultiSelectionEnabled(false);
    fc.setCurrentDirectory(getCurrentDirectory());
    return fc;
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.action.AbstractFileSelectionAction
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.action;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import org.jfree.util.Log;

class ActionButton$ActionEnablePropertyChangeHandler
  implements PropertyChangeListener
{
  private final ActionButton this$0;
  
  public ActionButton$ActionEnablePropertyChangeHandler(ActionButton this$0)
  {
    this.this$0 = this$0;
  }
  
  public void propertyChange(PropertyChangeEvent event)
  {
    try
    {
      if (event.getPropertyName().equals("enabled")) {
        this$0.setEnabled(this$0.getAction().isEnabled());
      } else if (event.getPropertyName().equals("SmallIcon")) {
        this$0.setIcon((Icon)this$0.getAction().getValue("SmallIcon"));
      } else if (event.getPropertyName().equals("Name")) {
        this$0.setText((String)this$0.getAction().getValue("Name"));
      } else if (event.getPropertyName().equals("ShortDescription")) {
        this$0.setToolTipText((String)this$0.getAction().getValue("ShortDescription"));
      }
      Action ac = this$0.getAction();
      if (event.getPropertyName().equals("AcceleratorKey"))
      {
        KeyStroke oldVal = (KeyStroke)event.getOldValue();
        if (oldVal != null) {
          this$0.unregisterKeyboardAction(oldVal);
        }
        Object o = ac.getValue("AcceleratorKey");
        if ((o instanceof KeyStroke))
        {
          KeyStroke k = (KeyStroke)o;
          this$0.registerKeyboardAction(ac, k, 2);
        }
      }
      else if (event.getPropertyName().equals("MnemonicKey"))
      {
        Object o = ac.getValue("MnemonicKey");
        if (o != null) {
          if ((o instanceof Character))
          {
            Character c = (Character)o;
            this$0.setMnemonic(c.charValue());
          }
          else if ((o instanceof Integer))
          {
            Integer c = (Integer)o;
            this$0.setMnemonic(c.intValue());
          }
        }
      }
    }
    catch (Exception e)
    {
      Log.warn("Error on PropertyChange in ActionButton: ", e);
    }
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.action.ActionButton.ActionEnablePropertyChangeHandler
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.action;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.KeyStroke;
import org.jfree.util.Log;

public class ActionButton
  extends JButton
{
  private Action action;
  private ActionEnablePropertyChangeHandler propertyChangeHandler;
  public ActionButton() {}
  
  private class ActionEnablePropertyChangeHandler
    implements PropertyChangeListener
  {
    public ActionEnablePropertyChangeHandler() {}
    
    public void propertyChange(PropertyChangeEvent event)
    {
      try
      {
        if (event.getPropertyName().equals("enabled")) {
          setEnabled(getAction().isEnabled());
        } else if (event.getPropertyName().equals("SmallIcon")) {
          setIcon((Icon)getAction().getValue("SmallIcon"));
        } else if (event.getPropertyName().equals("Name")) {
          setText((String)getAction().getValue("Name"));
        } else if (event.getPropertyName().equals("ShortDescription")) {
          setToolTipText((String)getAction().getValue("ShortDescription"));
        }
        Action ac = getAction();
        if (event.getPropertyName().equals("AcceleratorKey"))
        {
          KeyStroke oldVal = (KeyStroke)event.getOldValue();
          if (oldVal != null) {
            unregisterKeyboardAction(oldVal);
          }
          Object o = ac.getValue("AcceleratorKey");
          if ((o instanceof KeyStroke))
          {
            KeyStroke k = (KeyStroke)o;
            registerKeyboardAction(ac, k, 2);
          }
        }
        else if (event.getPropertyName().equals("MnemonicKey"))
        {
          Object o = ac.getValue("MnemonicKey");
          if (o != null) {
            if ((o instanceof Character))
            {
              Character c = (Character)o;
              setMnemonic(c.charValue());
            }
            else if ((o instanceof Integer))
            {
              Integer c = (Integer)o;
              setMnemonic(c.intValue());
            }
          }
        }
      }
      catch (Exception e)
      {
        Log.warn("Error on PropertyChange in ActionButton: ", e);
      }
    }
  }
  
  public ActionButton(String text)
  {
    super(text);
  }
  
  public ActionButton(String text, Icon icon)
  {
    super(text, icon);
  }
  
  public ActionButton(Icon icon)
  {
    super(icon);
  }
  
  public ActionButton(Action action)
  {
    setAction(action);
  }
  
  public Action getAction()
  {
    return action;
  }
  
  private ActionEnablePropertyChangeHandler getPropertyChangeHandler()
  {
    if (propertyChangeHandler == null) {
      propertyChangeHandler = new ActionEnablePropertyChangeHandler();
    }
    return propertyChangeHandler;
  }
  
  public void setEnabled(boolean b)
  {
    super.setEnabled(b);
    if (getAction() != null) {
      getAction().setEnabled(b);
    }
  }
  
  public void setAction(Action newAction)
  {
    Action oldAction = getAction();
    if (oldAction != null)
    {
      removeActionListener(oldAction);
      oldAction.removePropertyChangeListener(getPropertyChangeHandler());
      
      Object o = oldAction.getValue("AcceleratorKey");
      if ((o instanceof KeyStroke))
      {
        KeyStroke k = (KeyStroke)o;
        unregisterKeyboardAction(k);
      }
    }
    action = newAction;
    if (action != null)
    {
      addActionListener(newAction);
      newAction.addPropertyChangeListener(getPropertyChangeHandler());
      
      setText((String)newAction.getValue("Name"));
      setToolTipText((String)newAction.getValue("ShortDescription"));
      setIcon((Icon)newAction.getValue("SmallIcon"));
      setEnabled(action.isEnabled());
      
      Object o = newAction.getValue("MnemonicKey");
      if (o != null) {
        if ((o instanceof Character))
        {
          Character c = (Character)o;
          setMnemonic(c.charValue());
        }
        else if ((o instanceof Integer))
        {
          Integer c = (Integer)o;
          setMnemonic(c.intValue());
        }
      }
      o = newAction.getValue("AcceleratorKey");
      if ((o instanceof KeyStroke))
      {
        KeyStroke k = (KeyStroke)o;
        registerKeyboardAction(newAction, k, 2);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.action.ActionButton
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.action;

import java.util.ArrayList;
import javax.swing.Action;

public class ActionConcentrator
{
  private final ArrayList actions;
  
  public ActionConcentrator()
  {
    actions = new ArrayList();
  }
  
  public void addAction(Action a)
  {
    if (a == null) {
      throw new NullPointerException();
    }
    actions.add(a);
  }
  
  public void removeAction(Action a)
  {
    if (a == null) {
      throw new NullPointerException();
    }
    actions.remove(a);
  }
  
  public void setEnabled(boolean b)
  {
    for (int i = 0; i < actions.size(); i++)
    {
      Action a = (Action)actions.get(i);
      a.setEnabled(b);
    }
  }
  
  public boolean isEnabled()
  {
    for (int i = 0; i < actions.size(); i++)
    {
      Action a = (Action)actions.get(i);
      if (a.isEnabled()) {
        return true;
      }
    }
    return false;
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.action.ActionConcentrator
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.action;

import javax.swing.Action;

public abstract interface ActionDowngrade
  extends Action
{
  public static final String ACCELERATOR_KEY = "AcceleratorKey";
  public static final String MNEMONIC_KEY = "MnemonicKey";
}

/* Location:
 * Qualified Name:     org.jfree.ui.action.ActionDowngrade
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.action;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.KeyStroke;
import org.jfree.util.Log;

class ActionMenuItem$ActionEnablePropertyChangeHandler
  implements PropertyChangeListener
{
  private final ActionMenuItem this$0;
  
  public ActionMenuItem$ActionEnablePropertyChangeHandler(ActionMenuItem this$0)
  {
    this.this$0 = this$0;
  }
  
  public void propertyChange(PropertyChangeEvent event)
  {
    try
    {
      if (event.getPropertyName().equals("enabled")) {
        this$0.setEnabled(this$0.getAction().isEnabled());
      } else if (event.getPropertyName().equals("SmallIcon")) {
        this$0.setIcon((Icon)this$0.getAction().getValue("SmallIcon"));
      } else if (event.getPropertyName().equals("Name")) {
        this$0.setText((String)this$0.getAction().getValue("Name"));
      } else if (event.getPropertyName().equals("ShortDescription")) {
        this$0.setToolTipText((String)this$0.getAction().getValue("ShortDescription"));
      }
      Action ac = this$0.getAction();
      if (event.getPropertyName().equals("AcceleratorKey"))
      {
        this$0.setAccelerator((KeyStroke)ac.getValue("AcceleratorKey"));
      }
      else if (event.getPropertyName().equals("MnemonicKey"))
      {
        Object o = ac.getValue("MnemonicKey");
        if (o != null)
        {
          if ((o instanceof Character))
          {
            Character c = (Character)o;
            this$0.setMnemonic(c.charValue());
          }
          else if ((o instanceof Integer))
          {
            Integer c = (Integer)o;
            this$0.setMnemonic(c.intValue());
          }
        }
        else {
          this$0.setMnemonic(0);
        }
      }
    }
    catch (Exception e)
    {
      Log.warn("Error on PropertyChange in ActionButton: ", e);
    }
  }
}

/* Location:
 * Qualified Name:     org.jfree.ui.action.ActionMenuItem.ActionEnablePropertyChangeHandler
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.jfree.ui.action;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JMenuItem;
import javax.swing.KeyStroke;
import org.jfree.util.Log;

public class ActionMenuItem
  extends JMenuItem
{
  private Action action;
  private ActionEnablePropertyChangeHandler propertyChangeHandler;
  public ActionMenuItem() {}
  
  private class ActionEnablePropertyChangeHandler
    implements PropertyChangeListener
  {
    public ActionEnablePropertyChangeHandler() {}
    
    public void propertyChange(PropertyChangeEvent event)
    {
      try
      {
        if (event.getPropertyName().equals("enabled")) {
          setEnabled(getAction().isEnabled());
        } else if (event.getPropertyName().equals("SmallIcon")) {
          setIcon((Icon)getAction().getValue("SmallIcon"));
        } else if (event.getPropertyName().equals("Name")) {
          setText((String)getAction().getValue("Name"));
        } else if (event.getPropertyName().equals("ShortDescription")) {
          setToolTipText((String)getAction().getValue("ShortDescription"));
        }
        Action ac = getAction();
        if (event.getPropertyName().equals("AcceleratorKey"))
        {
          setAccelerator((KeyStroke)ac.getValue("AcceleratorKey"));
        }
        else if (event.getPropertyName().equals("MnemonicKey"))
        {
          Object o = ac.getValue("MnemonicKey");
          if (o != null)
          {
            if ((o instanceof Character))
            {
              Character c = (Character)o;
              setMnemonic(c.charValue());
            }
            else if ((o instanceof Integer))
            {
              Integer c = (Integer)o;
              setMnemonic(c.int
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

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