jcommon-1.0.12

el);
    
    JPanel sizePanel = new JPanel(new BorderLayout());
    sizePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), localizationResources.getString("Size")));
    
    sizelist = new JList(SIZES);
    JScrollPane sizepane = new JScrollPane(sizelist);
    sizepane.setBorder(BorderFactory.createEtchedBorder());
    sizePanel.add(sizepane);
    
    JPanel attributes = new JPanel(new GridLayout(1, 2));
    bold = new JCheckBox(localizationResources.getString("Bold"));
    italic = new JCheckBox(localizationResources.getString("Italic"));
    attributes.add(bold);
    attributes.add(italic);
    attributes.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), localizationResources.getString("Attributes")));
    
    right.add(sizePanel, "Center");
    right.add(attributes, "South");
    
    add(right, "East");
    
    setSelectedFont(font);
  }
  
  public Font getSelectedFont()
  {
    return new Font(getSelectedName(), getSelectedStyle(), getSelectedSize());
  }
  
  public String getSelectedName()
  {
    return (String)fontlist.getSelectedValue();
  }
  
  public int getSelectedStyle()
  {
    if ((bold.isSelected()) && (italic.isSelected())) {
      return 3;
    }
    if (bold.isSelected()) {
      return 1;
    }
    if (italic.isSelected()) {
      return 2;
    }
    return 0;
  }
  
  public int getSelectedSize()
  {
    String selected = (String)sizelist.getSelectedValue();
    if (selected != null) {
      return Integer.parseInt(selected);
    }
    return 10;
  }
  
  public void setSelectedFont(Font font)
  {
    if (font == null) {
      throw new NullPointerException();
    }
    bold.setSelected(font.isBold());
    italic.setSelected(font.isItalic());
    
    String fontName = font.getName();
    ListModel model = fontlist.getModel();
    fontlist.clearSelection();
    for (int i = 0; i < model.getSize(); i++) {
      if (fontName.equals(model.getElementAt(i)))
      {
        fontlist.setSelectedIndex(i);
        break;
      }
    }
    String fontSize = String.valueOf(font.getSize());
    model = sizelist.getModel();
    sizelist.clearSelection();
    for (int i = 0; i < model.getSize(); i++) {
      if (fontSize.equals(model.getElementAt(i)))
      {
        sizelist.setSelectedIndex(i);
        break;
      }
    }
  }
}

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

import java.awt.Font;
import java.util.ResourceBundle;
import javax.swing.JTextField;

public class FontDisplayField
  extends JTextField
{
  private Font displayFont;
  protected static final ResourceBundle localizationResources = ResourceBundle.getBundle("org.jfree.ui.LocalizationBundle");
  
  public FontDisplayField(Font font)
  {
    super("");
    setDisplayFont(font);
    setEnabled(false);
  }
  
  public Font getDisplayFont()
  {
    return displayFont;
  }
  
  public void setDisplayFont(Font font)
  {
    displayFont = font;
    setText(fontToString(displayFont));
  }
  
  private String fontToString(Font font)
  {
    if (font != null) {
      return font.getFontName() + ", " + font.getSize();
    }
    return localizationResources.getString("No_Font_Selected");
  }
}

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

import java.awt.GradientPaint;
import java.awt.Shape;

public abstract interface GradientPaintTransformer
{
  public abstract GradientPaint transform(GradientPaint paramGradientPaint, Shape paramShape);
}

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

import java.io.ObjectStreamException;
import java.io.Serializable;

public final class GradientPaintTransformType
  implements Serializable
{
  private static final long serialVersionUID = 8331561784933982450L;
  public static final GradientPaintTransformType VERTICAL = new GradientPaintTransformType("GradientPaintTransformType.VERTICAL");
  public static final GradientPaintTransformType HORIZONTAL = new GradientPaintTransformType("GradientPaintTransformType.HORIZONTAL");
  public static final GradientPaintTransformType CENTER_VERTICAL = new GradientPaintTransformType("GradientPaintTransformType.CENTER_VERTICAL");
  public static final GradientPaintTransformType CENTER_HORIZONTAL = new GradientPaintTransformType("GradientPaintTransformType.CENTER_HORIZONTAL");
  private String name;
  
  private GradientPaintTransformType(String name)
  {
    this.name = name;
  }
  
  public String toString()
  {
    return name;
  }
  
  public boolean equals(Object o)
  {
    if (this == o) {
      return true;
    }
    if (!(o instanceof GradientPaintTransformType)) {
      return false;
    }
    GradientPaintTransformType t = (GradientPaintTransformType)o;
    if (!name.equals(name)) {
      return false;
    }
    return true;
  }
  
  public int hashCode()
  {
    return name.hashCode();
  }
  
  private Object readResolve()
    throws ObjectStreamException
  {
    GradientPaintTransformType result = null;
    if (equals(HORIZONTAL)) {
      result = HORIZONTAL;
    } else if (equals(VERTICAL)) {
      result = VERTICAL;
    } else if (equals(CENTER_HORIZONTAL)) {
      result = CENTER_HORIZONTAL;
    } else if (equals(CENTER_VERTICAL)) {
      result = CENTER_VERTICAL;
    }
    return result;
  }
}

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

import java.io.ObjectStreamException;
import java.io.Serializable;

public final class HorizontalAlignment
  implements Serializable
{
  private static final long serialVersionUID = -8249740987565309567L;
  public static final HorizontalAlignment LEFT = new HorizontalAlignment("HorizontalAlignment.LEFT");
  public static final HorizontalAlignment RIGHT = new HorizontalAlignment("HorizontalAlignment.RIGHT");
  public static final HorizontalAlignment CENTER = new HorizontalAlignment("HorizontalAlignment.CENTER");
  private String name;
  
  private HorizontalAlignment(String name)
  {
    this.name = name;
  }
  
  public String toString()
  {
    return name;
  }
  
  public boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (!(obj instanceof HorizontalAlignment)) {
      return false;
    }
    HorizontalAlignment that = (HorizontalAlignment)obj;
    if (!name.equals(name)) {
      return false;
    }
    return true;
  }
  
  public int hashCode()
  {
    return name.hashCode();
  }
  
  private Object readResolve()
    throws ObjectStreamException
  {
    HorizontalAlignment result = null;
    if (equals(LEFT)) {
      result = LEFT;
    } else if (equals(RIGHT)) {
      result = RIGHT;
    } else if (equals(CENTER)) {
      result = CENTER;
    }
    return result;
  }
}

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

import java.awt.BorderLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.util.ResourceBundle;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;

public class InsetsChooserPanel
  extends JPanel
{
  private JTextField topValueEditor;
  private JTextField leftValueEditor;
  private JTextField bottomValueEditor;
  private JTextField rightValueEditor;
  protected static ResourceBundle localizationResources = ResourceBundle.getBundle("org.jfree.ui.LocalizationBundle");
  
  public InsetsChooserPanel()
  {
    this(new Insets(0, 0, 0, 0));
  }
  
  public InsetsChooserPanel(Insets current)
  {
    current = current == null ? new Insets(0, 0, 0, 0) : current;
    
    topValueEditor = new JTextField(new IntegerDocument(), "" + top, 0);
    
    leftValueEditor = new JTextField(new IntegerDocument(), "" + left, 0);
    
    bottomValueEditor = new JTextField(new IntegerDocument(), "" + bottom, 0);
    
    rightValueEditor = new JTextField(new IntegerDocument(), "" + right, 0);
    
    JPanel panel = new JPanel(new GridBagLayout());
    panel.setBorder(new TitledBorder(localizationResources.getString("Insets")));
    
    panel.add(new JLabel(localizationResources.getString("Top")), new GridBagConstraints(1, 0, 3, 1, 0.0D, 0.0D, 10, 0, new Insets(0, 0, 0, 0), 0, 0));
    
    panel.add(new JLabel(" "), new GridBagConstraints(1, 1, 1, 1, 0.0D, 0.0D, 10, 1, new Insets(0, 12, 0, 12), 8, 0));
    
    panel.add(topValueEditor, new GridBagConstraints(2, 1, 1, 1, 0.0D, 0.0D, 10, 2, new Insets(0, 0, 0, 0), 0, 0));
    
    panel.add(new JLabel(" "), new GridBagConstraints(3, 1, 1, 1, 0.0D, 0.0D, 10, 1, new Insets(0, 12, 0, 11), 8, 0));
    
    panel.add(new JLabel(localizationResources.getString("Left")), new GridBagConstraints(0, 2, 1, 1, 0.0D, 0.0D, 10, 1, new Insets(0, 4, 0, 4), 0, 0));
    
    panel.add(leftValueEditor, new GridBagConstraints(1, 2, 1, 1, 0.0D, 0.0D, 10, 1, new Insets(0, 0, 0, 0), 0, 0));
    
    panel.add(new JLabel(" "), new GridBagConstraints(2, 2, 1, 1, 0.0D, 0.0D, 10, 0, new Insets(0, 12, 0, 12), 8, 0));
    
    panel.add(rightValueEditor, new GridBagConstraints(3, 2, 1, 1, 0.0D, 0.0D, 10, 2, new Insets(0, 0, 0, 0), 0, 0));
    
    panel.add(new JLabel(localizationResources.getString("Right")), new GridBagConstraints(4, 2, 1, 1, 0.0D, 0.0D, 10, 0, new Insets(0, 4, 0, 4), 0, 0));
    
    panel.add(bottomValueEditor, new GridBagConstraints(2, 3, 1, 1, 0.0D, 0.0D, 10, 2, new Insets(0, 0, 0, 0), 0, 0));
    
    panel.add(new JLabel(localizationResources.getString("Bottom")), new GridBagConstraints(1, 4, 3, 1, 0.0D, 0.0D, 10, 0, new Insets(0, 0, 0, 0), 0, 0));
    
    setLayout(new BorderLayout());
    add(panel, "Center");
  }
  
  public Insets getInsetsValue()
  {
    return new Insets(Math.abs(stringToInt(topValueEditor.getText())), Math.abs(stringToInt(leftValueEditor.getText())), Math.abs(stringToInt(bottomValueEditor.getText())), Math.abs(stringToInt(rightValueEditor.getText())));
  }
  
  protected int stringToInt(String value)
  {
    value = value.trim();
    if (value.length() == 0) {
      return 0;
    }
    try
    {
      return Integer.parseInt(value);
    }
    catch (NumberFormatException e) {}
    return 0;
  }
  
  public void removeNotify()
  {
    super.removeNotify();
    removeAll();
  }
}

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

import java.awt.Insets;
import java.util.ResourceBundle;
import javax.swing.JTextField;

public class InsetsTextField
  extends JTextField
{
  protected static ResourceBundle localizationResources = ResourceBundle.getBundle("org.jfree.ui.LocalizationBundle");
  
  public InsetsTextField(Insets insets)
  {
    setInsets(insets);
    setEnabled(false);
  }
  
  public String formatInsetsString(Insets insets)
  {
    insets = insets == null ? new Insets(0, 0, 0, 0) : insets;
    return localizationResources.getString("T") + top + ", " + localizationResources.getString("L") + left + ", " + localizationResources.getString("B") + bottom + ", " + localizationResources.getString("R") + right;
  }
  
  public void setInsets(Insets insets)
  {
    setText(formatInsetsString(insets));
  }
}

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

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

public class IntegerDocument
  extends PlainDocument
{
  public void insertString(int i, String s, AttributeSet attributes)
    throws BadLocationException
  {
    super.insertString(i, s, attributes);
    if ((s != null) && ((!s.equals("-")) || (i != 0) || (s.length() >= 2))) {
      try
      {
        Integer.parseInt(getText(0, getLength()));
      }
      catch (NumberFormatException e)
      {
        remove(i, s.length());
      }
    }
  }
}

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

import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.text.JTextComponent;

public final class JTextObserver
  implements FocusListener
{
  private static JTextObserver singleton;
  
  public static JTextObserver getInstance()
  {
    if (singleton == null) {
      singleton = new JTextObserver();
    }
    return singleton;
  }
  
  public void focusGained(FocusEvent e)
  {
    if ((e.getSource() instanceof JTextComponent))
    {
      JTextComponent tex = (JTextComponent)e.getSource();
      tex.selectAll();
    }
  }
  
  public void focusLost(FocusEvent e)
  {
    if ((e.getSource() instanceof JTextComponent))
    {
      JTextComponent tex = (JTextComponent)e.getSource();
      tex.select(0, 0);
    }
  }
  
  public static void addTextComponent(JTextComponent t)
  {
    if (singleton == null) {
      singleton = new JTextObserver();
    }
    t.addFocusListener(singleton);
  }
  
  public static void removeTextComponent(JTextComponent t)
  {
    if (singleton == null) {
      singleton = new JTextObserver();
    }
    t.removeFocusListener(singleton);
  }
}

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

class KeyedComboBoxModel$ComboBoxItemPair
{
  private Object key;
  private Object value;
  
  public KeyedComboBoxModel$ComboBoxItemPair(Object key, Object value)
  {
    this.key = key;
    this.value = value;
  }
  
  public Object getKey()
  {
    return key;
  }
  
  public Object getValue()
  {
    return value;
  }
  
  public void setValue(Object value)
  {
    this.value = value;
  }
}

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

import java.util.ArrayList;
import javax.swing.ComboBoxModel;
import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;

public class KeyedComboBoxModel
  implements ComboBoxModel
{
  private int selectedItemIndex;
  private Object selectedItemValue;
  private ArrayList data;
  private ArrayList listdatalistener;
  private transient ListDataListener[] tempListeners;
  private boolean allowOtherValue;
  
  private static class ComboBoxItemPair
  {
    private Object key;
    private Object value;
    
    public ComboBoxItemPair(Object key, Object value)
    {
      this.key = key;
      this.value = value;
    }
    
    public Object getKey()
    {
      return key;
    }
    
    public Object getValue()
    {
      return value;
    }
    
    public void setValue(Object value)
    {
      this.value = value;
    }
  }
  
  public KeyedComboBoxModel()
  {
    data = new ArrayList();
    listdatalistener = new ArrayList();
  }
  
  public KeyedComboBoxModel(Object[] keys, Object[] values)
  {
    this();
    setData(keys, values);
  }
  
  public void setData(Object[] keys, Object[] values)
  {
    if (values.length != keys.length) {
      throw new IllegalArgumentException("Values and text must have the same length.");
    }
    data.clear();
    data.ensureCapacity(keys.length);
    for (int i = 0; i < values.length; i++) {
      add(keys[i], values[i]);
    }
    selectedItemIndex = -1;
    ListDataEvent evt = new ListDataEvent(this, 0, 0, data.size() - 1);
    
    fireListDataEvent(evt);
  }
  
  protected synchronized void fireListDataEvent(ListDataEvent evt)
  {
    if (tempListeners == null) {
      tempListeners = ((ListDataListener[])listdatalistener.toArray(new ListDataListener[listdatalistener.size()]));
    }
    ListDataListener[] listeners = tempListeners;
    for (int i = 0; i < listeners.length; i++)
    {
      ListDataListener l = listeners[i];
      l.contentsChanged(evt);
    }
  }
  
  public Object getSelectedItem()
  {
    return selectedItemValue;
  }
  
  public void setSelectedKey(Object anItem)
  {
    if (anItem == null)
    {
      selectedItemIndex = -1;
      selectedItemValue = null;
    }
    else
    {
      int newSelectedItem = findDataElementIndex(anItem);
      if (newSelectedItem == -1)
      {
        selectedItemIndex = -1;
        selectedItemValue = null;
      }
      else
      {
        selectedItemIndex = newSelectedItem;
        selectedItemValue = getElementAt(selectedItemIndex);
      }
    }
    fireListDataEvent(new ListDataEvent(this, 0, -1, -1));
  }
  
  public void setSelectedItem(Object anItem)
  {
    if (anItem == null)
    {
      selectedItemIndex = -1;
      selectedItemValue = null;
    }
    else
    {
      int newSelectedItem = findElementIndex(anItem);
      if (newSelectedItem == -1)
      {
        if (isAllowOtherValue())
        {
          selectedItemIndex = -1;
          selectedItemValue = anItem;
        }
        else
        {
          selectedItemIndex = -1;
          selectedItemValue = null;
        }
      }
      else
      {
        selectedItemIndex = newSelectedItem;
        selectedItemValue = getElementAt(selectedItemIndex);
      }
    }
    fireListDataEvent(new ListDataEvent(this, 0, -1, -1));
  }
  
  private boolean isAllowOtherValue()
  {
    return allowOtherValue;
  }
  
  public void setAllowOtherValue(boolean allowOtherValue)
  {
    this.allowOtherValue = allowOtherValue;
  }
  
  public synchronized void addListDataListener(ListDataListener l)
  {
    if (l == null) {
      throw new NullPointerException();
    }
    listdatalistener.add(l);
    tempListeners = null;
  }
  
  public Object getElementAt(int index)
  {
    if (index >= data.size()) {
      return null;
    }
    ComboBoxItemPair datacon = (ComboBoxItemPair)data.get(index);
    if (datacon == null) {
      return null;
    }
    return datacon.getValue();
  }
  
  public Object getKeyAt(int index)
  {
    if (index >= data.size()) {
      return null;
    }
    if (index < 0) {
      return null;
    }
    ComboBoxItemPair datacon = (ComboBoxItemPair)data.get(index);
    if (datacon == null) {
      return null;
    }
    return datacon.getKey();
  }
  
  public Object getSelectedKey()
  {
    return getKeyAt(selectedItemIndex);
  }
  
  public int getSize()
  {
    return data.size();
  }
  
  public void removeListDataListener(ListDataListener l)
  {
    listdatalistener.remove(l);
    tempListeners = null;
  }
  
  private int findDataElementIndex(Object anItem)
  {
    if (anItem == null) {
      throw new NullPointerException("Item to find must not be null");
    }
    for (int i = 0; i < data.size(); i++)
    {
      ComboBoxItemPair datacon = (ComboBoxItemPair)data.get(i);
      if (anItem.equals(datacon.getKey())) {
        return i;
      }
    }
    return -1;
  }
  
  public int findElementIndex(Object key)
  {
    if (key == null) {
      throw new NullPointerException("Item to find must not be null");
    }
    for (int i = 0; i < data.size(); i++)
    {
      ComboBoxItemPair datacon = (ComboBoxItemPair)data.get(i);
      if (key.equals(datacon.getValue())) {
        return i;
      }
    }
    return -1;
  }
  
  public void removeDataElement(Object key)
  {
    int idx = findDataElementIndex(key);
    if (idx == -1) {
      return;
    }
    data.remove(idx);
    ListDataEvent evt = new ListDataEvent(this, 2, idx, idx);
    
    fireListDataEvent(evt);
  }
  
  public void add(Object key, Object cbitem)
  {
    ComboBoxItemPair con = new ComboBoxItemPair(key, cbitem);
    data.add(con);
    ListDataEvent evt = new ListDataEvent(this, 1, data.size() - 2, data.size() - 2);
    
    fireListDataEvent(evt);
  }
  
  public void clear()
  {
    int size = getSize();
    data.clear();
    ListDataEvent evt = new ListDataEvent(this, 2, 0, size - 1);
    fireListDataEvent(evt);
  }
}

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

import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JPanel;

public class L1R1ButtonPanel
  extends JPanel
{
  private JButton left;
  private JButton right;
  
  public L1R1ButtonPanel(String leftLabel, String rightLabel)
  {
    setLayout(new BorderLayout());
    left = new JButton(leftLabel);
    right = new JButton(rightLabel);
    add(left, "West");
    add(right, "East");
  }
  
  public JButton getLeftButton()
  {
    return left;
  }
  
  public JButton getRightButton()
  {
    return right;
  }
}

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

import java.awt.BorderLayout;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JPanel;

public class L1R2ButtonPanel
  extends JPanel
{
  private JButton left;
  private JButton right1;
  private JButton right2;
  
  public L1R2ButtonPanel(String label1, String label2, String label3)
  {
    setLayout(new BorderLayout());
    
    left = new JButton(label1);
    
    JPanel rightButtonPanel = new JPanel(new GridLayout(1, 2));
    right1 = new JButton(label2);
    right2 = new JButton(label3);
    rightButtonPanel.add(right1);
    rightButtonPanel.add(right2);
    
    add(left, "West");
    add(rightButtonPanel, "East");
  }
  
  public JButton getLeftButton()
  {
    return left;
  }
  
  public JButton getRightButton1()
  {
    return right1;
  }
  
  public JButton getRightButton2()
  {
    return right2;
  }
}

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

import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JPanel;

public class L1R3ButtonPanel
  extends JPanel
{
  private JButton left;
  private JButton right1;
  private JButton right2;
  private JButton right3;
  
  public L1R3ButtonPanel(String label1, String label2, String label3, String label4)
  {
    setLayout(new BorderLayout());
    
    JPanel panel = new JPanel(new BorderLayout());
    JPanel panel2 = new JPanel(new BorderLayout());
    left = new JButton(label1);
    right1 = new JButton(label2);
    right2 = new JButton(label3);
    right3 = new JButton(label4);
    
    panel.add(left, "West");
    panel2.add(right1, "East");
    panel.add(panel2, "Center");
    panel.add(right2, "East");
    add(panel, "Center");
    add(right3, "East");
  }
  
  public JButton getLeftButton()
  {
    return left;
  }
  
  public JButton getRightButton1()
  {
    return right1;
  }
  
  public JButton getRightButton2()
  {
    return right2;
  }
  
  public JButton getRightButton3()
  {
    return right3;
  }
}

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

import java.io.ObjectStreamException;
import java.io.Serializable;

public final class Layer
  implements Serializable
{
  private static final long serialVersionUID = -1470104570733183430L;
  public static final Layer FOREGROUND = new Layer("Layer.FOREGROUND");
  public static final Layer BACKGROUND = new Layer("Layer.BACKGROUND");
  private String name;
  
  private Layer(String name)
  {
    this.name = name;
  }
  
  public String toString()
  {
    return name;
  }
  
  public boolean equals(Object o)
  {
    if (this == o) {
      return true;
    }
    if (!(o instanceof Layer)) {
      return false;
    }
    Layer layer = (Layer)o;
    if (!name.equals(name)) {
      return false;
    }
    return true;
  }
  
  public int hashCode()
  {
    return name.hashCode();
  }
  
  private Object readResolve()
    throws ObjectStreamException
  {
    Layer result = null;
    if (equals(FOREGROUND)) {
      result = FOREGROUND;
    } else if (equals(BACKGROUND)) {
      result = BACKGROUND;
    }
    return result;
  }
}

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

import java.io.ObjectStreamException;
import java.io.Serializable;

public final class LengthAdjustmentType
  implements Serializable
{
  private static final long serialVersionUID = -6097408511380545010L;
  public static final LengthAdjustmentType NO_CHANGE = new LengthAdjustmentType("NO_CHANGE");
  public static final LengthAdjustmentType EXPAND = new LengthAdjustmentType("EXPAND");
  public static final LengthAdjustmentType CONTRACT = new LengthAdjustmentType("CONTRACT");
  private String name;
  
  private LengthAdjustmentType(String name)
  {
    this.name = name;
  }
  
  public String toString()
  {
    return name;
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof LengthAdjustmentType)) {
      return false;
    }
    LengthAdjustmentType that = (LengthAdjustmentType)obj;
    if (!name.equals(name)) {
      return false;
    }
    return true;
  }
  
  public int hashCode()
  {
    return name.hashCode();
  }
  
  private Object readResolve()
    throws ObjectStreamException
  {
    if (equals(NO_CHANGE)) {
      return NO_CHANGE;
    }
    if (equals(EXPAND)) {
      return EXPAND;
    }
    if (equals(CONTRACT)) {
      return CONTRACT;
    }
    return null;
  }
}

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

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

public class LengthLimitingDocument
  extends PlainDocument
{
  private int maxlen;
  
  public LengthLimitingDocument()
  {
    this(-1);
  }
  
  public LengthLimitingDocument(int maxlen)
  {
    this.maxlen = maxlen;
  }
  
  public void setMaxLength(int maxlen)
  {
    this.maxlen = maxlen;
  }
  
  public int getMaxLength()
  {
    return maxlen;
  }
  
  public void insertString(int offs, String str, AttributeSet a)
    throws BadLocationException
  {
    if (str == null) {
      return;
    }
    if (maxlen < 0) {
      super.insertString(offs, str, a);
    }
    char[] numeric = str.toCharArray();
    StringBuffer b = new StringBuffer();
    b.append(numeric, 0, Math.min(maxlen, numeric.length));
    super.insertString(offs, b.toString(), a);
  }
}

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

import java.awt.Component;
import java.text.NumberFormat;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;

public class NumberCellRenderer
  extends DefaultTableCellRenderer
{
  public NumberCellRenderer()
  {
    setHorizontalAlignment(4);
  }
  
  public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
  {
    setFont(null);
    NumberFormat nf = NumberFormat.getNumberInstance();
    if (value != null) {
      setText(nf.format(value));
    } else {
      setText("");
    }
    if (isSelected) {
      setBackground(table.getSelectionBackground());
    } else {
      setBackground(null);
    }
    return this;
  }
}

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

import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.LayoutManager;
import java.awt.Rectangle;

public final class OverlayLayout
  implements LayoutManager
{
  private boolean ignoreInvisible;
  
  public OverlayLayout(boolean ignoreInvisible)
  {
    this.ignoreInvisible = ignoreInvisible;
  }
  
  public OverlayLayout() {}
  
  public void addLayoutComponent(String name, Component comp) {}
  
  public void removeLayoutComponent(Component comp) {}
  
  public void layoutContainer(Container parent)
  {
    synchronized (parent.getTreeLock())
    {
      Insets ins = parent.getInsets();
      
      Rectangle bounds = parent.getBounds();
      int width = width - left - right;
      int height = height - top - bottom;
      
      Component[] comps = parent.getComponents();
      for (int i = 0; i < comps.length; i++)
      {
        Component c = comps[i];
        if ((comps[i].isVisible()) || (!ignoreInvisible)) {
          c.setBounds(left, top, width, height);
        }
      }
    }
  }
  
  public Dimension minimumLayoutSize(Container parent)
  {
    synchronized (parent.getTreeLock())
    {
      Insets ins = parent.getInsets();
      Component[] comps = parent.getComponents();
      int height = 0;
      int width = 0;
      for (int i = 0; i < comps.length; i++) {
        if ((comps[i].isVisible()) || (!ignoreInvisible))
        {
          Dimension pref = comps[i].getMinimumSize();
          if (height > height) {
            height = height;
          }
          if (width > width) {
            width = width;
          }
        }
      }
      return new Dimension(width + left + right, height + top + bottom);
    }
  }
  
  public Dimension preferredLayoutSize(Container parent)
  {
    synchronized (parent.getTreeLock())
    {
      Insets ins = parent.getInsets();
      Component[] comps = parent.getComponents();
      int height = 0;
      int width = 0;
      for (int i = 0; i < comps.length; i++) {
        if ((comps[i].isVisible()) || (!ignoreInvisible))
        {
          Dimension pref = comps[i].getPreferredSize();
          if (height > height) {
            height = height;
          }
          if (width > width) {
            width = width;
          }
        }
      }
      return new Dimension(width + left + right, height + top + bottom);
    }
  }
}

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

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Paint;
import java.awt.geom.Rectangle2D;
import java.awt.geom.Rectangle2D.Double;
import javax.swing.JComponent;

public class PaintSample
  extends JComponent
{
  private Paint paint;
  private Dimension preferredSize;
  
  public PaintSample(Paint paint)
  {
    this.paint = paint;
    preferredSize = new Dimension(80, 12);
  }
  
  public Paint getPaint()
  {
    return paint;
  }
  
  public void setPaint(Paint paint)
  {
    this.paint = paint;
    repaint();
  }
  
  public Dimension getPreferredSize()
  {
    return preferredSize;
  }
  
  public void paintComponent(Graphics g)
  {
    Graphics2D g2 = (Graphics2D)g;
    Dimension size = getSize();
    Insets insets = getInsets();
    double xx = left;
    double yy = top;
    double ww = size.getWidth() - left - right - 1.0D;
    double hh = size.getHeight() - top - bottom - 1.0D;
    Rectangle2D area = new Rectangle2D.Double(xx, yy, ww, hh);
    g2.setPaint(paint);
    g2.fill(area);
    g2.setPaint(Color.black);
    g2.draw(area);
  }
}

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

import java.awt.geom.Point2D;
import java.awt.geom.Point2D.Double;
import java.awt.geom.Rectangle2D;
import java.awt.geom.Rectangle2D.Double;
import java.io.ObjectStreamException;
import java.io.Serializable;

public final class RectangleAnchor
  implements Serializable
{
  private static final long serialVersionUID = -2457494205644416327L;
  public static final RectangleAnchor CENTER = new RectangleAnchor("RectangleAnchor.CENTER");
  public static final RectangleAnchor TOP = new RectangleAnchor("RectangleAnchor.TOP");
  public static final RectangleAnchor TOP_LEFT = new RectangleAnchor("RectangleAnchor.TOP_LEFT");
  public static final RectangleAnchor TOP_RIGHT = new RectangleAnchor("RectangleAnchor.TOP_RIGHT");
  public static final RectangleAnchor BOTTOM = new RectangleAnchor("RectangleAnchor.BOTTOM");
  public static final RectangleAnchor BOTTOM_LEFT = new RectangleAnchor("RectangleAnchor.BOTTOM_LEFT");
  public static final RectangleAnchor BOTTOM_RIGHT = new RectangleAnchor("RectangleAnchor.BOTTOM_RIGHT");
  public static final RectangleAnchor LEFT = new RectangleAnchor("RectangleAnchor.LEFT");
  public static final RectangleAnchor RIGHT = new RectangleAnchor("RectangleAnchor.RIGHT");
  private String name;
  
  private RectangleAnchor(String name)
  {
    this.name = name;
  }
  
  public String toString()
  {
    return name;
  }
  
  public boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (!(obj instanceof RectangleAnchor)) {
      return false;
    }
    RectangleAnchor order = (RectangleAnchor)obj;
    if (!name.equals(name)) {
      return false;
    }
    return true;
  }
  
  public int hashCode()
  {
    return name.hashCode();
  }
  
  public static Point2D coordinates(Rectangle2D rectangle, RectangleAnchor anchor)
  {
    Point2D result = new Point2D.Double();
    if (anchor == CENTER) {
      result.setLocation(rectangle.getCenterX(), rectangle.getCenterY());
    } else if (anchor == TOP) {
      result.setLocation(rectangle.getCenterX(), rectangle.getMinY());
    } else if (anchor == BOTTOM) {
      result.setLocation(rectangle.getCenterX(), rectangle.getMaxY());
    } else if (anchor == LEFT) {
      result.setLocation(rectangle.getMinX(), rectangle.getCenterY());
    } else if (anchor == RIGHT) {
      result.setLocation(rectangle.getMaxX(), rectangle.getCenterY());
    } else if (anchor == TOP_LEFT) {
      result.setLocation(rectangle.getMinX(), rectangle.getMinY());
    } else if (anchor == TOP_RIGHT) {
      result.setLocation(rectangle.getMaxX(), rectangle.getMinY());
    } else if (anchor == BOTTOM_LEFT) {
      result.setLocation(rectangle.getMinX(), rectangle.getMaxY());
    } else if (anchor == BOTTOM_RIGHT) {
      result.setLocation(rectangle.getMaxX(), rectangle.getMaxY());
    }
    return result;
  }
  
  public static Rectangle2D createRectangle(Size2D dimensions, double anchorX, double anchorY, RectangleAnchor anchor)
  {
    Rectangle2D result = null;
    double w = dimensions.getWidth();
    double h = dimensions.getHeight();
    if (anchor == CENTER) {
      result = new Rectangle2D.Double(anchorX - w / 2.0D, anchorY - h / 2.0D, w, h);
    } else if (anchor == TOP) {
      result = new Rectangle2D.Double(anchorX - w / 2.0D, anchorY - h / 2.0D, w, h);
    } else if (anchor == BOTTOM) {
      result = new Rectangle2D.Double(anchorX - w / 2.0D, anchorY - h / 2.0D, w, h);
    } else if (anchor == LEFT) {
      result = new Rectangle2D.Double(anchorX, anchorY - h / 2.0D, w, h);
    } else if (anchor == RIGHT) {
      result = new Rectangle2D.Double(anchorX - w, anchorY - h / 2.0D, w, h);
    } else if (anchor == TOP_LEFT) {
      result = new Rectangle2D.Double(anchorX - w / 2.0D, anchorY - h / 2.0D, w, h);
    } else if (anchor == TOP_RIGHT) {
      result = new Rectangle2D.Double(anchorX - w / 2.0D, anchorY - h / 2.0D, w, h);
    } else if (anchor == BOTTOM_LEFT) {
      result = new Rectangle2D.Double(anchorX - w / 2.0D, anchorY - h / 2.0D, w, h);
    } else if (anchor == BOTTOM_RIGHT) {
      result = new Rectangle2D.Double(anchorX - w / 2.0D, anchorY - h / 2.0D, w, h);
    }
    return result;
  }
  
  private Object readResolve()
    throws ObjectStreamException
  {
    RectangleAnchor result = null;
    if (equals(CENTER)) {
      result = CENTER;
    } else if (equals(TOP)) {
      result = TOP;
    } else if (equals(BOTTOM)) {
      result = BOTTOM;
    } else if (equals(LEFT)) {
      result = LEFT;
    } else if (equals(RIGHT)) {
      result = RIGHT;
    } else if (equals(TOP_LEFT)) {
      result = TOP_LEFT;
    } else if (equals(TOP_RIGHT)) {
      result = TOP_RIGHT;
    } else if (equals(BOTTOM_LEFT)) {
      result = BOTTOM_LEFT;
    } else if (equals(BOTTOM_RIGHT)) {
      result = BOTTOM_RIGHT;
    }
    return result;
  }
}

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

import java.awt.geom.Rectangle2D;
import java.io.ObjectStreamException;
import java.io.Serializable;

public final class RectangleEdge
  implements Serializable
{
  private static final long serialVersionUID = -7400988293691093548L;
  public static final RectangleEdge TOP = new RectangleEdge("RectangleEdge.TOP");
  public static final RectangleEdge BOTTOM = new RectangleEdge("RectangleEdge.BOTTOM");
  public static final RectangleEdge LEFT = new RectangleEdge("RectangleEdge.LEFT");
  public static final RectangleEdge RIGHT = new RectangleEdge("RectangleEdge.RIGHT");
  private String name;
  
  private RectangleEdge(String name)
  {
    this.name = name;
  }
  
  public String toString()
  {
    return name;
  }
  
  public boolean equals(Object o)
  {
    if (this == o) {
      return true;
    }
    if (!(o instanceof RectangleEdge)) {
      return false;
    }
    RectangleEdge order = (RectangleEdge)o;
    if (!name.equals(name)) {
      return false;
    }
    return true;
  }
  
  public int hashCode()
  {
    return name.hashCode();
  }
  
  public static boolean isTopOrBottom(RectangleEdge edge)
  {
    return (edge == TOP) || (edge == BOTTOM);
  }
  
  public static boolean isLeftOrRight(RectangleEdge edge)
  {
    return (edge == LEFT) || (edge == RIGHT);
  }
  
  public static RectangleEdge opposite(RectangleEdge edge)
  {
    RectangleEdge result = null;
    if (edge == TOP) {
      result = BOTTOM;
    } else if (edge == BOTTOM) {
      result = TOP;
    } else if (edge == LEFT) {
      result = RIGHT;
    } else if (edge == RIGHT) {
      result = LEFT;
    }
    return result;
  }
  
  public static double coordinate(Rectangle2D rectangle, RectangleEdge edge)
  {
    double result = 0.0D;
    if (edge == TOP) {
      result = rectangle.getMinY();
    } else if (edge == BOTTOM) {
      result = rectangle.getMaxY();
    } else if (edge == LEFT) {
      result = rectangle.getMinX();
    } else if (edge == RIGHT) {
      result = rectangle.getMaxX();
    }
    return result;
  }
  
  private Object readResolve()
    throws ObjectStreamException
  {
    RectangleEdge result = null;
    if (equals(TOP)) {
      result = TOP;
    } else if (equals(BOTTOM)) {
      result = BOTTOM;
    } else if (equals(LEFT)) {
      result = LEFT;
    } else if (equals(RIGHT)) {
      result = RIGHT;
    }
    return result;
  }
}

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

import java.awt.geom.Rectangle2D;
import java.awt.geom.Rectangle2D.Double;
import java.io.Serializable;
import org.jfree.util.UnitType;

public class RectangleInsets
  implements Serializable
{
  private static final long serialVersionUID = 1902273207559319996L;
  public static final RectangleInsets ZERO_INSETS = new RectangleInsets(UnitType.ABSOLUTE, 0.0D, 0.0D, 0.0D, 0.0D);
  private UnitType unitType;
  private double top;
  private double left;
  private double bottom;
  private double right;
  
  public RectangleInsets()
  {
    this(1.0D, 1.0D, 1.0D, 1.0D);
  }
  
  public RectangleInsets(double top, double left, double bottom, double right)
  {
    this(UnitType.ABSOLUTE, top, left, bottom, right);
  }
  
  public RectangleInsets(UnitType unitType, double top, double left, double bottom, double right)
  {
    if (
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-2019. Infinite Loop Ltd