From: <mu...@us...> - 2008-07-21 10:48:37
|
Revision: 1297 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=1297&view=rev Author: mungady Date: 2008-07-21 10:47:25 +0000 (Mon, 21 Jul 2008) Log Message: ----------- Whitespace. Modified Paths: -------------- trunk/source/org/jfree/data/xy/AbstractXYDataset.java trunk/source/org/jfree/data/xy/AbstractXYZDataset.java trunk/source/org/jfree/data/xy/CategoryTableXYDataset.java trunk/source/org/jfree/data/xy/DefaultHighLowDataset.java Modified: trunk/source/org/jfree/data/xy/AbstractXYDataset.java =================================================================== --- trunk/source/org/jfree/data/xy/AbstractXYDataset.java 2008-07-21 10:34:29 UTC (rev 1296) +++ trunk/source/org/jfree/data/xy/AbstractXYDataset.java 2008-07-21 10:47:25 UTC (rev 1297) @@ -2,32 +2,32 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2008, 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 + * 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 + * 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. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. * - * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * ---------------------- * AbstractXYDataset.java * ---------------------- - * (C) Copyright 2004-2007, by Object Refinery Limited. + * (C) Copyright 2004-2008, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited). * Contributor(s): -; @@ -35,10 +35,10 @@ * Changes * ------- * 05-May-2004 : Version 1 (DG); - * 15-Jul-2004 : Switched getX() with getXValue() and getY() with + * 15-Jul-2004 : Switched getX() with getXValue() and getY() with * getYValue() (DG); * 18-Aug-2004 : Moved from org.jfree.data --> org.jfree.data.xy (DG); - * + * */ package org.jfree.data.xy; @@ -47,53 +47,53 @@ import org.jfree.data.general.AbstractSeriesDataset; /** - * An base class that you can use to create new implementations of the + * An base class that you can use to create new implementations of the * {@link XYDataset} interface. */ -public abstract class AbstractXYDataset extends AbstractSeriesDataset +public abstract class AbstractXYDataset extends AbstractSeriesDataset implements XYDataset { /** * Returns the order of the domain (X) values. - * + * * @return The domain order. */ public DomainOrder getDomainOrder() { return DomainOrder.NONE; } - + /** * Returns the x-value (as a double primitive) for an item within a series. - * + * * @param series the series index (zero-based). * @param item the item index (zero-based). - * + * * @return The value. */ public double getXValue(int series, int item) { double result = Double.NaN; Number x = getX(series, item); if (x != null) { - result = x.doubleValue(); + result = x.doubleValue(); } - return result; + return result; } /** * Returns the y-value (as a double primitive) for an item within a series. - * + * * @param series the series index (zero-based). * @param item the item index (zero-based). - * + * * @return The value. */ public double getYValue(int series, int item) { double result = Double.NaN; Number y = getY(series, item); if (y != null) { - result = y.doubleValue(); + result = y.doubleValue(); } - return result; + return result; } } Modified: trunk/source/org/jfree/data/xy/AbstractXYZDataset.java =================================================================== --- trunk/source/org/jfree/data/xy/AbstractXYZDataset.java 2008-07-21 10:34:29 UTC (rev 1296) +++ trunk/source/org/jfree/data/xy/AbstractXYZDataset.java 2008-07-21 10:47:25 UTC (rev 1297) @@ -2,32 +2,32 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2008, 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 + * 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 + * 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. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. * - * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * ----------------------- * AbstractXYZDataset.java * ----------------------- - * (C) Copyright 2004, 2007, by Object Refinery Limited. + * (C) Copyright 2004-2008, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited). * Contributor(s): -; @@ -43,27 +43,27 @@ /** - * An base class that you can use to create new implementations of the + * An base class that you can use to create new implementations of the * {@link XYZDataset} interface. */ -public abstract class AbstractXYZDataset extends AbstractXYDataset +public abstract class AbstractXYZDataset extends AbstractXYDataset implements XYZDataset { /** * Returns the z-value (as a double primitive) for an item within a series. - * + * * @param series the series (zero-based index). * @param item the item (zero-based index). - * + * * @return The z-value. */ public double getZValue(int series, int item) { double result = Double.NaN; Number z = getZ(series, item); if (z != null) { - result = z.doubleValue(); + result = z.doubleValue(); } - return result; + return result; } } Modified: trunk/source/org/jfree/data/xy/CategoryTableXYDataset.java =================================================================== --- trunk/source/org/jfree/data/xy/CategoryTableXYDataset.java 2008-07-21 10:34:29 UTC (rev 1296) +++ trunk/source/org/jfree/data/xy/CategoryTableXYDataset.java 2008-07-21 10:47:25 UTC (rev 1297) @@ -2,32 +2,32 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2008, 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 + * 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 + * 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. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. * - * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * --------------------------- * CategoryTableXYDataset.java * --------------------------- - * (C) Copyright 2004, 2005, 2007, by Andreas Schroeder and Contributors. + * (C) Copyright 2004-2008, by Andreas Schroeder and Contributors. * * Original Author: Andreas Schroeder; * Contributor(s): David Gilbert (for Object Refinery Limited); @@ -54,28 +54,26 @@ import org.jfree.data.general.DatasetUtilities; /** - * An implementation variant of the {@link TableXYDataset} where every series - * shares the same x-values (required for generating stacked area charts). - * This implementation uses a {@link DefaultKeyedValues2D} Object as backend - * implementation and is hence more "category oriented" than the {@link + * An implementation variant of the {@link TableXYDataset} where every series + * shares the same x-values (required for generating stacked area charts). + * This implementation uses a {@link DefaultKeyedValues2D} Object as backend + * implementation and is hence more "category oriented" than the {@link * DefaultTableXYDataset} implementation. * <p> * This implementation provides no means to remove data items yet. * This is due to the lack of such facility in the DefaultKeyedValues2D class. * <p> * This class also implements the {@link IntervalXYDataset} interface, but this - * implementation is provisional. + * implementation is provisional. */ public class CategoryTableXYDataset extends AbstractIntervalXYDataset - implements TableXYDataset, - IntervalXYDataset, - DomainInfo { - + implements TableXYDataset, IntervalXYDataset, DomainInfo { + /** * The backing data structure. */ private DefaultKeyedValues2D values; - + /** A delegate for controlling the interval width. */ private IntervalXYDelegate intervalDelegate; @@ -89,9 +87,9 @@ } /** - * Adds a data item to this dataset and sends a {@link DatasetChangeEvent} + * Adds a data item to this dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. - * + * * @param x the x value. * @param y the y value. * @param seriesName the name of the series to add the data item. @@ -99,11 +97,11 @@ public void add(double x, double y, String seriesName) { add(new Double(x), new Double(y), seriesName, true); } - + /** - * Adds a data item to this dataset and, if requested, sends a + * Adds a data item to this dataset and, if requested, sends a * {@link DatasetChangeEvent} to all registered listeners. - * + * * @param x the x value. * @param y the y value. * @param seriesName the name of the series to add the data item. @@ -118,17 +116,17 @@ /** * Removes a value from the dataset. - * + * * @param x the x-value. * @param seriesName the series name. */ public void remove(double x, String seriesName) { remove(new Double(x), seriesName, true); } - + /** * Removes an item from the dataset. - * + * * @param x the x-value. * @param seriesName the series name. * @param notify notify listeners? @@ -179,7 +177,7 @@ * @return The item count. */ public int getItemCount(int series) { - return getItemCount(); // all series have the same number of items in + return getItemCount(); // all series have the same number of items in // this dataset } @@ -254,13 +252,13 @@ public Number getEndY(int series, int item) { return getY(series, item); } - + /** * Returns the minimum x-value in the dataset. * * @param includeInterval a flag that determines whether or not the * x-interval is taken into account. - * + * * @return The minimum value. */ public double getDomainLowerBound(boolean includeInterval) { @@ -272,7 +270,7 @@ * * @param includeInterval a flag that determines whether or not the * x-interval is taken into account. - * + * * @return The maximum value. */ public double getDomainUpperBound(boolean includeInterval) { @@ -284,7 +282,7 @@ * * @param includeInterval a flag that determines whether or not the * x-interval is taken into account. - * + * * @return The range. */ public Range getDomainBounds(boolean includeInterval) { @@ -295,10 +293,10 @@ return DatasetUtilities.iterateDomainBounds(this, includeInterval); } } - + /** - * Returns the interval position factor. - * + * Returns the interval position factor. + * * @return The interval position factor. */ public double getIntervalPositionFactor() { @@ -310,7 +308,7 @@ * If the factor is 0.5, the gap is in the middle of the x values. If it * is lesser than 0.5, the gap is farther to the left and if greater than * 0.5 it gets farther to the right. - * + * * @param d the new interval position factor. */ public void setIntervalPositionFactor(double d) { @@ -319,8 +317,8 @@ } /** - * Returns the full interval width. - * + * Returns the full interval width. + * * @return The interval width to use. */ public double getIntervalWidth() { @@ -328,9 +326,9 @@ } /** - * Sets the interval width to a fixed value, and sends a - * {@link DatasetChangeEvent} to all registered listeners. - * + * Sets the interval width to a fixed value, and sends a + * {@link DatasetChangeEvent} to all registered listeners. + * * @param d the new interval width (must be > 0). */ public void setIntervalWidth(double d) { @@ -340,7 +338,7 @@ /** * Returns whether the interval width is automatically calculated or not. - * + * * @return whether the width is automatically calculated or not. */ public boolean isAutoWidth() { @@ -349,20 +347,20 @@ /** * Sets the flag that indicates whether the interval width is automatically - * calculated or not. - * + * calculated or not. + * * @param b the flag. */ public void setAutoWidth(boolean b) { this.intervalDelegate.setAutoWidth(b); fireDatasetChanged(); } - + /** * Tests this dataset for equality with an arbitrary object. - * + * * @param obj the object (<code>null</code> permitted). - * + * * @return A boolean. */ public boolean equals(Object obj) { @@ -378,5 +376,5 @@ } return true; } - + } Modified: trunk/source/org/jfree/data/xy/DefaultHighLowDataset.java =================================================================== --- trunk/source/org/jfree/data/xy/DefaultHighLowDataset.java 2008-07-21 10:34:29 UTC (rev 1296) +++ trunk/source/org/jfree/data/xy/DefaultHighLowDataset.java 2008-07-21 10:47:25 UTC (rev 1297) @@ -2,32 +2,32 @@ * JFreeChart : a free chart library for the Java(tm) platform * =========================================================== * - * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors. + * (C) Copyright 2000-2008, 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 + * 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 + * 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. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. * - * [Java is a trademark or registered trademark of Sun Microsystems, Inc. + * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * -------------------------- * DefaultHighLowDataset.java * -------------------------- - * (C) Copyright 2002-2007, by Object Refinery Limited. + * (C) Copyright 2002-2008, by Object Refinery Limited. * * Original Author: David Gilbert (for Object Refinery Limited); * Contributor(s): -; @@ -36,9 +36,9 @@ * ------- * 21-Mar-2002 : Version 1 (DG); * 07-Oct-2002 : Fixed errors reported by Checkstyle (DG); - * 06-May-2004 : Now extends AbstractXYDataset and added new methods from + * 06-May-2004 : Now extends AbstractXYDataset and added new methods from * HighLowDataset (DG); - * 15-Jul-2004 : Switched getX() with getXValue() and getY() with + * 15-Jul-2004 : Switched getX() with getXValue() and getY() with * getYValue() (DG); * ------------- JFREECHART 1.0.x --------------------------------------------- * 28-Nov-2006 : Added equals() method override (DG); @@ -55,7 +55,7 @@ * the {@link DefaultOHLCDataset} class, which provides another implementation * that is very similar. */ -public class DefaultHighLowDataset extends AbstractXYDataset +public class DefaultHighLowDataset extends AbstractXYDataset implements OHLCDataset { /** The series key. */ @@ -85,7 +85,7 @@ * The current implementation allows only one series in the dataset. * This may be extended in a future version. * - * @param seriesKey the key for the series (<code>null</code> not + * @param seriesKey the key for the series (<code>null</code> not * permitted). * @param date the dates (<code>null</code> not permitted). * @param high the high values (<code>null</code> not permitted). @@ -94,7 +94,7 @@ * @param close the close values (<code>null</code> not permitted). * @param volume the volume values (<code>null</code> not permitted). */ - public DefaultHighLowDataset(Comparable seriesKey, Date[] date, + public DefaultHighLowDataset(Comparable seriesKey, Date[] date, double[] high, double[] low, double[] open, double[] close, double[] volume) { @@ -117,18 +117,18 @@ /** * Returns the key for the series stored in this dataset. * - * @param series the index of the series (ignored, this dataset supports + * @param series the index of the series (ignored, this dataset supports * only one series and this method always returns the key for series 0). - * + * * @return The series key (never <code>null</code>). */ public Comparable getSeriesKey(int series) { return this.seriesKey; } - + /** - * Returns the x-value for one item in a series. The value returned is a - * <code>Long</code> instance generated from the underlying + * Returns the x-value for one item in a series. The value returned is a + * <code>Long</code> instance generated from the underlying * <code>Date</code> object. To avoid generating a new object instance, * you might prefer to call {@link #getXValue(int, int)}. * @@ -136,7 +136,7 @@ * @param item the item (zero-based index). * * @return The x-value. - * + * * @see #getXValue(int, int) * @see #getXDate(int, int) */ @@ -153,7 +153,7 @@ * @param item the item (zero-based index). * * @return The x-value as a Date. - * + * * @see #getX(int, int) */ public Date getXDate(int series, int item) { @@ -163,14 +163,14 @@ /** * Returns the y-value for one item in a series. * <p> - * This method (from the {@link XYDataset} interface) is mapped to the + * This method (from the {@link XYDataset} interface) is mapped to the * {@link #getCloseValue(int, int)} method. * * @param series the series (zero-based index). * @param item the item (zero-based index). * * @return The y-value. - * + * * @see #getYValue(int, int) */ public Number getY(int series, int item) { @@ -184,7 +184,7 @@ * @param item the item (zero-based index). * * @return The high-value. - * + * * @see #getHighValue(int, int) */ public Number getHigh(int series, int item) { @@ -192,23 +192,23 @@ } /** - * Returns the high-value (as a double primitive) for an item within a + * Returns the high-value (as a double primitive) for an item within a * series. - * + * * @param series the series (zero-based index). * @param item the item (zero-based index). - * + * * @return The high-value. - * + * * @see #getHigh(int, int) */ public double getHighValue(int series, int item) { double result = Double.NaN; Number high = getHigh(series, item); if (high != null) { - result = high.doubleValue(); + result = high.doubleValue(); } - return result; + return result; } /** @@ -218,7 +218,7 @@ * @param item the item (zero-based index). * * @return The low-value. - * + * * @see #getLowValue(int, int) */ public Number getLow(int series, int item) { @@ -226,23 +226,23 @@ } /** - * Returns the low-value (as a double primitive) for an item within a + * Returns the low-value (as a double primitive) for an item within a * series. - * + * * @param series the series (zero-based index). * @param item the item (zero-based index). - * + * * @return The low-value. - * + * * @see #getLow(int, int) */ public double getLowValue(int series, int item) { double result = Double.NaN; Number low = getLow(series, item); if (low != null) { - result = low.doubleValue(); + result = low.doubleValue(); } - return result; + return result; } /** @@ -252,7 +252,7 @@ * @param item the item (zero-based index). * * @return The open-value. - * + * * @see #getOpenValue(int, int) */ public Number getOpen(int series, int item) { @@ -260,23 +260,23 @@ } /** - * Returns the open-value (as a double primitive) for an item within a + * Returns the open-value (as a double primitive) for an item within a * series. - * + * * @param series the series (zero-based index). * @param item the item (zero-based index). - * + * * @return The open-value. - * + * * @see #getOpen(int, int) */ public double getOpenValue(int series, int item) { double result = Double.NaN; Number open = getOpen(series, item); if (open != null) { - result = open.doubleValue(); + result = open.doubleValue(); } - return result; + return result; } /** @@ -286,7 +286,7 @@ * @param item the item (zero-based index). * * @return The close-value. - * + * * @see #getCloseValue(int, int) */ public Number getClose(int series, int item) { @@ -294,23 +294,23 @@ } /** - * Returns the close-value (as a double primitive) for an item within a + * Returns the close-value (as a double primitive) for an item within a * series. - * + * * @param series the series (zero-based index). * @param item the item (zero-based index). - * + * * @return The close-value. - * + * * @see #getClose(int, int) */ public double getCloseValue(int series, int item) { double result = Double.NaN; Number close = getClose(series, item); if (close != null) { - result = close.doubleValue(); + result = close.doubleValue(); } - return result; + return result; } /** @@ -320,7 +320,7 @@ * @param item the item (zero-based index). * * @return The volume-value. - * + * * @see #getVolumeValue(int, int) */ public Number getVolume(int series, int item) { @@ -328,23 +328,23 @@ } /** - * Returns the volume-value (as a double primitive) for an item within a + * Returns the volume-value (as a double primitive) for an item within a * series. - * + * * @param series the series (zero-based index). * @param item the item (zero-based index). - * + * * @return The volume-value. - * + * * @see #getVolume(int, int) */ public double getVolumeValue(int series, int item) { double result = Double.NaN; Number volume = getVolume(series, item); if (volume != null) { - result = volume.doubleValue(); + result = volume.doubleValue(); } - return result; + return result; } /** @@ -371,9 +371,9 @@ /** * Tests this dataset for equality with an arbitrary instance. - * + * * @param obj the object (<code>null</code> permitted). - * + * * @return A boolean. */ public boolean equals(Object obj) { @@ -405,13 +405,13 @@ if (!Arrays.equals(this.volume, that.volume)) { return false; } - return true; + return true; } - + /** * Constructs an array of Number objects from an array of doubles. * - * @param data the double values to convert (<code>null</code> not + * @param data the double values to convert (<code>null</code> not * permitted). * * @return The data as an array of Number objects. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |