From: <mu...@us...> - 2007-06-21 14:05:36
|
Revision: 57 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=57&view=rev Author: mungady Date: 2007-06-21 07:05:32 -0700 (Thu, 21 Jun 2007) Log Message: ----------- New classes from JCommon. Added Paths: ----------- trunk/source/org/jfree/chart/ui/FontChooserPanel.java trunk/source/org/jfree/chart/ui/FontDisplayField.java trunk/source/org/jfree/chart/ui/LCBLayout.java trunk/source/org/jfree/chart/ui/PaintSample.java trunk/source/org/jfree/chart/ui/StrokeChooserPanel.java trunk/source/org/jfree/chart/ui/StrokeSample.java Added: trunk/source/org/jfree/chart/ui/FontChooserPanel.java =================================================================== --- trunk/source/org/jfree/chart/ui/FontChooserPanel.java (rev 0) +++ trunk/source/org/jfree/chart/ui/FontChooserPanel.java 2007-06-21 14:05:32 UTC (rev 57) @@ -0,0 +1,226 @@ +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * in the United States and other countries.] + * + * --------------------- + * FontChooserPanel.java + * --------------------- + * (C) Copyright 2000-2007, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): Arnaud Lelievre; + * + * $Id: FontChooserPanel.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ + * + * Changes (from 26-Oct-2001) + * -------------------------- + * 26-Oct-2001 : Changed package to com.jrefinery.ui.*; + * 14-Oct-2002 : Fixed errors reported by Checkstyle (DG); + * 08-Sep-2003 : Added internationalization via use of properties + * resourceBundle (RFE 690236) (AL); + * 21-Feb-2004 : The FontParameter of the constructor was never used (TM); + * 21-Jun-2007 : Copied from JCommon (DG); + * + */ + +package org.jfree.chart.ui; + +import java.awt.BorderLayout; +import java.awt.Font; +import java.awt.GraphicsEnvironment; +import java.awt.GridLayout; +import java.util.ResourceBundle; + +import javax.swing.BorderFactory; +import javax.swing.JCheckBox; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.ListModel; + +/** + * A panel for choosing a font from the available system fonts - still a bit of + * a hack at the moment, but good enough for demonstration applications. + */ +public class FontChooserPanel extends JPanel { + + /** The font sizes that can be selected. */ + public static final String[] SIZES = {"9", "10", "11", "12", "14", "16", + "18", "20", "22", "24", "28", "36", "48", "72"}; + + /** The list of fonts. */ + private JList fontlist; + + /** The list of sizes. */ + private JList sizelist; + + /** The checkbox that indicates whether the font is bold. */ + private JCheckBox bold; + + /** The checkbox that indicates whether or not the font is italic. */ + private JCheckBox italic; + + /** The resourceBundle for the localization. */ + protected static ResourceBundle localizationResources = + ResourceBundle.getBundle("org.jfree.ui.LocalizationBundle"); + + /** + * Standard constructor - builds a FontChooserPanel initialised with the + * specified font. + * + * @param font the initial font to display. + */ + public FontChooserPanel(Font font) { + + GraphicsEnvironment g = GraphicsEnvironment.getLocalGraphicsEnvironment(); + String[] fonts = g.getAvailableFontFamilyNames(); + + setLayout(new BorderLayout()); + JPanel right = new JPanel(new BorderLayout()); + + JPanel fontPanel = new JPanel(new BorderLayout()); + fontPanel.setBorder(BorderFactory.createTitledBorder( + BorderFactory.createEtchedBorder(), + localizationResources.getString("Font"))); + this.fontlist = new JList(fonts); + JScrollPane fontpane = new JScrollPane(this.fontlist); + fontpane.setBorder(BorderFactory.createEtchedBorder()); + fontPanel.add(fontpane); + add(fontPanel); + + JPanel sizePanel = new JPanel(new BorderLayout()); + sizePanel.setBorder(BorderFactory.createTitledBorder( + BorderFactory.createEtchedBorder(), + localizationResources.getString("Size"))); + this.sizelist = new JList(SIZES); + JScrollPane sizepane = new JScrollPane(this.sizelist); + sizepane.setBorder(BorderFactory.createEtchedBorder()); + sizePanel.add(sizepane); + + JPanel attributes = new JPanel(new GridLayout(1, 2)); + this.bold = new JCheckBox(localizationResources.getString("Bold")); + this.italic = new JCheckBox(localizationResources.getString("Italic")); + attributes.add(this.bold); + attributes.add(this.italic); + attributes.setBorder(BorderFactory.createTitledBorder( + BorderFactory.createEtchedBorder(), + localizationResources.getString("Attributes"))); + + right.add(sizePanel, BorderLayout.CENTER); + right.add(attributes, BorderLayout.SOUTH); + + add(right, BorderLayout.EAST); + + setSelectedFont(font); + } + + /** + * Returns a Font object representing the selection in the panel. + * + * @return the font. + */ + public Font getSelectedFont() { + return new Font(getSelectedName(), getSelectedStyle(), + getSelectedSize()); + } + + /** + * Returns the selected name. + * + * @return the name. + */ + public String getSelectedName() { + return (String) this.fontlist.getSelectedValue(); + } + + /** + * Returns the selected style. + * + * @return the style. + */ + public int getSelectedStyle() { + if (this.bold.isSelected() && this.italic.isSelected()) { + return Font.BOLD + Font.ITALIC; + } + if (this.bold.isSelected()) { + return Font.BOLD; + } + if (this.italic.isSelected()) { + return Font.ITALIC; + } + else { + return Font.PLAIN; + } + } + + /** + * Returns the selected size. + * + * @return the size. + */ + public int getSelectedSize() { + String selected = (String) this.sizelist.getSelectedValue(); + if (selected != null) { + return Integer.parseInt(selected); + } + else { + return 10; + } + } + + /** + * Initializes the contents of the dialog from the given font + * object. + * + * @param font the font from which to read the properties. + */ + public void setSelectedFont( Font font) { + if (font == null) { + throw new NullPointerException(); + } + this.bold.setSelected(font.isBold()); + this.italic.setSelected(font.isItalic()); + + String fontName = font.getName(); + ListModel model = this.fontlist.getModel(); + this.fontlist.clearSelection(); + for (int i = 0; i < model.getSize(); i++) { + if (fontName.equals(model.getElementAt(i))) { + this.fontlist.setSelectedIndex(i); + break; + } + } + + String fontSize = String.valueOf(font.getSize()); + model = this.sizelist.getModel(); + this.sizelist.clearSelection(); + for (int i = 0; i < model.getSize(); i++) { + if (fontSize.equals(model.getElementAt(i))) { + this.sizelist.setSelectedIndex(i); + break; + } + } + } +} \ No newline at end of file Added: trunk/source/org/jfree/chart/ui/FontDisplayField.java =================================================================== --- trunk/source/org/jfree/chart/ui/FontDisplayField.java (rev 0) +++ trunk/source/org/jfree/chart/ui/FontDisplayField.java 2007-06-21 14:05:32 UTC (rev 57) @@ -0,0 +1,114 @@ +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * in the United States and other countries.] + * + * --------------------- + * FontDisplayField.java + * --------------------- + * (C) Copyright 2000-2007, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): Arnaud Lelievre; + * + * $Id: FontDisplayField.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ + * + * Changes (from 26-Oct-2001) + * ---------------------------------- + * 26-Oct-2001 : Changed package to com.jrefinery.ui.*; + * 14-Oct-2002 : Fixed errors reported by Checkstyle (DG); + * 08-Sep-2003 : Added internationalization via use of properties resourceBundle (RFE 690236) (AL); + * 21-Jun-2007 : Copied from JCommon (DG); + * + */ + +package org.jfree.chart.ui; + +import java.awt.Font; +import java.util.ResourceBundle; + +import javax.swing.JTextField; + +/** + * A field for displaying a font selection. The display field itself is + * read-only, to the developer must provide another mechanism to allow the + * user to change the font. + */ +public class FontDisplayField extends JTextField { + + /** The current font. */ + private Font displayFont; + + /** The resourceBundle for the localization. */ + protected static final ResourceBundle localizationResources = + ResourceBundle.getBundle("org.jfree.ui.LocalizationBundle"); + + /** + * Standard constructor - builds a FontDescriptionField initialised with + * the specified font. + * + * @param font the font. + */ + public FontDisplayField(Font font) { + super(""); + setDisplayFont(font); + setEnabled(false); + } + + /** + * Returns the current font. + * + * @return the font. + */ + public Font getDisplayFont() { + return this.displayFont; + } + + /** + * Sets the font. + * + * @param font the font. + */ + public void setDisplayFont(Font font) { + this.displayFont = font; + setText(fontToString(this.displayFont)); + } + + /** + * Returns a string representation of the specified font. + * + * @param font the font. + * + * @return a string describing the font. + */ + private String fontToString(Font font) { + if (font != null) { + return font.getFontName() + ", " + font.getSize(); + } + else { + return localizationResources.getString("No_Font_Selected"); + } + } + +} Added: trunk/source/org/jfree/chart/ui/LCBLayout.java =================================================================== --- trunk/source/org/jfree/chart/ui/LCBLayout.java (rev 0) +++ trunk/source/org/jfree/chart/ui/LCBLayout.java 2007-06-21 14:05:32 UTC (rev 57) @@ -0,0 +1,270 @@ +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * in the United States and other countries.] + * + * -------------- + * LCBLayout.java + * -------------- + * (C) Copyright 2000-2007, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): -; + * + * $Id: LCBLayout.java,v 1.5 2005/11/16 15:58:40 taqua Exp $ + * + * Changes (from 26-Oct-2001) + * -------------------------- + * 26-Oct-2001 : Changed package to com.jrefinery.layout.* (DG); + * 10-Oct-2002 : Fixed errors reported by Checkstyle (DG); + * 21-Jun-2007 : Removed JCommon dependencies (DG); + */ + +package org.jfree.chart.ui; + +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Insets; +import java.awt.LayoutManager; +import java.io.Serializable; + +/** + * Specialised layout manager for a grid of components. + */ +public class LCBLayout implements LayoutManager, Serializable { + + /** For serialization. */ + private static final long serialVersionUID = -2531780832406163833L; + + /** A constant for the number of columns in the layout. */ + private static final int COLUMNS = 3; + + /** Tracks the column widths. */ + private int[] colWidth; + + /** Tracks the row heights. */ + private int[] rowHeight; + + /** The gap between each label and component. */ + private int labelGap; + + /** The gap between each component and button. */ + private int buttonGap; + + /** The gap between rows. */ + private int vGap; + + /** + * Creates a new LCBLayout with the specified maximum number of rows. + * + * @param maxrows the maximum number of rows. + */ + public LCBLayout(int maxrows) { + this.labelGap = 10; + this.buttonGap = 6; + this.vGap = 2; + this.colWidth = new int[COLUMNS]; + this.rowHeight = new int[maxrows]; + } + + /** + * Returns the preferred size using this layout manager. + * + * @param parent the parent. + * + * @return the preferred size using this layout manager. + */ + public Dimension preferredLayoutSize(Container parent) { + + synchronized (parent.getTreeLock()) { + Insets insets = parent.getInsets(); + int ncomponents = parent.getComponentCount(); + int nrows = ncomponents / COLUMNS; + for (int c = 0; c < COLUMNS; c++) { + for (int r = 0; r < nrows; r++) { + Component component = parent.getComponent(r * COLUMNS + c); + Dimension d = component.getPreferredSize(); + if (this.colWidth[c] < d.width) { + this.colWidth[c] = d.width; + } + if (this.rowHeight[r] < d.height) { + this.rowHeight[r] = d.height; + } + } + } + int totalHeight = this.vGap * (nrows - 1); + for (int r = 0; r < nrows; r++) { + totalHeight = totalHeight + this.rowHeight[r]; + } + int totalWidth = this.colWidth[0] + this.labelGap + + this.colWidth[1] + this.buttonGap + this.colWidth[2]; + return new Dimension(insets.left + insets.right + totalWidth + + this.labelGap + this.buttonGap, insets.top + + insets.bottom + totalHeight + this.vGap); + } + + } + + /** + * Returns the minimum size using this layout manager. + * + * @param parent the parent. + * + * @return the minimum size using this layout manager. + */ + public Dimension minimumLayoutSize(Container parent) { + + synchronized (parent.getTreeLock()) { + Insets insets = parent.getInsets(); + int ncomponents = parent.getComponentCount(); + int nrows = ncomponents / COLUMNS; + for (int c = 0; c < COLUMNS; c++) { + for (int r = 0; r < nrows; r++) { + Component component = parent.getComponent(r * COLUMNS + c); + Dimension d = component.getMinimumSize(); + if (this.colWidth[c] < d.width) { + this.colWidth[c] = d.width; + } + if (this.rowHeight[r] < d.height) { + this.rowHeight[r] = d.height; + } + } + } + int totalHeight = this.vGap * (nrows - 1); + for (int r = 0; r < nrows; r++) { + totalHeight = totalHeight + this.rowHeight[r]; + } + int totalWidth = this.colWidth[0] + this.labelGap + + this.colWidth[1] + this.buttonGap + this.colWidth[2]; + return new Dimension(insets.left + insets.right + totalWidth + + this.labelGap + this.buttonGap, insets.top + + insets.bottom + totalHeight + this.vGap); + } + + } + + /** + * Lays out the components. + * + * @param parent the parent. + */ + public void layoutContainer(Container parent) { + + synchronized (parent.getTreeLock()) { + Insets insets = parent.getInsets(); + int ncomponents = parent.getComponentCount(); + int nrows = ncomponents / COLUMNS; + for (int c = 0; c < COLUMNS; c++) { + for (int r = 0; r < nrows; r++) { + Component component = parent.getComponent(r * COLUMNS + c); + Dimension d = component.getPreferredSize(); + if (this.colWidth[c] < d.width) { + this.colWidth[c] = d.width; + } + if (this.rowHeight[r] < d.height) { + this.rowHeight[r] = d.height; + } + } + } + int totalHeight = this.vGap * (nrows - 1); + for (int r = 0; r < nrows; r++) { + totalHeight = totalHeight + this.rowHeight[r]; + } + int totalWidth = this.colWidth[0] + this.colWidth[1] + + this.colWidth[2]; + + // adjust the width of the second column to use up all of parent + int available = parent.getWidth() - insets.left + - insets.right - this.labelGap - this.buttonGap; + this.colWidth[1] = this.colWidth[1] + (available - totalWidth); + + // *** DO THE LAYOUT *** + int x = insets.left; + for (int c = 0; c < COLUMNS; c++) { + int y = insets.top; + for (int r = 0; r < nrows; r++) { + int i = r * COLUMNS + c; + if (i < ncomponents) { + Component component = parent.getComponent(i); + Dimension d = component.getPreferredSize(); + int h = d.height; + int adjust = (this.rowHeight[r] - h) / 2; + parent.getComponent(i).setBounds(x, y + adjust, + this.colWidth[c], h); + } + y = y + this.rowHeight[r] + this.vGap; + } + x = x + this.colWidth[c]; + if (c == 0) { + x = x + this.labelGap; + } + if (c == 1) { + x = x + this.buttonGap; + } + } + + } + + } + + /** + * Not used. + * + * @param comp the component. + */ + public void addLayoutComponent(Component comp) { + // not used + } + + /** + * Not used. + * + * @param comp the component. + */ + public void removeLayoutComponent(Component comp) { + // not used + } + + /** + * Not used. + * + * @param name the component name. + * @param comp the component. + */ + public void addLayoutComponent(String name, Component comp) { + // not used + } + + /** + * Not used. + * + * @param name the component name. + * @param comp the component. + */ + public void removeLayoutComponent(String name, Component comp) { + // not used + } + +} Added: trunk/source/org/jfree/chart/ui/PaintSample.java =================================================================== --- trunk/source/org/jfree/chart/ui/PaintSample.java (rev 0) +++ trunk/source/org/jfree/chart/ui/PaintSample.java 2007-06-21 14:05:32 UTC (rev 57) @@ -0,0 +1,128 @@ +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * in the United States and other countries.] + * + * ---------------- + * PaintSample.java + * ---------------- + * (C) Copyright 2000-2007, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): -; + * + * $Id: PaintSample.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ + * + * Changes (from 26-Oct-2001) + * -------------------------- + * 26-Oct-2001 : Changed package to com.jrefinery.ui.*; + * 14-Oct-2002 : Fixed errors reported by Checkstyle (DG); + * 21-Jun-2007 : Copied from JCommon (DG); + * + */ + +package org.jfree.chart.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 javax.swing.JComponent; + +/** + * A panel that displays a paint sample. + */ +public class PaintSample extends JComponent { + + /** The paint. */ + private Paint paint; + + /** The preferred size of the component. */ + private Dimension preferredSize; + + /** + * Standard constructor - builds a paint sample. + * + * @param paint the paint to display. + */ + public PaintSample(Paint paint) { + this.paint = paint; + this.preferredSize = new Dimension(80, 12); + } + + /** + * Returns the current Paint object being displayed in the panel. + * + * @return the paint. + */ + public Paint getPaint() { + return this.paint; + } + + /** + * Sets the Paint object being displayed in the panel. + * + * @param paint the paint. + */ + public void setPaint(Paint paint) { + this.paint = paint; + repaint(); + } + + /** + * Returns the preferred size of the component. + * + * @return the preferred size. + */ + public Dimension getPreferredSize() { + return this.preferredSize; + } + + /** + * Fills the component with the current Paint. + * + * @param g the graphics device. + */ + public void paintComponent(Graphics g) { + + Graphics2D g2 = (Graphics2D) g; + Dimension size = getSize(); + Insets insets = getInsets(); + double xx = insets.left; + double yy = insets.top; + double ww = size.getWidth() - insets.left - insets.right - 1; + double hh = size.getHeight() - insets.top - insets.bottom - 1; + Rectangle2D area = new Rectangle2D.Double(xx, yy, ww, hh); + g2.setPaint(this.paint); + g2.fill(area); + g2.setPaint(Color.black); + g2.draw(area); + + } + +} Added: trunk/source/org/jfree/chart/ui/StrokeChooserPanel.java =================================================================== --- trunk/source/org/jfree/chart/ui/StrokeChooserPanel.java (rev 0) +++ trunk/source/org/jfree/chart/ui/StrokeChooserPanel.java 2007-06-21 14:05:32 UTC (rev 57) @@ -0,0 +1,108 @@ +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * in the United States and other countries.] + * + * ----------------------- + * StrokeChooserPanel.java + * ----------------------- + * (C) Copyright 2000-2007, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): Dirk Zeitz; + * + * $Id: StrokeChooserPanel.java,v 1.5 2005/11/16 15:58:41 taqua Exp $ + * + * Changes (from 26-Oct-2001) + * -------------------------- + * 26-Oct-2001 : Changed package to com.jrefinery.ui.*; + * 14-Oct-2002 : Fixed errors reported by Checkstyle (DG); + * 16-Mar-2004 : Fix for focus problems (DZ); + * 21-Jun-2007 : Removed JCommon dependencies (DG); + * + */ + +package org.jfree.chart.ui; + +import java.awt.BasicStroke; +import java.awt.BorderLayout; +import java.awt.Stroke; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JComboBox; +import javax.swing.JPanel; + +/** + * A component for choosing a stroke from a list of available strokes. This + * class needs work. + */ +public class StrokeChooserPanel extends JPanel { + + /** A combo for selecting the stroke. */ + private JComboBox selector; + + /** + * Creates a panel containing a combo-box that allows the user to select + * one stroke from a list of available strokes. + * + * @param current the current stroke sample. + * @param available an array of 'available' stroke samples. + */ + public StrokeChooserPanel(StrokeSample current, StrokeSample[] available) { + setLayout(new BorderLayout()); + this.selector = new JComboBox(available); + this.selector.setSelectedItem(current); + this.selector.setRenderer(new StrokeSample(new BasicStroke(1))); + add(this.selector); + // Changes due to focus problems!! DZ + this.selector.addActionListener(new ActionListener() { + public void actionPerformed(final ActionEvent evt) { + getSelector().transferFocus(); + } + }); + } + + + /** + * Returns the selector component. + * + * @return Returns the selector. + */ + protected final JComboBox getSelector() + { + return this.selector; + } + + /** + * Returns the selected stroke. + * + * @return the selected stroke. + */ + public Stroke getSelectedStroke() { + StrokeSample sample = (StrokeSample) this.selector.getSelectedItem(); + return sample.getStroke(); + } + +} Added: trunk/source/org/jfree/chart/ui/StrokeSample.java =================================================================== --- trunk/source/org/jfree/chart/ui/StrokeSample.java (rev 0) +++ trunk/source/org/jfree/chart/ui/StrokeSample.java 2007-06-21 14:05:32 UTC (rev 57) @@ -0,0 +1,174 @@ +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * in the United States and other countries.] + * + * ----------------- + * StrokeSample.java + * ----------------- + * (C) Copyright 2000-2007, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): -; + * + * $Id: StrokeSample.java,v 1.3 2005/10/18 13:18:34 mungady Exp $ + * + * Changes (from 26-Oct-2001) + * -------------------------- + * 26-Oct-2001 : Changed package to com.jrefinery.ui.*; + * 14-Oct-2002 : Fixed errors reported by Checkstyle (DG); + * 21-Mar-2003 : Fixed null pointer exception, bug 705126 (DG); + * 21-Jun-2007 : Copied from JCommon (DG); + * + */ + +package org.jfree.chart.ui; + +import java.awt.BasicStroke; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Insets; +import java.awt.RenderingHints; +import java.awt.Stroke; +import java.awt.geom.Ellipse2D; +import java.awt.geom.Line2D; +import java.awt.geom.Point2D; + +import javax.swing.JComponent; +import javax.swing.JList; +import javax.swing.ListCellRenderer; + +/** + * A panel that displays a stroke sample. + */ +public class StrokeSample extends JComponent implements ListCellRenderer { + + /** The stroke being displayed. */ + private Stroke stroke; + + /** The preferred size of the component. */ + private Dimension preferredSize; + + /** + * Creates a StrokeSample for the specified stroke. + * + * @param stroke the sample stroke. + */ + public StrokeSample(Stroke stroke) { + this.stroke = stroke; + this.preferredSize = new Dimension(80, 18); + } + + /** + * Returns the current Stroke object being displayed. + * + * @return the stroke. + */ + public Stroke getStroke() { + return this.stroke; + } + + /** + * Sets the Stroke object being displayed. + * + * @param stroke the stroke. + */ + public void setStroke(Stroke stroke) { + this.stroke = stroke; + repaint(); + } + + /** + * Returns the preferred size of the component. + * + * @return the preferred size of the component. + */ + public Dimension getPreferredSize() { + return this.preferredSize; + } + + /** + * Draws a line using the sample stroke. + * + * @param g the graphics device. + */ + public void paintComponent(Graphics g) { + + Graphics2D g2 = (Graphics2D) g; + g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + Dimension size = getSize(); + Insets insets = getInsets(); + double xx = insets.left; + double yy = insets.top; + double ww = size.getWidth() - insets.left - insets.right; + double hh = size.getHeight() - insets.top - insets.bottom; + + Point2D one = new Point2D.Double(xx + 6, yy + hh / 2); + Point2D two = new Point2D.Double(xx + ww - 6, yy + hh / 2); + + Ellipse2D circle1 = new Ellipse2D.Double(one.getX() - 5, one.getY() - 5, 10, 10); + Ellipse2D circle2 = new Ellipse2D.Double(two.getX() - 6, two.getY() - 5, 10, 10); + + g2.draw(circle1); + g2.fill(circle1); + g2.draw(circle2); + g2.fill(circle2); + + // draw a line connecting the points + Line2D line = new Line2D.Double(one, two); + if (this.stroke != null) { + g2.setStroke(this.stroke); + } + else { + g2.setStroke(new BasicStroke(0.0f)); + } + g2.draw(line); + + } + + /** + * Returns a list cell renderer for the stroke, so the sample can be + * displayed in a list or combo. + * + * @param list the list. + * @param value the value. + * @param index the index. + * @param isSelected selected? + * @param cellHasFocus focussed? + * + * @return the component for rendering. + */ + public Component getListCellRendererComponent(JList list, Object value, + int index, boolean isSelected, boolean cellHasFocus) { + if (value instanceof StrokeSample) { + final StrokeSample in = (StrokeSample) value; + setStroke(in.getStroke()); + } + return this; + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2007-06-21 14:35:00
|
Revision: 59 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=59&view=rev Author: mungady Date: 2007-06-21 07:34:48 -0700 (Thu, 21 Jun 2007) Log Message: ----------- New classes copied from JCommon. Added Paths: ----------- trunk/source/org/jfree/chart/ui/BasicProjectInfo.java trunk/source/org/jfree/chart/ui/Contributor.java trunk/source/org/jfree/chart/ui/Library.java trunk/source/org/jfree/chart/ui/Licences.java trunk/source/org/jfree/chart/ui/ProjectInfo.java Added: trunk/source/org/jfree/chart/ui/BasicProjectInfo.java =================================================================== --- trunk/source/org/jfree/chart/ui/BasicProjectInfo.java (rev 0) +++ trunk/source/org/jfree/chart/ui/BasicProjectInfo.java 2007-06-21 14:34:48 UTC (rev 59) @@ -0,0 +1,288 @@ +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * in the United States and other countries.] + * + * --------------------- + * BasicProjectInfo.java + * --------------------- + * (C)opyright 2004-2007, by Thomas Morgner and Contributors. + * + * Original Author: Thomas Morgner; + * Contributor(s): David Gilbert (for Object Refinery Limited); + * + * $Id: BasicProjectInfo.java,v 1.7 2006/04/14 13:00:56 taqua Exp $ + * + * Changes + * ------- + * 07-Jun-2004 : Added source headers (DG); + * + */ + +package org.jfree.chart.ui; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +import org.jfree.chart.util.ObjectUtilities; + +/** + * Basic project info. + */ +public class BasicProjectInfo extends Library { + + /** + * A helper class, which simplifies the loading of optional library + * implementations. + */ + private static class OptionalLibraryHolder { + private String libraryClass; + private transient Library library; + + public OptionalLibraryHolder(String libraryClass) { + if (libraryClass == null) { + throw new NullPointerException( + "LibraryClass must not be null."); + } + this.libraryClass = libraryClass; + } + + public OptionalLibraryHolder(Library library) { + if (library == null) { + throw new NullPointerException("Library must not be null."); + } + this.library = library; + this.libraryClass = library.getClass().getName(); + } + + public String getLibraryClass() { + return libraryClass; + } + + public Library getLibrary() { + if (library == null) { + library = loadLibrary(libraryClass); + } + return library; + } + + protected Library loadLibrary(String classname) { + if (classname == null) { + return null; + } + try { + Class c = ObjectUtilities.getClassLoader( + getClass()).loadClass(classname); + try { + Method m = c.getMethod("getInstance", (Class[]) null); + return (Library) m.invoke(null, (Object[]) null); + } + catch(Exception e) { + // ok, fall back ... + } + return (Library) c.newInstance(); + } + catch (Exception e) { + // ok, this library has no 'getInstance()' method. Check the + // default constructor ... + return null; + } + } + + } + + /** The project copyright statement. */ + private String copyright; + + /** A list of libraries used by the project. */ + private List libraries; + + private List optionalLibraries; + + /** + * Default constructor. + */ + public BasicProjectInfo() { + this.libraries = new ArrayList(); + this.optionalLibraries = new ArrayList(); + } + + /** + * Creates a new library reference. + * + * @param name the name. + * @param version the version. + * @param licence the licence. + * @param info the web address or other info. + */ + public BasicProjectInfo(String name, String version, + String licence, String info) { + this(); + setName(name); + setVersion(version); + setLicenceName(licence); + setInfo(info); + } + + /** + * Creates a new project info instance. + * + * @param name the project name. + * @param version the project version. + * @param info the project info (web site for example). + * @param copyright the copyright statement. + * @param licenceName the license name. + */ + public BasicProjectInfo(String name, String version, + String info, String copyright, + String licenceName) { + this(name, version, licenceName, info); + setCopyright(copyright); + } + + /** + * Returns the copyright statement. + * + * @return The copyright statement. + */ + public String getCopyright() { + return this.copyright; + } + + /** + * Sets the project copyright statement. + * + * @param copyright the project copyright statement. + */ + public void setCopyright(String copyright) { + this.copyright = copyright; + } + + /** + * Sets the project info string (for example, this could be the project URL). + * + * @param info the info string. + */ + public void setInfo(String info) { + super.setInfo(info); + } + + /** + * Sets the license name. + * + * @param licence the license name. + */ + public void setLicenceName(String licence) { + super.setLicenceName(licence); + } + + /** + * Sets the project name. + * + * @param name the project name. + */ + public void setName(String name) { + super.setName(name); + } + + /** + * Sets the project version number. + * + * @param version the version number. + */ + public void setVersion(String version) { + super.setVersion(version); + } + + /** + * Returns a list of libraries used by the project. + * + * @return the list of libraries. + */ + public Library[] getLibraries() { + return (Library[]) this.libraries.toArray + (new Library[this.libraries.size()]); + } + + /** + * Adds a library. + * + * @param library the library. + */ + public void addLibrary(Library library) { + if (library == null) { + throw new NullPointerException(); + } + this.libraries.add(library); + } + + /** + * Returns a list of optional libraries used by the project. + * + * @return the list of libraries. + */ + public Library[] getOptionalLibraries() { + ArrayList libraries = new ArrayList(); + for (int i = 0; i < optionalLibraries.size(); i++) { + OptionalLibraryHolder holder = + (OptionalLibraryHolder) optionalLibraries.get(i); + Library l = holder.getLibrary(); + if (l != null) { + libraries.add(l); + } + } + return (Library[]) libraries.toArray(new Library[libraries.size()]); + } + + /** + * Adds an optional library. These libraries will be booted, if they define + * a boot class. A missing class is considered non-fatal and it is assumed + * that the programm knows how to handle that. + * + * @param library the library. + */ + public void addOptionalLibrary(String libraryClass) { + if (libraryClass == null) { + throw new NullPointerException("Library classname must be given."); + } + this.optionalLibraries.add + (new OptionalLibraryHolder(libraryClass)); + } + + + /** + * Adds an optional library. These libraries will be booted, if they define + * a boot class. A missing class is considered non-fatal and it is assumed + * that the programm knows how to handle that. + * + * @param library the library. + */ + public void addOptionalLibrary(Library library) { + if (library == null) { + throw new NullPointerException("Library must be given."); + } + this.optionalLibraries.add(new OptionalLibraryHolder(library)); + } +} \ No newline at end of file Added: trunk/source/org/jfree/chart/ui/Contributor.java =================================================================== --- trunk/source/org/jfree/chart/ui/Contributor.java (rev 0) +++ trunk/source/org/jfree/chart/ui/Contributor.java 2007-06-21 14:34:48 UTC (rev 59) @@ -0,0 +1,88 @@ +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * in the United States and other countries.] + * + * ---------------- + * Contributor.java + * ---------------- + * (C) Copyright 2001-2007, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): -; + * + * $Id: Contributor.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ + * + * Changes + * ------- + * 10-Dec-2001 : Version 1 (DG); + * 28-Feb-2002 : Moved into package com.jrefinery.ui.about (DG); + * 08-Oct-2002 : Fixed errors reported by Checkstyle (DG); + * 21-Jun-2007 : Removed JCommon dependencies (DG); + * + */ + +package org.jfree.chart.ui; + +/** + * A simple class representing a contributor to a software project. + */ +public class Contributor { + + /** The name. */ + private String name; + + /** The e-mail address. */ + private String email; + + /** + * Creates a new contributor. + * + * @param name the name. + * @param email the e-mail address. + */ + public Contributor(String name, String email) { + this.name = name; + this.email = email; + } + + /** + * Returns the contributor's name. + * + * @return the contributor's name. + */ + public String getName() { + return this.name; + } + + /** + * Returns the contributor's e-mail address. + * + * @return the contributor's e-mail address. + */ + public String getEmail() { + return this.email; + } + +} Added: trunk/source/org/jfree/chart/ui/Library.java =================================================================== --- trunk/source/org/jfree/chart/ui/Library.java (rev 0) +++ trunk/source/org/jfree/chart/ui/Library.java 2007-06-21 14:34:48 UTC (rev 59) @@ -0,0 +1,181 @@ +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * in the United States and other countries.] + * + * ------------ + * Library.java + * ------------ + * (C) Copyright 2002-2007, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): -; + * + * $Id: Library.java,v 1.6 2006/03/23 19:47:05 taqua Exp $ + * + * Changes + * ------- + * 21-Feb-2002 : Version 1 (DG); + * 25-Mar-2002 : Added a new constructor (DG); + * 02-Nov-2005 : Minor API doc updates (DG); + * 21-Jun-2007 : Copied from JCommon (DG); + * + */ + +package org.jfree.chart.ui; + +/** + * A simple class representing a library in a software project. + */ +public class Library { + + /** The name. */ + private String name; + + /** The version. */ + private String version; + + /** The licenceName. */ + private String licenceName; + + /** The version. */ + private String info; + + /** + * Creates a new library reference. + * + * @param name the name. + * @param version the version. + * @param licence the licenceName. + * @param info the web address or other info. + */ + public Library(String name, String version, String licence, String info) { + + this.name = name; + this.version = version; + this.licenceName = licence; + this.info = info; + } + + /** + * Creates a new library reference. + */ + protected Library() { + // nothing required + } + + /** + * Returns the library name. + * + * @return the library name. + */ + public String getName() { + return this.name; + } + + /** + * Returns the library version. + * + * @return the library version. + */ + public String getVersion() { + return this.version; + } + + /** + * Returns the licenceName text. + * + * @return the licenceName text. + */ + public String getLicenceName() { + return this.licenceName; + } + + /** + * Returns the project info for the library. + * + * @return the project info. + */ + public String getInfo() { + return this.info; + } + + /** + * Sets the project info. + * + * @param info the project info. + */ + protected void setInfo(String info) { + this.info = info; + } + + /** + * Sets the licence name. + * + * @param licenceName the licence name. + */ + protected void setLicenceName(String licenceName) { + this.licenceName = licenceName; + } + + /** + * Sets the project name. + * + * @param name the project name. + */ + protected void setName(String name) { + this.name = name; + } + + /** + * Sets the version identifier. + * + * @param version the version identifier. + */ + protected void setVersion(String version) { + this.version = version; + } + + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null || getClass() != obj.getClass()) { + return false; + } + + Library library = (Library) obj; + + if (this.name != null ? !this.name.equals(library.name) + : library.name != null) { + return false; + } + + return true; + } + + public int hashCode() { + return (this.name != null ? this.name.hashCode() : 0); + } +} Added: trunk/source/org/jfree/chart/ui/Licences.java =================================================================== --- trunk/source/org/jfree/chart/ui/Licences.java (rev 0) +++ trunk/source/org/jfree/chart/ui/Licences.java 2007-06-21 14:34:48 UTC (rev 59) @@ -0,0 +1,826 @@ +/* =========================================================== + * JFreeChart : a free chart library for the Java(tm) platform + * =========================================================== + * + * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * + * Project Info: http://www.jfree.org/jfreechart/index.html + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + * + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * in the United States and other countries.] + * + * ------------- + * Licences.java + * ------------- + * (C) Copyright 2001-2007, by Object Refinery Limited. + * + * Original Author: David Gilbert (for Object Refinery Limited); + * Contributor(s): -; + * + * $Id: Licences.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ + * + * Changes + * ------- + * 26-Nov-2001 : Version 1 (DG); + * 29-Jan-2002 : Appended the instructions to the end of the GNU LGPL and GPL to comply with + * GNU requirements (DG); + * 28-Feb-2002 : Moved to package com.jrefinery.ui.about (DG); + * 08-Oct-2002 : Fixed errors reported by Checkstyle (DG); + * 21-Jun-2007 : Copied from JCommon (DG); + * + */ + +package org.jfree.chart.ui; + +/** + * Contains the full texts of the GNU General Public Licence and the GNU Lesser + * General Public Licence. + */ +public class Licences { + + /** The GNU General Public Licence. */ + public static final String GPL = "GNU GENERAL PUBLIC LICENSE\n" + + "\n" + + "Version 2, June 1991\n" + + "\n" + + "Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, " + + "MA 02139, USA. Everyone is permitted to copy and distribute verbatim copies of this " + + "license document, but changing it is not allowed.\n" + + "\n" + + "Preamble\n" + + "The licenses for most software are designed to take away your freedom to share and " + + "change it. By contrast, the GNU General Public License is intended to guarantee your " + + "freedom to share and change free software--to make sure the software is free for all " + + "its users. This General Public License applies to most of the Free Software " + + "Foundation's software and to any other program whose authors commit to using it. (Some " + + "other Free Software Foundation software is covered by the GNU Library General Public " + + "License instead.) You can apply it to your programs, too.\n" + + "\n" + + "When we speak of free software, we are referring to freedom, not price. Our General " + + "Public Licenses are designed to make sure that you have the freedom to distribute " + + "copies of free software (and charge for this service if you wish), that you receive " + + "source code or can get it if you want it, that you can change the software or use " + + "pieces of it in new free programs; and that you know you can do these things." + + "\n" + + "To protect your rights, we need to make restrictions that forbid anyone to deny you " + + "these rights or to ask you to surrender the rights. These restrictions translate to " + + "certain responsibilities for you if you distribute copies of the software, or if you " + + "modify it.\n" + + "\n" + + "For example, if you distribute copies of such a program, whether gratis or for a fee, " + + "you must give the recipients all the rights that you have. You must make sure that " + + "they, too, receive or can get the source code. And you must show them these terms so " + + "they know their rights.\n" + + "\n" + + "We protect your rights with two steps: (1) copyright the software, and (2) offer you " + + "this license which gives you legal permission to copy, distribute and/or modify the " + + "software.\n" + + "\n" + + "Also, for each author's protection and ours, we want to make certain that everyone " + + "understands that there is no warranty for this free software. If the software is " + + "modified by someone else and passed on, we want its recipients to know that what they " + + "have is not the original, so that any problems introduced by others will not reflect " + + "on the original authors' reputations.\n" + + "\n" + + "Finally, any free program is threatened constantly by software patents. We wish to " + + "avoid the danger that redistributors of a free program will individually obtain patent " + + "licenses, in effect making the program proprietary. To prevent this, we have made it " + + "clear that any patent must be licensed for everyone's free use or not licensed at " + + "all.\n" + + "\n" + + "The precise terms and conditions for copying, distribution and modification follow.\n" + + "\n" + + "GNU GENERAL PUBLIC LICENSE\n" + + "TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n" + + "\n" + + "0. This License applies to any program or other work which contains a notice placed by " + + "the copyright holder saying it may be distributed under the terms of this General " + + "Public License. The \"Program\", below, refers to any such program or work, and a " + + "\"work based on the Program\" means either the Program or any derivative work under " + + "copyright law: that is to say, a work containing the Program or a portion of it, " + + "either verbatim or with modifications and/or translated into another language. " + + "(Hereinafter, translation is included without limitation in the term " + + "\"modification\".) Each licensee is addressed as \"you\".\n" + + "\n" + + "Activities other than copying, distribution and modification are not covered by this " + + "License; they are outside its scope. The act of running the Program is not restricted, " + + "and the output from the Program is covered only if its contents constitute a work " + + "based on the Program (independent of having been made by running the Program). Whether " + + "that is true depends on what the Program does.\n" + + "\n" + + "1. You may copy and distribute verbatim copies of the Program's source code as you " + + "receive it, in any medium, provided that you conspicuously and appropriately publish " + + "on each copy an appropriate copyright notice and disclaimer of warranty; keep intact " + + "all the notices that refer to this License and to the absence of any warranty; and " + + "give any other recipients of the Program a copy of this License along with the " + + "Program.\n" + + "\n" + + "You may charge a fee for the physical act of transferring a copy, and you may at your " + + "option offer warranty protection in exchange for a fee.\n" + + "\n" + + "2. You may modify your copy or copies of the Program or any portion of it, thus " + + "forming a work based on the Program, and copy and distribute such modifications or " + + "work under the terms of Section 1 above, provided that you also meet all of these " + + "conditions:\n" + + "\n" + + "a) You must cause the modified files to carry prominent notices stating that you " + + "changed the files and the date of any change.\n" + + "\n" + + "b) You must cause any work that you distribute or publish, that in whole or in part " + + "contains or is derived from the Program or any part thereof, to be licensed as a whole " + + "at no charge to all third parties under the terms of this License.\n" + + "\n" + + "c) If the modified program normally reads commands interactively when run, you must " + + "cause it, when started running for such interactive use in the most ordinary way, to " + + "print or display an announcement including an appropriate copyright notice and a " + + "notice that there is no warranty (or else, saying that you provide a warranty) and " + + "that users may redistribute the program under these conditions, and telling the user " + + "how to view a copy of this License. (Exception: if the Program itself is interactive " + + "but does not normally print such an announcement, your work based on the Program is " + + "not required to print an announcement.)\n" + + "\n" + + "These requirements apply to the modified work as a whole. If identifiable sections of " + + "that work are not derived from the Program, and can be reasonably considered " + + "independent and separate works in themselves, then this License, and its terms, do not " + + "apply to those sections when you distribute them as separate works. But when you " + + "distribute the same sections as part of a whole which is a work based on the Program, " + + "the distribution of the whole must be on the terms of this License, whose permissions " + + "for other licensees extend to the entire whole, and thus to each and every part " + + "regardless of who wrote it.\n" + + "\n" + + "Thus, it is not the intent of this section to claim rights or contest your rights to " + + "work written entirely by you; rather, the intent is to exercise the right to control " + + "the distribution of derivative or collective works based on the Program.\n" + + "\n" + + "In addition, mere aggregation of another work not based on the Program with the " + + "Program (or with a work based on the Program) on a volume of a storage or distribution " + + "medium does not bring the other work under the scope of this License.\n" + + "\n" + + "3. You may copy and distribute the Program (or a work based on it, under Section 2) in " + + "object code or executable form under the terms of Sections 1 and 2 above provided that " + + "you also do one of the following:\n" + + "\n" + + "a) Accompany it with the complete corresponding machine-readable source code, which " + + "must be distributed under the terms of Sections 1 and 2 above on a medium customarily " + + "used for software interchange; or,\n" + + "b) Accompany it with a written offer, valid for at least three years, to give any " + + "third party, for a charge no more than your cost of physically performing source " + + "distribution, a complete machine-readable copy of the corresponding source code, to be " + + "distributed under the terms of Sections 1 and 2 above on a medium customarily used for " + + "software interchange; or,\n" + + "c) Accompany it with the information you received as to the offer to distribute " + + "corresponding source code. (This alternative is allowed only for noncommercial " + + "distribution and only if you received the program in object code or executable form " + + "with such an offer, in accord with Subsection b above.)\n" + + "\n" + + "The source code for a work means the preferred form of the work for making " + + "modifications to it. For an executable work, complete source code means all the source " + + "code for all modules it contains, plus any associated interface definition files, plus " + + "the scripts used to control compilation and installation of the executable. However, " + + "as a special exception, the source code distributed need not include anything that is " + + "normally distributed (in either source or binary form) with the major components " + + "(compiler, kernel, and so on) of the operating system on which the executable runs, " + + "unless that component itself accompanies the executable.\n" + + "\n" + + "If distribution of executable or object code is made by offering access to copy from a " + + "designated place, then offering equivalent access to copy the source code from the " + + "same place counts as distribution of the source code, even though third parties are " + + "not compelled to copy the source along with the object code.\n" + + "\n" + + "4. You may not copy, modify, sublicense, or distribute the Program except as expressly " + + "provided under this License. Any attempt otherwise to copy, modify, sublicense or " + + "distribute the Program is void, and will automatically terminate your rights under " + + "this License. However, parties who have received copies, or rights, from you under " + + "this License will not have their licenses terminated so long as such parties remain in " + + "full compliance." + + "\n" + + "5. You are not required to accept this License, since you have not signed it. However, " + + "nothing else grants you permission to modify or distribute the Program or its " + + "derivative works. These actions are prohibited by law if you do not accept this " + + "License. Therefore, by modifying or distributing the Program (or any work based on the " + + "Program), you indicate your acceptance of this License to do so, and all its terms and " + + "conditions for copying, distributing or modifying the Program or works based on it.\n" + + "\n" + + "6. Each time you redistribute the Program (or any work based on the Program), the " + + "recipient automatically receives a license from the original licensor to copy, " + + "distribute or modify the Program subject to these terms and conditions. You may not " + + "impose any further restrictions on the recipients' exercise of the rights granted " + + "herein. You are not responsible for enforcing compliance by third parties to this " + + "License." + + "\n" + + "7. If, as a consequence of a court judgment or allegation of patent infringement or " + + "for any other reason (not limited to patent issues), conditions are imposed on you " + + "(whether by court order, agreement or otherwise) that contradict the conditions of " + + "this License, they do not excuse you from the conditions of this License. If you " + + "cannot distribute so as to satisfy simultaneously your obligations under this License " + + "and any other pertinent obligations, then as a consequence you may not distribute the " + + "Program at all. For example, if a patent license would not permit royalty-free " + + "redistribution of the Program by all those who receive copies directly or indirectly " + + "through you, then the only way you could satisfy both it and this License would be to " + + "refrain entirely from distribution of the Program.\n" + + "\n" + + "If any portion of this section is held invalid or unenforceable under any particular " + + "circumstance, the balance of the section is intended to apply and the section as a " + + "whole is intended to apply in other circumstances.\n" + + "\n" + + "It is not the purpose of this section to induce you to infringe any patents or other " + + "property right claims or to contest validity of any such claims; this section has the " + + "sole purpose of protecting the integrity of the free software distribution system, " + + "which is implemented by public license practices. Many people have made generous " + + "contributions to the wide range of software distributed through that system in " + + "reliance on consistent application of that system; it is up to the author/donor to " + + "decide if he or she is willing to distribute software through any other system and a " + + "licensee cannot impose that choice.\n" + + "\n" + + "This section is intended to make thoroughly clear what is believed to be a consequence " + + "of the rest of this License.\n" + + "\n" + + "8. If the distribution and/or use of the Program is restricted in certain countries " + + "either by patents or by copyrighted interfaces, the original copyright holder who " + + "places the Program under this License may add an explicit geographical distribution " + + "limitation excluding those countries, so that distribution is permitted only in or " + + "among countries not thus excluded. In such case, this License incorporates the " + + "limitation as if written in the body of this License.\n" + + "\n" + + "9. The Free Software Foundation may publish revised and/or new versions of the General " + + "Public License from time to time. Such new versions will be similar in spirit to the " + + "present version, but may differ in detail to address new problems or concerns.\n" + + "\n" + + "Each version is given a distinguishing version number. If the Program specifies a " + + "version number of this License which applies to it and \"any later version\", you have " + + "the option of following the terms and conditions either of that version or of any " + + "later version published by the Free Software Foundation. If the Program does not " + + "specify a version number of this License, you may choose any version ever published by " + + "the Free Software Foundation.\n" + + "\n" + + "10. If you wish to incorporate parts of the Program into other free programs whose " + + "distribution conditions are different, write to the author to ask for permission. For " + + "software which is copyrighted by the Free Software Foundation, write to the Free " + + "Software Foundation; we sometimes make exceptions for this. Our decision will be " + + "guided by the two goals of preserving the free status of all derivatives of our free " + + "software and of promoting the sharing and reuse of software generally.\n" + + "\n" + + "NO WARRANTY\n" + + "\n" + + "11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE " + + "PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN " + + "WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" " + + "WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED " + + "TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. " + + "THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD " + + "THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR " + + "CORRECTION.\n" + + "\n" + + "12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY " + + "COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS " + + "PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, " + + "INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE " + + "PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE " + + "OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE " + + "WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE " + + "POSSIBILITY OF SUCH DAMAGES.\n" + + "\n" + + "END OF TERMS AND CONDITIONS\n" + + "\n" + + "\n" + + "How to Apply These Terms to Your New Programs\n" + + "\n" + + "If you develop a new program, and you want it to be of the greatest possible use to " + + "the public, the best way to achieve this is to make it free software which everyone " + + "can redistribute and change under these terms.\n" + + "\n" + + "To do so, attach the following notices to the program. It is safest to attach them to " + + "the start of each source file to most effectively convey the exclusion of warranty; " + + "and each file should have at least the \"copyright\" line and a pointer to where the " + + "full notice is found.\n" + + "\n" + + "<one line to give the program's name and a brief idea of what it does.>\n" + + "Copyright (C) <year> <name of author>\n" + + "\n" + + "This program is free software; you can redistribute it and/or modify it under the " + + "terms of the GNU General Public License as published by the Free Software Foundation; " + + "either version 2 of the License, or (at your option) any later version.\n" + + "\n" + + "This program is distributed in the hope that it will be useful, but WITHOUT ANY " + + "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A " + + "PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" + + "\n" + + "You should have received a copy of the GNU General Public License along with this " + + "program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite " + + "330, Boston, MA 02111-1307 USA\n" + + "\n" + + "Also add information on how to contact you by electronic and paper mail.\n" + + "\n" + + "If the program is interactive, make it output a short notice like this when it starts " + + "in an interactive mode:\n" + + "\n" + + "Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with " + + "ABSOLUTELY NO WARRANTY; for details type `show w'.\n" + + "This is free software, and you are welcome to redistribute it under certain " + + "conditions; type `show c' for details.\n" + + "\n" + + "The hypothetical commands `show w' and `show c' should show the appropriate parts of " + + "the General Public License. Of course, the commands you use may be called something " + + "other than `show w' and `show c'; they could even be mouse-clicks or menu items" + + "--whatever suits your program.\n" + + "\n" + + "You should also get your employer (if you work as a programmer) or your school, if " + + "any, to sign a \"copyright disclaimer\" for the program, if necessary. Here is a " + + "sample; alter the names:\n" + + "\n" + + "Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' " + + "(which makes passes at compilers) written by James Hacker.\n" + + "\n" + + "<signature of Ty Coon>, 1 April 1989\n" + + "Ty Coon, President of Vice\n" + + "\n" + + "This General Public License does not permit incorporating your program into " + + "proprietary programs. If your program is a subroutine library, you may consider it " + + "more useful to permit linking proprietary applications with the library. If this is " + + "what you want to do, use the GNU Library General Public License instead of this " + + "License.\n"; + + /** The GNU Lesser General Public Licence. */ + public static final String LGPL = "GNU LESSER GENERAL PUBLIC LICENSE\n" + + "\n" + + "Version 2.1, February 1999\n" + + "\n" + + "Copyright (C) 1991, 1999 Free Software Foundation, Inc.\n" + + "59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" + + "Everyone is permitted to copy and distribute verbatim copies of this license document, " + + "but changing it is not allowed.\n" + + "\n" + + "[This is the first released version of the Lesser GPL. It also counts as the " + + "successor of the GNU Library Public License, version 2, hence the version number " + + "2.1.]\n" + + "\n" + + "Preamble\n" + + "\n" + + "The licenses for most software are designed to take away your freedom to share and " + + "change it. By contrast, the GNU General Public Licenses are intended to guarantee your " + + "freedom to share and change free software--to make sure the software is free for all " + + "its users.\n" + + "\n" + + "This license, the Lesser General Public License, applies to some specially designated " + + "software packages--typically libraries--of the Free Software Foundation and other " + + "authors who decide to use it. You can use it too, but we suggest you first think " + + "carefully about whether this license or the ordinary General Public License is the " + + "better strategy to use in any particular case, based on the explanations below.\n" + + "\n" + + "When we speak of free software, we are referring to freedom of use, not price. Our " + + "General Public Licenses are designed to make sure that you have the freedom to " + + "distribute copies of free software (and charge for this service if you wish); that you " + + "receive source code or can get it if you want it; that you can change the software and " + + "use pieces of it in new free programs; and that you are informed that you can do these " + + "things.\n" + + "\n" + + "To protect your rights, we need to make restrictions that forbid distributors to deny " + + "you these rights or to ask you to surrender these rights. These restrictions translate " + + "to certain responsibilities for you if you distribute copies of the library or if you " + + "modify it.\n" + + "\n" + + "For example, if you distribute copies of the library, whether gratis or for a fee, you " + + "must give the recipients all the rights that we gave you. You must make sure that " + + "they, too, receive or can get the source code. If you link other code with the " + + "library, you must provide complete object files to the recipients, so that they can " + + "relink them with the library after making changes to the library and recompiling it. " + + "And you must show them these terms so they know their rights.\n" + + "\n" + + "We protect your rights with a two-step method: (1) we copyright the library, and (2) " + + "we offer you this license, which gives you legal permission to copy, distribute and/or " + + "modify the library.\n" + + "\n" + + "To protect each distributor, we want to make it very clear that there is no warranty " + + "for the free library. Also, if the library is modified by someone else and passed on, " + + "the recipients should know that what they have is not the original version, so that " + + "the original author's reputation will not be affected by problems that might be " + + "introduced by others.\n" + + "\n" + + "Finally, software patents pose a constant threat to the existence of any free program. " + + "We wish to make sure that a company cannot effectively restrict the users of a free " + + "program by obtaining a restrictive license from a patent holder. Therefore, we insist " + + "that any patent license obtained for a version of the library must be consistent with " + + "the full freedom of use specified in this license.\n" + + "\n" + + "Most GNU software, including some libraries, is covered by the ordinary GNU General " + + "Public License. This license, the GNU Lesser General Public License, applies to " + + "certain designated libraries, and is quite different from the ordinary General Public " + + "License. We use this license for certain libraries in order to permit linking those " + + "libraries into non-free programs.\n" + + "\n" + + "When a program is linked with a library, whether statically or using a shared library, " + + "the combination of the two is legally speaking a combined work, a derivative of the " + + "original library. The ordinary General Public License therefore permits such linking " + + "only if the entire combination fits its criteria of freedom. The Lesser General Public " + + "License permits more lax criteria for linking other code with the library.\n" + + "\n" + + "We call this license the \"Lesser\" General Public License because it does Less to " + + "protect the user's freedom than the ordinary General Public License. It also provides " + + "other free software developers Less of an advantage over competing non-free programs. " + + "These disadvantages are the reason we use the ordinary General Public License for many " + + "libraries. However, the Lesser license provides advantages in certain special " + + "circumstances.\n" + + "\n" + + "For example, on rare occasions, there may be a special need to encourage the widest " + + "possible use of a certain library, so that it becomes a de-facto standard. To achieve " + + "this, non-free programs must be allowed to use the library. A more frequent case is " + + "that a free library does the same job as widely used non-free libraries. In this case, " + + "there is little to gain by limiting the free library to free software only, so we use " + + "the Lesser General Public License.\n" + + "\n" + + "In other cases, permission to use a particular library in non-free programs enables a " + + "greater number of people to use a large body of free software. For example, permission " + + "to use the GNU C Library in non-free programs enables many more people to use the " + + "whole GNU operating system, as well as its variant, the GNU/Linux operating system.\n" + + "\n" + + "Although the Lesser General Public License is Less protective of the users' freedom, " + + "it does ensure that the user of a program that is linked with the Library has the " + + "freedom and the wherewithal to run that program using a modified version of the " + + "Library.\n" + + "\n" + + "The precise terms and conditions for copying, distribution and modification follow. " + + "Pay close attention to the difference between a \"work based on the library\" and a " + + "\"work that uses the library\". The former contains code derived from the library, " + + "whereas the latter must be combined with the library in order to run.\n" + + "\n" + + "TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n" + + "\n" + + "0. This License Agreement applies to any software library or other program which " + + "contains a notice placed by the copyright holder or other authorized party saying it " + + "may be distributed under the terms of this Lesser General Public License (also called " + + "\"this License\"). Each licensee is addressed as \"you\"." + + "\n" + + "A \"library\" means a collection of software functions and/or data prepared so as to " + + "be conveniently linked with application programs (which use some of those functions " + + "and data) to form executables.\n" + + "\n" + + "The \"Library\", below, refers to any such software library or work which has been " + + "distributed under these terms. A \"work based on the Library\" means either the " + + "Library or any derivative work under copyright law: that is to say, a work containing " + + "the Library or a portion of it, either verbatim or with modifications and/or " + + "translated straightforwardly into another language. (Hereinafter, translation is " + + "included without limitation in the term \"modification\".)\n" + + "\n" + + "\"Source code\" for a work means the preferred form of the work for making " + + "modifications to it. For a library, complete source code means all the source code for " + + "all modules it contains, plus any associated interface definition files, plus the " + + "scripts used to control compilation and installation of the library.\n" + + "\n" + + "Activities other than copying, distribution and modification are not covered by this " + + "License; they are outside its scope. The act of running a program using the Library is " + + "not restricted, and output from such a program is covered only if its contents " + + "constitute a work based on the Library (independent of the use of the Library in a " + + "tool for writing it). Whether that is true depends on what the Library does and what " + + "the program that uses the Library does." + + "\n" + + "1. You may copy and distribute verbatim copies of the Library's complete source code " + + "as you receive it, in any medium, provided that you conspicuously and appropriately " + + "publish on each copy an appropriate copyright notice and disclaimer of warranty; keep " + + "intact all the notices that refer to this License and to the absence of any warranty; " + + "and distribute a copy of this License along with the Library.\n" + + "\n" + + "You may charge a fee for the physical act of transferring a copy, and you may at your " + + "option offer warranty protection in exchange for a fee.\n" + + "\n" + + "2. You may modify your copy or copies of the Library or any portion of it, thus " + + "forming a work based on the Library, and copy and distribute such modifications or " + + "work under the terms of Section 1 above, provided that you also meet all of these " + + "conditions:\n" + + "\n" + + "* a) The modified work must itself be a software library.\n" + + "* b) You must cause the files modified to carry prominent notices stating that you " + + "changed the files and the date of any change.\n" + + "* c) You must cause the whole of the work to be licensed at no charge to all third " + + "parties under the terms of this License.\n" + + "* d) If a facility in the modified Library refers to a function or a table of data " + + "to be supplied by an application program that uses the facility, other than as an " + + "argument passed when the facility is invoked, then you must make a good faith effort " + + "to ensure that, in the event an application does not supply such function or table, " + + "the facility still operates, and performs whatever part of its purpose remains " + + "meaningful.\n" + + "\n" + + "(For example, a function in a library to compute square roots has a purpose that is " + + "entirely well-defined independent of the application. Therefore, Subsection 2d " + + "requires that any application-supplied function or table used by this function must be " + + "optional: if the application does not supply it, the square root function must still " + + "compute square roots.)\n" + + "\n" + + "These requirements apply to the modified work as a whole. If identifiable sections of " + + "that work are not derived from the Library, and can be reasonably considered " + + "independent and separate works in themselves, then this License, and its terms, do not " + + "apply to those sections when you distribute them as separate works. But when you " + + "distribute the same sections as part of a whole which is a work based on the Library, " + + "the distribution of the whole must be on the terms of this License, whose permissions " + + "for other licensees extend to the entire whole, and thus to each and every part " + + "regardless of who wrote it.\n" + + "\n" + + "Thus, it is not the intent of this section to claim rights or contest your rights to " + + "work written entirely by you; rather, the intent is to exercise the right to control " + + "the distribution of derivative or collective works based on the Library.\n" + + "\n" + + "In addition, mere aggregation of another work not based on the Library with the " + + "Library (or with a work based on the Library) on a volume of a storage or distribution " + + "medium does not bring the other work under the scope of this License.\n" + + "\n" + + "3. You may opt to apply the terms of the ordinary GNU General Public License instead " + + "of this License to a given copy of the Library. To do this, you must alter all the " + + "notices that refer to this License, so that they refer to the ordinary GNU General " + + "Public License, version 2, instead of to this License. (If a newer version than " + + "version 2 of the ordinary GNU General Public License has appeared, then you can " + + "specify that version instead if you wish.) Do not make any other change in these " + + "notices.\n" + + "\n" + + "Once this change is made in a given copy, it is irreversible for that copy, so the " + + "ordinary GNU General Public License applies to all subsequent copies and derivative " + + "works made from that copy.\n" + + "\n" + + "This option is useful when you wish to copy part of the code of the Library into a " + + "program that is not a library.\n" + + "\n" + + "4. You may copy and distribute the Library (or a portion or derivative of it, under " + + "Section 2) in object code or executable form under the terms of Sections 1 and 2 above " + + "provided that you accompany it with the complete corresponding machine-readable source " + + "code, which must be distributed under the terms of Sections 1 and 2 above on a medium " + + "customarily used for software interchange.\n" + + "\n" + + "If distribution of object code is made by offering access to copy from a designated " + + "place, then offering equivalent access to copy the source code from the same place " + + "satisfies the requirement to distribute the source code, even though third parties are " + + "not compelled to copy the source along with the object code.\n" + + "\n" + + "5. A program that contains no derivative of any portion of the Library, but is " + + "designed to work with the Library by being compiled or linked with it, is called a " + + "\"work that uses the Library\". Such a work, in isolation, is not a derivative work of " + + "the Library, and therefore falls outside the scope of this License.\n" + + "\n" + + "However, linking a \"work that uses the Library\" with the Library creates an " + + "executable that is a derivative of the Library (because it contains portions of the " + + "Library), rather than a \"work that uses the library\". The executable is therefore " + + "covered by this License. Section 6 states terms for distribution of such executables.\n" + + "\n" + + "When a \"work that uses the Library\" uses material from a header file that is part of " + + "the Library, the object code for the work may be a derivative work of the Library even " + + "though the source code is not. Whether this is true is especially significant if the " + + "work can be linked without the Library, or if the work is itself a library. The " + + "threshold for this to be true is not precisely defined by law.\n" + + "\n" + + "If such an object file uses only numerical parameters, data structure layouts and " + + "accessors, and small macros and small inline functions (ten lines or less in length), " + + "then the use of the object file is unrestricted, regardless of whether it is legally a " + + "derivative work. (Executables containing this object code plus portions of the Library " + + "will still fall under Section 6.)\n" + + "\n" + + "Otherwise, if the work is a derivative of the Library, you may distribute the object " + + "code for the work under the terms of Section 6. Any executables containing that work " + + "also fall under Section 6, whether or not they are linked directly with the Library " + + "itself.\n" + + "\n" + + "6. As an exception to the Sections above, you may also combine or link a \"work that " + + "uses the Library\" with the Library to produce a work containing portions of the " + + "Library, and distribute that work under terms of your choice, provided that the terms " + + "permit modification of the work for the customer's own use and reverse engineering for " + + "debugging such modifications.\n" + + "\n" + + "You must give prominent notice with each copy of the work that the Library is used in " + + "it and that the Library and its use are covered by this License. You must supply a " + + "copy of this License. If the work during execution displays copyright notices, you " + + "must include the copyright notice for the Library among them, as well as a reference " + + "directing the user to the copy of this License. Also, you must do one of these " + + "things:\n" + + "\n" + + "* a) Accompany the work with the complete corresponding machine-readable source " + + "code for the Library including whatever changes were used in the work (which must be " + + "distributed under Sections 1 and 2 above); and, if the work is an executable linked " + + "with the Library, with the complete machine-readable \"work that uses the Library\", " + + "as object code and/or source ... [truncated message content] |
From: <mu...@us...> - 2007-06-21 15:07:17
|
Revision: 73 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=73&view=rev Author: mungady Date: 2007-06-21 08:07:16 -0700 (Thu, 21 Jun 2007) Log Message: ----------- Resources copied from JCommon. Added Paths: ----------- trunk/source/org/jfree/chart/ui/LocalizationBundle.properties trunk/source/org/jfree/chart/ui/LocalizationBundle_de.properties trunk/source/org/jfree/chart/ui/LocalizationBundle_es.properties trunk/source/org/jfree/chart/ui/LocalizationBundle_fr.properties trunk/source/org/jfree/chart/ui/LocalizationBundle_pt_PT.properties Added: trunk/source/org/jfree/chart/ui/LocalizationBundle.properties =================================================================== --- trunk/source/org/jfree/chart/ui/LocalizationBundle.properties (rev 0) +++ trunk/source/org/jfree/chart/ui/LocalizationBundle.properties 2007-06-21 15:07:16 UTC (rev 73) @@ -0,0 +1,25 @@ +# org.jfree.ui.ui ResourceBundle properties file +# +# Changes (from 31-Aug-2003) +# -------------------------- +# 31-Aug-2003 : Initial version (AL); +# + +Attributes=Attributes: +B=B: +Bold=Bold +Bottom=Bottom +Font=Font: +Insets=Insets: +Italic=Italic +L=L: +Left=Left +No_Font_Selected=No font selected. +R=R: +Right=Right +Size=Size: +T=T: +Top=Top +Help=Help +OK=OK +Cancel=Cancel Added: trunk/source/org/jfree/chart/ui/LocalizationBundle_de.properties =================================================================== --- trunk/source/org/jfree/chart/ui/LocalizationBundle_de.properties (rev 0) +++ trunk/source/org/jfree/chart/ui/LocalizationBundle_de.properties 2007-06-21 15:07:16 UTC (rev 73) @@ -0,0 +1,25 @@ +# org.jfree.ui.ui ResourceBundle properties file - german version +# +# Changes (from 31-Aug-2003) +# -------------------------- +# 15-Mar-2004 : Initial version (Christian W. Zuckschwerdt); +# + +Attributes=Attribute: +B=U: +Bold=Fett +Bottom=Unten +Font=Schrift: +Insets=R\u00e4nder: +Italic=Kursiv +L=L: +Left=Links +No_Font_Selected=Keine Schrift gew\u00e4hlt. +R=R: +Right=Rechts +Size=Gr\u00f6\u00dfe: +T=O: +Top=Oben +Help=Hilfe +OK=OK +Cancel=Abbrechen Added: trunk/source/org/jfree/chart/ui/LocalizationBundle_es.properties =================================================================== --- trunk/source/org/jfree/chart/ui/LocalizationBundle_es.properties (rev 0) +++ trunk/source/org/jfree/chart/ui/LocalizationBundle_es.properties 2007-06-21 15:07:16 UTC (rev 73) @@ -0,0 +1,25 @@ +# org.jfree.ui.ui ResourceBundle properties file spanish +# +# Changes (from 31-Aug-2003) +# -------------------------- +# 14-Oct-2004 : Initial version: Leopoldo Federico P\xE9rtile (Grupo de Procesamiento Digital de Im\xE1genes) +# Universidad Tecnol\xF3gica Nacional - Facultad Regional Resistencia, Argentina + +Attributes=Atributos: +B=Inf: +Bold=Negrita +Bottom=Inferior +Font=Fuente: +Insets=M\xE1rgenes: +Italic=Cursiva +L=Izq: +Left=Izquierda +No_Font_Selected=No se seleccion\00F3 ninguna fuente. +R=Der: +Right=Derecha +Size=Tama\u00f1o: +T=Sup: +Top=Superior +Help=Ayuda +OK=Aceptar +Cancel=Cancelar Added: trunk/source/org/jfree/chart/ui/LocalizationBundle_fr.properties =================================================================== --- trunk/source/org/jfree/chart/ui/LocalizationBundle_fr.properties (rev 0) +++ trunk/source/org/jfree/chart/ui/LocalizationBundle_fr.properties 2007-06-21 15:07:16 UTC (rev 73) @@ -0,0 +1,22 @@ +# org.jfree.ui.ui ResourceBundle properties file - french version +# +# Changes (from 31-Aug-2003) +# -------------------------- +# 31-Aug-2003 : Initial version (AL); +# + +Attributes=Attributs : +B=B : +Bold=Gras +Bottom=Bas +Font=Police : +Insets=Position : +Italic=Italique +L=G : +Left=Gauche +No_Font_Selected=Aucune police n'a \u00E9t\u00E9 s\u00E9lectionn\u00E9e. +R=D : +Right=Droite +Size=Taille : +T=H : +Top=Haut Added: trunk/source/org/jfree/chart/ui/LocalizationBundle_pt_PT.properties =================================================================== --- trunk/source/org/jfree/chart/ui/LocalizationBundle_pt_PT.properties (rev 0) +++ trunk/source/org/jfree/chart/ui/LocalizationBundle_pt_PT.properties 2007-06-21 15:07:16 UTC (rev 73) @@ -0,0 +1,22 @@ +# org.jfree.chart.ChartPanel ResourceBundle properties file - portuguese version +# +# Changes (from 09-Set-2003) +# -------------------------- +# 09-Set-2003 : Initial version (Eduardo Ramalho); +# + +Attributes=Atributos: +B=B: +Bold=Negrito +Bottom=Fundo +Font=Fonte: +Insets=Posi\u00e7\u00e3o: +Italic=It\u00e1lico +L=E: +Left=Esquerda +No_Font_Selected=Nenhuma fonte est\u00e1 seleccionada. +R=D: +Right=Direita +Size=Tamanho: +T=T: +Top=Topo \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2007-10-10 11:19:58
|
Revision: 310 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=310&view=rev Author: mungady Date: 2007-10-10 04:19:56 -0700 (Wed, 10 Oct 2007) Log Message: ----------- Removed CVS $Id tags. Modified Paths: -------------- trunk/source/org/jfree/chart/ui/BasicProjectInfo.java trunk/source/org/jfree/chart/ui/Contributor.java trunk/source/org/jfree/chart/ui/ExtensionFileFilter.java trunk/source/org/jfree/chart/ui/FontChooserPanel.java trunk/source/org/jfree/chart/ui/FontDisplayField.java trunk/source/org/jfree/chart/ui/LCBLayout.java trunk/source/org/jfree/chart/ui/Library.java trunk/source/org/jfree/chart/ui/Licences.java trunk/source/org/jfree/chart/ui/PaintSample.java trunk/source/org/jfree/chart/ui/ProjectInfo.java trunk/source/org/jfree/chart/ui/StrokeChooserPanel.java trunk/source/org/jfree/chart/ui/StrokeSample.java Modified: trunk/source/org/jfree/chart/ui/BasicProjectInfo.java =================================================================== --- trunk/source/org/jfree/chart/ui/BasicProjectInfo.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/BasicProjectInfo.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: Thomas Morgner; * Contributor(s): David Gilbert (for Object Refinery Limited); * - * $Id: BasicProjectInfo.java,v 1.7 2006/04/14 13:00:56 taqua Exp $ - * * Changes * ------- * 07-Jun-2004 : Added source headers (DG); Modified: trunk/source/org/jfree/chart/ui/Contributor.java =================================================================== --- trunk/source/org/jfree/chart/ui/Contributor.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/Contributor.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; * - * $Id: Contributor.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ - * * Changes * ------- * 10-Dec-2001 : Version 1 (DG); Modified: trunk/source/org/jfree/chart/ui/ExtensionFileFilter.java =================================================================== --- trunk/source/org/jfree/chart/ui/ExtensionFileFilter.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/ExtensionFileFilter.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; * - * $Id: ExtensionFileFilter.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ - * * Changes (from 26-Oct-2001) * -------------------------- * 26-Oct-2001 : Changed package to com.jrefinery.ui.* (DG); Modified: trunk/source/org/jfree/chart/ui/FontChooserPanel.java =================================================================== --- trunk/source/org/jfree/chart/ui/FontChooserPanel.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/FontChooserPanel.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): Arnaud Lelievre; * - * $Id: FontChooserPanel.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ - * * Changes (from 26-Oct-2001) * -------------------------- * 26-Oct-2001 : Changed package to com.jrefinery.ui.*; Modified: trunk/source/org/jfree/chart/ui/FontDisplayField.java =================================================================== --- trunk/source/org/jfree/chart/ui/FontDisplayField.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/FontDisplayField.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,10 +32,8 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): Arnaud Lelievre; * - * $Id: FontDisplayField.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ - * * Changes (from 26-Oct-2001) - * ---------------------------------- + * -------------------------- * 26-Oct-2001 : Changed package to com.jrefinery.ui.*; * 14-Oct-2002 : Fixed errors reported by Checkstyle (DG); * 08-Sep-2003 : Added internationalization via use of properties resourceBundle (RFE 690236) (AL); Modified: trunk/source/org/jfree/chart/ui/LCBLayout.java =================================================================== --- trunk/source/org/jfree/chart/ui/LCBLayout.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/LCBLayout.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; * - * $Id: LCBLayout.java,v 1.5 2005/11/16 15:58:40 taqua Exp $ - * * Changes (from 26-Oct-2001) * -------------------------- * 26-Oct-2001 : Changed package to com.jrefinery.layout.* (DG); Modified: trunk/source/org/jfree/chart/ui/Library.java =================================================================== --- trunk/source/org/jfree/chart/ui/Library.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/Library.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; * - * $Id: Library.java,v 1.6 2006/03/23 19:47:05 taqua Exp $ - * * Changes * ------- * 21-Feb-2002 : Version 1 (DG); Modified: trunk/source/org/jfree/chart/ui/Licences.java =================================================================== --- trunk/source/org/jfree/chart/ui/Licences.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/Licences.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; * - * $Id: Licences.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ - * * Changes * ------- * 26-Nov-2001 : Version 1 (DG); Modified: trunk/source/org/jfree/chart/ui/PaintSample.java =================================================================== --- trunk/source/org/jfree/chart/ui/PaintSample.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/PaintSample.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; * - * $Id: PaintSample.java,v 1.4 2005/11/16 15:58:41 taqua Exp $ - * * Changes (from 26-Oct-2001) * -------------------------- * 26-Oct-2001 : Changed package to com.jrefinery.ui.*; Modified: trunk/source/org/jfree/chart/ui/ProjectInfo.java =================================================================== --- trunk/source/org/jfree/chart/ui/ProjectInfo.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/ProjectInfo.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; * - * $Id: ProjectInfo.java,v 1.5 2005/11/16 15:58:41 taqua Exp $ - * * Changes (since 27-Jun-2002) * --------------------------- * 27-Jun-2002 : Added logo, updated source header and Javadocs (DG); Modified: trunk/source/org/jfree/chart/ui/StrokeChooserPanel.java =================================================================== --- trunk/source/org/jfree/chart/ui/StrokeChooserPanel.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/StrokeChooserPanel.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): Dirk Zeitz; * - * $Id: StrokeChooserPanel.java,v 1.5 2005/11/16 15:58:41 taqua Exp $ - * * Changes (from 26-Oct-2001) * -------------------------- * 26-Oct-2001 : Changed package to com.jrefinery.ui.*; Modified: trunk/source/org/jfree/chart/ui/StrokeSample.java =================================================================== --- trunk/source/org/jfree/chart/ui/StrokeSample.java 2007-10-09 21:36:02 UTC (rev 309) +++ trunk/source/org/jfree/chart/ui/StrokeSample.java 2007-10-10 11:19:56 UTC (rev 310) @@ -32,8 +32,6 @@ * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; * - * $Id: StrokeSample.java,v 1.3 2005/10/18 13:18:34 mungady Exp $ - * * Changes (from 26-Oct-2001) * -------------------------- * 26-Oct-2001 : Changed package to com.jrefinery.ui.*; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mu...@us...> - 2007-06-21 15:10:11
|
Revision: 74 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=74&view=rev Author: mungady Date: 2007-06-21 08:10:09 -0700 (Thu, 21 Jun 2007) Log Message: ----------- Corrected resource references. Modified Paths: -------------- trunk/source/org/jfree/chart/ui/FontChooserPanel.java trunk/source/org/jfree/chart/ui/FontDisplayField.java Modified: trunk/source/org/jfree/chart/ui/FontChooserPanel.java =================================================================== --- trunk/source/org/jfree/chart/ui/FontChooserPanel.java 2007-06-21 15:07:16 UTC (rev 73) +++ trunk/source/org/jfree/chart/ui/FontChooserPanel.java 2007-06-21 15:10:09 UTC (rev 74) @@ -84,7 +84,7 @@ /** The resourceBundle for the localization. */ protected static ResourceBundle localizationResources = - ResourceBundle.getBundle("org.jfree.ui.LocalizationBundle"); + ResourceBundle.getBundle("org.jfree.chart.ui.LocalizationBundle"); /** * Standard constructor - builds a FontChooserPanel initialised with the Modified: trunk/source/org/jfree/chart/ui/FontDisplayField.java =================================================================== --- trunk/source/org/jfree/chart/ui/FontDisplayField.java 2007-06-21 15:07:16 UTC (rev 73) +++ trunk/source/org/jfree/chart/ui/FontDisplayField.java 2007-06-21 15:10:09 UTC (rev 74) @@ -62,7 +62,7 @@ /** The resourceBundle for the localization. */ protected static final ResourceBundle localizationResources = - ResourceBundle.getBundle("org.jfree.ui.LocalizationBundle"); + ResourceBundle.getBundle("org.jfree.chart.ui.LocalizationBundle"); /** * Standard constructor - builds a FontDescriptionField initialised with This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |